/* Phat Sac Cannabis Dispensary Finder - Exact Style Match */

:root {
    /* Phat Sac color palette */
    --primary-green: #2d5016;
    --secondary-green: #4a7c59;
    --accent-green: #7cb342;
    --light-green: #a5d6a7;
    --beige-light: #f5f5f0;
    --beige-medium: #e8e8e0;
    --beige-dark: #d4d4aa;
    --text-dark: #2c2c2c;
    --text-light: #ffffff;
    --text-gray: #666666;
    --background: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

body.menu-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e5e5e5;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
}

.nav-brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.nav-brand-link:hover {
    text-decoration: none;
    color: var(--primary-green);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid #e5e5e5;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--accent-green);
}

.nav-link.active {
    color: var(--primary-green);
    font-weight: 600;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-green);
    border-radius: 2px;
}

.nav-signup {
    background: var(--accent-green);
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
}

.nav-signup:hover {
    background: var(--primary-green);
    color: white !important;
    transform: translateY(-1px);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 8px;
    border: none;
    background: none;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-green) 0%, #1a3d0a 100%);
    color: white;
    padding: 4rem 0;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--accent-green);
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-btn {
    background: var(--accent-green);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.hero-btn:hover {
    background: var(--secondary-green);
    transform: translateY(-2px);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo {
    max-width: 100%;
    height: auto;
    max-height: 400px;
}

/* Search Section */
.search-section {
    background: var(--beige-light);
    padding: 3rem 0;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--accent-green);
    border-radius: var(--border-radius);
    background: white;
    transition: var(--transition);
    box-shadow: 0 2px 8px var(--card-shadow);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 4px 16px var(--card-shadow);
}

.search-input::placeholder {
    color: var(--text-gray);
}

.search-results-header {
    text-align: center;
    margin: 2rem 0;
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* Location Status */
.location-status {
    text-align: center;
    padding: 1rem;
    margin-bottom: 2rem;
    background: var(--beige-light);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--secondary-green);
}

.location-status.error {
    border-left-color: #e74c3c;
    background: hsl(0, 50%, 95%);
}

.location-status.loading {
    border-left-color: #f39c12;
    background: hsl(40, 50%, 95%);
}

/* Dispensary Grid */
.dispensary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.dispensary-card {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.dispensary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--card-shadow);
}

.dispensary-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-green);
    z-index: 1;
}

.dispensary-image {
    height: 120px;
    background: linear-gradient(135deg, var(--beige-light) 0%, var(--beige-medium) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.dispensary-image-placeholder {
    width: 60px;
    height: 60px;
    background: var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.dispensary-logo {
    max-width: 80%;
    max-height: 80px;
    object-fit: contain;
    border-radius: 8px;
}

.dispensary-content {
    padding: 1.5rem;
}

.dispensary-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.dispensary-address {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.4;
    font-size: 0.95rem;
}

.dispensary-distance {
    font-size: 0.9rem;
    color: var(--accent-green);
    font-weight: 500;
    margin-bottom: 1rem;
}

.dispensary-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.9rem;
    flex: 1;
    text-align: center;
}

.btn-directions {
    background: var(--accent-green);
    color: white;
}

.btn-directions:hover {
    background: var(--primary-green);
    text-decoration: none;
    color: white;
}

.btn-website {
    background: var(--beige-medium);
    color: var(--text-dark);
    border: 1px solid #ccc;
}

.btn-website:hover {
    background: var(--beige-dark);
    text-decoration: none;
    color: var(--text-dark);
}

.btn-website.disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-website.disabled:hover {
    background: #f0f0f0;
    color: #999;
}

/* Loading and Error States */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--beige-medium);
    border-top: 3px solid var(--secondary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

.error-message, .no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-dark);
    opacity: 0.7;
    font-size: 1.1rem;
}

.no-results {
    background: var(--beige-light);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

/* Footer */
.footer {
    background: var(--primary-green);
    color: var(--text-light);
    margin-top: 4rem;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h4 {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section h5 {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-green);
}

.footer-social {
    text-align: left;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-light);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-green);
    transform: translateY(-2px);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 0.9rem;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form button {
    padding: 0.6rem 1rem;
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.newsletter-form button:hover {
    background: var(--secondary-green);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo-img {
    height: 30px;
    width: auto;
}

.footer-logo span {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-light);
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-payment {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-payment span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.payment-icons {
    display: flex;
    gap: 0.5rem;
}

.payment-icons i {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile-First Responsive Design */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Mobile styles (default) */
.nav-menu {
    display: none;
}

.mobile-menu-toggle {
    display: flex;
}

.dispensary-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem 0;
}

.dispensary-actions {
    flex-direction: column;
    gap: 0.75rem;
}

.btn {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
}

.search-input {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    width: 100%;
}

.hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
}

.hero-title {
    font-size: 2rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
}

.footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
}

.newsletter-form {
    flex-direction: column;
    gap: 0.75rem;
}

.social-links {
    justify-content: center;
}

/* Tablet styles */
@media (min-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .dispensary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 1.5rem 0;
    }
    
    .dispensary-actions {
        flex-direction: row;
        gap: 1rem;
    }
    
    .btn {
        width: auto;
        flex: 1;
    }
    
    .hero-content {
        flex-direction: row;
        text-align: left;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }
    
    .newsletter-form {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .social-links {
        justify-content: flex-start;
    }
}

@media (max-width: 1023px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 2rem 2rem;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        gap: 0;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu .nav-link {
        padding: 1rem 0;
        width: 100%;
        border-bottom: 1px solid #eee;
        font-size: 1.1rem;
    }
    
    .nav-auth {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 2px solid #eee;
        padding-top: 1rem;
        margin-top: 1rem;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-signup {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Desktop styles */
@media (min-width: 1024px) {
    .nav-menu {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .dispensary-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .footer-bottom {
        flex-direction: row;
        text-align: left;
    }
}

/* Large desktop styles */
@media (min-width: 1200px) {
    .dispensary-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .dispensary-card {
        padding: 1.25rem;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* Additional stagger animation for cards */
.dispensary-card:nth-child(1) { animation-delay: 0.1s; }
.dispensary-card:nth-child(2) { animation-delay: 0.2s; }
.dispensary-card:nth-child(3) { animation-delay: 0.3s; }
.dispensary-card:nth-child(4) { animation-delay: 0.4s; }
.dispensary-card:nth-child(5) { animation-delay: 0.5s; }
.dispensary-card:nth-child(6) { animation-delay: 0.6s; }
