/* =========================================
   1. VARIABLES
   ========================================= */
:root {
    /* Colors */
    --primary-color: #00796b;
    --primary-blue: #00796b;
    --primary-hover: #004d40;
    --neutral-100: #f3f4f6;
    --neutral-200: #e5e7eb;
    --neutral-300: #d1d5db;
    --neutral-500: #6b7280;
    --neutral-900: #111827;
    --white: #ffffff;

    /* Dimensions */
    --header-height-desktop: 80px;
    --header-height-mobile: 60px;
    /* Default Base Height */

    --radius-md: 8px;
    --radius-pill: 50px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --gradient-primary: linear-gradient(135deg, #00796b 0%, #009688 100%);

    /* Missing Variables for Settings Modal */
    --brand-primary: #00796b;
    --radius: 8px;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.15);
    --bg-gradient-start: #f3f4f6;
}

@font-face {
    font-family: 'EpicPro';
    src: url('../epicpro.ttf') format('truetype');
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--neutral-100);
    color: var(--neutral-900);
    line-height: 1.6;
    padding-top: var(--header-height-desktop);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================
   2. HEADER STYLES (DESKTOP)
   ========================================= */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--neutral-300);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height-desktop);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: height 0.3s ease;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    height: 40px;
}

.logo span {
    font-family: 'EpicPro', sans-serif;
    color: var(--primary-blue);
    font-size: 1.6rem;
    font-weight: 700;
}

.search-city-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
    max-width: 650px;
}

/* --- CITY SELECTOR BUTTON STYLES --- */
.city-selector-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 12px;
    background: var(--white);
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-md);
    color: var(--neutral-900);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s;
}

.city-selector-btn:hover {
    border-color: var(--primary-blue);
}

.city-selector-btn svg {
    width: 18px;
    fill: var(--neutral-500);
    flex-shrink: 0;
}

/* Clean X Button Logic */
.clear-city-icon {
    display: none;
    margin-left: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 16px;
    font-family: Arial, sans-serif;
    line-height: 1;
    color: var(--neutral-500);
    background: transparent;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.city-selector-btn.has-city .clear-city-icon {
    display: flex;
}

.clear-city-icon:hover {
    background-color: var(--neutral-200);
    color: var(--neutral-900);
}

.header .search-form {
    flex-grow: 1;
    height: 44px;
    display: flex;
    align-items: center;
    background: var(--neutral-100);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    overflow: hidden;
    width: 100%;
}

.header .search-input {
    flex: 1;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 16px;
    outline: none;
    font-size: 14px;
}

.header .search-button {
    height: 100%;
    padding: 0 20px;
    background: var(--primary-blue);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.search-button-icon {
    display: none;
}

.search-button-text {
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-link {
    text-decoration: none;
    color: var(--neutral-500);
    font-weight: 500;
    font-size: 14px;
    padding: 6px 10px;
}

.nav-link:hover {
    color: var(--primary-blue);
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* MODIFIED AUTH BUTTON STYLE TO MATCH IMAGE */
.auth-button {
    padding: 8px 18px;
    background: var(--white);
    color: #333;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* User icon logic for the button */
.auth-button::before {
    content: "";
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z' /%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.auth-button:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.profile-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--neutral-300);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #eee;
}

.profile-picture-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- FIXED: HIDE MOBILE ELEMENTS ON DESKTOP --- */
.mobile-header-button {
    display: none;
}

.profile-icon-btn.mobile-header-profile {
    display: none;
}

/* Ensure mobile profile is hidden on desktop */
.mobile-search-input-trigger {
    display: none;
}



/* =========================================
   3. MOBILE OPTIMIZATION (FIXED LAYOUT + CLEAN X)
   ========================================= */
@media (max-width: 992px) {

    /* --- GLOBAL MOBILE HEADER SETTINGS --- */
    body.logged-in .header,
    body.logged-out .header,
    .header {
        height: auto !important;
        padding: 10px 0 !important;
        align-items: center;
    }

    .header .container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 10px 0;
        padding: 0 16px;
    }

    /* --- ROW 1: LEFT (Logo) --- */
    .logo {
        order: 1;
        margin-right: auto;
        margin-bottom: 0;
    }

    .logo img {
        height: 28px;
    }

    .logo span {
        display: block;
        font-size: 1.1rem;
    }

    /* --- ROW 1: RIGHT (Profile/Auth) --- */
    /* MODIFIED MOBILE AUTH BUTTON STYLE */
    .profile-icon-btn.mobile-header-profile,
    .mobile-header-button {
        order: 2;
        display: flex !important;
        position: static;
        margin-left: 0;
    }

    .mobile-header-button {
        padding: 4px 12px;
        font-size: 12px;
        height: 32px;
        background: var(--white);
        color: #333;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        text-decoration: none;
        font-weight: 500;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }

    .mobile-header-button::before {
        content: "";
        width: 14px;
        height: 14px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z' /%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* --- ROW 2: FULL WIDTH (City + Search) --- */
    .search-city-group {
        order: 3;
        width: 100%;
        display: flex;
        margin-top: 0;
        gap: 8px;
    }

    /* 1. City Selector */
    .city-selector-btn {
        display: flex !important;
        width: auto;
        max-width: 35%;
        height: 36px;
        padding: 0 8px;
        font-size: 11px;
        background: var(--white);
        border: 1px solid var(--neutral-300);
        border-radius: var(--radius-md);
    }

    .city-selector-btn svg {
        width: 14px;
        height: 14px;
    }

    #selected-city-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .city-selector-btn .clear-city-icon {
        width: 16px;
        height: 16px;
        font-size: 14px;
        margin-left: 4px;
        flex-shrink: 0;
    }

    .city-selector-btn .dropdown-icon {
        display: none;
    }

    /* 2. Search Box */
    .header .search-form {
        flex-grow: 1;
        width: auto;
        height: 36px;
        border: 1px solid var(--neutral-300);
        border-radius: var(--radius-pill);
    }

    .header .search-input {
        font-size: 12px;
        padding: 0 10px;
    }

    /* 3. Search Button */
    .header .search-button {
        padding: 0 10px;
        background: var(--primary-blue);
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
    }

    .search-button-text {
        display: none;
    }

    .search-button-icon {
        display: block;
        width: 16px;
        height: 16px;
        fill: white;
    }

    .main-nav,
    .auth-actions {
        display: none !important;
    }
}

/* =========================================
   4. PAGE CONTENT
   ========================================= */
.hero {
    padding: 40px 0;
    background: var(--gradient-hero);
    text-align: center;
}

.hero h1 {
    margin-bottom: 10px;
    color: var(--neutral-900);
    font-weight: 800;
    font-size: 2.5rem;
    font-family: 'Poppins', sans-serif;
}

.hero-subtitle {
    color: var(--neutral-500);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.45rem;
        line-height: 1.25;
        padding: 0 10px;
        margin-bottom: 8px;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        padding: 0 20px;
        line-height: 1.4;
    }
}

.categories-section {
    padding: 30px 0 50px;
    background: white;
}

.categories-header {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.categories-heading {
    font-family: 'Poppins', sans-serif;
    color: var(--neutral-900);
    font-size: 1.8rem;
}

#category-toggle-btn {
    border: none;
    background: none;
}

#category-toggle-btn svg {
    width: 24px;
    fill: var(--neutral-500);
    transition: 0.3s;
}

#category-toggle-btn.expanded svg {
    transform: rotate(180deg);
}

/* Desktop Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 15px;
    justify-items: center;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--neutral-500);
    font-weight: 500;
}

/* Desktop Icon */
.category-item .icon-wrapper {
    width: 54px;
    height: 54px;
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
    transition: 0.2s;
}

.category-item svg {
    width: 24px;
    height: 24px;
}

.category-item span {
    font-size: 12px;
}

.category-item.hidden {
    display: none;
}

/* Mobile Grid */
@media (max-width: 768px) {
    .categories-heading {
        font-size: 1.3rem;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .category-item .icon-wrapper {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .category-item svg {
        width: 20px;
        height: 20px;
    }

    .category-item span {
        font-size: 9px;
        text-align: center;
        line-height: 1.2;
    }
}

/* Category Colors */
a[href*="category=restaurants"] svg {
    fill: #f26622;
}

a[href*="category=hospitals"] svg {
    fill: #00796b;
}

a[href*="category=beauty"] svg {
    fill: #e54b8b;
}

a[href*="category=shopping"] svg {
    fill: #8a4a9f;
}

a[href*="category=home"] svg {
    fill: #f7931d;
}

a[href*="category=education"] svg {
    fill: #00a89d;
}

a[href*="category=real"] svg {
    fill: #39b54a;
}

a[href*="category=auto"] svg {
    fill: #00796b;
}

a[href*="category=gym"] svg {
    fill: #ef4d42;
}

a[href*="category=doctor"] svg {
    fill: #00796b;
}

a[href*="category=travel"] svg {
    fill: #00796b;
}

a[href*="category=packer"] svg {
    fill: #662d91;
}

a[href*="category=hotel"] svg {
    fill: #fdb913;
}

a[href*="category=rental"] svg {
    fill: #8dc63f;
}

a[href*="category=event"] svg {
    fill: #be1e2d;
}

a[href*="category=caterer"] svg {
    fill: #92278f;
}

a[href*="category=interior"] svg {
    fill: #f7931e;
}

a[href*="category=contractor"] svg {
    fill: #00a651;
}

a[href*="category=pest"] svg {
    fill: #d4145a;
}

a[href*="category=courier"] svg {
    fill: #009688;
}

a[href*="category=pet"] svg {
    fill: #f15a24;
}

a[href*="category=consultant"] svg {
    fill: #00a99d;
}

a[href*="category=insurance"] svg {
    fill: #00796b;
}

a[href*="category=photo"] svg {
    fill: #603813;
}

a[href*="category=music"] svg {
    fill: #9e1f63;
}

a[href*="category=sport"] svg {
    fill: #f36523;
}

a[href*="category=electronic"] svg {
    fill: #414042;
}

a[href*="category=furniture"] svg {
    fill: #8b5e3c;
}

a[href*="category=lawyer"] svg {
    fill: #a47d52;
}

a[href*="category=salon"] svg {
    fill: #ec008c;
}

/* =========================================
   INTERACTIVE CAROUSEL SLIDER
   ========================================= */
.ad-placeholder-section {
    padding: 40px 0;
    background: #f8fafc;
}

.ad-slider-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    background: white;
}

.ad-track {
    display: flex;
    width: 300%;
    /* 3 slides */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ad-slide {
    width: 33.3333%;
    /* 1/3 of track */
    height: 350px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.ad-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8fafc;
}

/* --- NAVIGATION BUTTONS --- */
.ad-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ad-nav-btn:hover {
    background: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.ad-nav-btn svg {
    width: 24px;
    height: 24px;
    fill: #334155;
}

.ad-nav-btn.prev {
    left: 15px;
}

.ad-nav-btn.next {
    right: 15px;
}

/* Hide nav buttons on mobile until hover? No, keep it touchable. */
@media (max-width: 768px) {
    .ad-nav-btn {
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.9);
    }

    .ad-nav-btn.prev {
        left: 8px;
    }

    .ad-nav-btn.next {
        right: 8px;
    }
}

/* --- THE DOTS --- */
.ad-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    width: 24px;
    /* Pill shape for active */
    border-radius: 4px;
}

@media (max-width: 768px) {
    .ad-slide {
        height: 220px;
    }
}

/* IMAGE CONTAINER: Showing images fully */
.ad-image-container {
    flex-grow: 1;
    width: 100%;
    background-size: contain;
    /* ENTIRE image is visible */
    background-repeat: no-repeat;
    background-position: center;
    background-color: #f8fafc;
    /* Placeholder background color */
}

/* Text Box below the image */
.ad-text-box {
    padding: 15px;
    text-align: center;
    background: white;
    border-top: 1px solid #eee;
}

.ad-text-box h3 {
    font-size: 14px;
    color: var(--primary-blue);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* KEYFRAMES FOR STAGGERED ROTATION */
@keyframes cardAdRotate {

    0%,
    30% {
        background-image: url('https://images.unsplash.com/photo-1514362545857-3bc16c4c7d1b?w=400');
        opacity: 1;
    }

    33%,
    63% {
        background-image: url('https://images.unsplash.com/photo-1555396273-367ea4eb4db5?w=400');
        opacity: 1;
    }

    66%,
    96% {
        background-image: url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?w=400');
        opacity: 1;
    }

    31%,
    32%,
    64%,
    65%,
    97%,
    100% {
        opacity: 0.5;
    }
}

/* Applying animation with staggered offsets */
.card-1 .ad-image-container {
    animation: cardAdRotate 9s infinite;
    animation-delay: 0s;
}

.card-2 .ad-image-container {
    animation: cardAdRotate 9s infinite;
    animation-delay: 1.5s;
}

.card-3 .ad-image-container {
    animation: cardAdRotate 9s infinite;
    animation-delay: 3s;
}

/* Responsive Ad Layout */
@media (max-width: 992px) {
    .ad-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-3 {
        display: none;
    }

    /* Only 2 ads on tablets */
}

@media (max-width: 600px) {
    .ad-grid {
        grid-template-columns: 1fr;
    }

    .ad-card {
        height: 280px;
    }
}

/* Background Image Layer with AI-generated Business Posters */
.ad-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6);
    /* Makes text stand out */
    animation: adImageRotate 9s infinite;
    /* 3 posters x 3 seconds */
    z-index: 1;
}

/* Text Content Layer */
.ad-placeholder::after {
    position: relative;
    z-index: 2;
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    padding: 0 20px;
    animation: adTextRotate 9s infinite;
}

@keyframes adImageRotate {

    0%,
    30% {
        background-image: url('https://images.unsplash.com/photo-1514362545857-3bc16c4c7d1b?auto=format&fit=crop&w=800&q=80');
    }

    /* Restaurant */
    33%,
    63% {
        background-image: url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?auto=format&fit=crop&w=800&q=80');
    }

    /* Healthcare */
    66%,
    96% {
        background-image: url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=800&q=80');
    }

    /* Real Estate */
}

@keyframes adTextRotate {

    0%,
    30% {
        content: "DINE WITH US - 20% OFF TONIGHT";
        opacity: 1;
    }

    33%,
    63% {
        content: "MODERN CARE FOR YOUR FAMILY";
        opacity: 1;
    }

    66%,
    96% {
        content: "FIND YOUR DREAM HOME TODAY";
        opacity: 1;
    }

    31%,
    32%,
    64%,
    65%,
    97%,
    100% {
        opacity: 0;
    }
}

/* FAQ */
.faq-section {
    padding: 40px 0;
    background: white;
    border-top: 1px solid var(--neutral-200);
}

.section-title {
    text-align: center;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
    color: var(--neutral-900);
    font-size: 1.8rem;
}

.faq-item {
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    align-items: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 15px;
    transition: 0.3s;
    color: var(--neutral-500);
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding-bottom: 15px;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-blue);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

@media (max-width: 768px) {
    .faq-question {
        font-size: 13.5px;
        padding: 12px;
    }

    .faq-answer {
        font-size: 13px;
    }

    .section-title {
        font-size: 1.3rem;
    }
}

/* Footer */
.footer {
    background: #1E293B;
    color: #94A3B8;
    padding: 40px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding-bottom: 30px;
    text-align: left;
}

.footer-column h4 {
    color: white;
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
}

.footer-links {
    list-style: none;
}

.footer-links a {
    color: #94A3B8;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links svg {
    width: 24px;
    height: 24px;
    transition: 0.3s;
}

a[aria-label="Facebook"] svg {
    fill: #1877F2;
}

a[aria-label="X"] svg {
    fill: #ffffff;
}

a[aria-label="Instagram"] svg {
    fill: #E4405F;
}

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

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-about-text {
        font-size: 12px;
    }
}

/* Modals */
.city-modal-overlay,
.mobile-search-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.city-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.city-modal {
    background: white;
    width: 90%;
    max-width: 400px;
    max-height: 70vh;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.city-modal-header {
    padding: 15px;
    border-bottom: 1px solid var(--neutral-300);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Align items fix */
.city-modal-search {
    padding: 15px;
    background: var(--neutral-100);
}

#city-search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--neutral-300);
    border-radius: 8px;
}

.city-list-container {
    padding: 10px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
}

.city-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 14px;
}

/* === FIXED MODAL CLOSE BUTTON === */
#city-modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: var(--neutral-500);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background 0.2s;
}

#city-modal-close-btn:hover {
    background-color: var(--neutral-100);
    color: var(--neutral-900);
}

#login-signup-popup,
#login-signup-popup-backdrop {
    display: none !important;
}

/* =========================================
   5. SIDE DRAWER STYLES (FIXED)
   ========================================= */

/* Overlay */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    /* Ensures clicks go through when closed */
    transition: opacity 0.3s ease, visibility 0.3s;
}

.drawer-overlay.active {
    z-index: 2000;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Drawer Container */
.side-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    /* Hidden by default */
    width: 300px;
    height: 100%;
    background: #ffffff;
    z-index: 2001;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.side-drawer.active {
    right: 0;
    /* Slide in */
}

/* Header Section */
.drawer-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f0f0f0;
}

.drawer-user-profile {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drawer-avatar svg {
    width: 40px;
    height: 40px;
    fill: #9ca3af;
}

.drawer-user-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

.drawer-user-info p {
    font-size: 13px;
    color: #6b7280;
}

.drawer-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
}

/* Menu List */
.drawer-menu-list {
    list-style: none;
    padding: 10px 0;
    flex-grow: 1;
    overflow-y: auto;
}

.drawer-menu-list li {
    display: block;
}

.drawer-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: #374151;
    transition: background 0.2s;
}

.drawer-link:hover {
    background: #f9fafb;
}

.drawer-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-icon svg {
    width: 22px;
    height: 22px;
    fill: #6b7280;
}

.drawer-link span {
    font-size: 15px;
    font-weight: 500;
    flex-grow: 1;
}

/* Special Hub Link Style */
.special-drawer-link {
    background: #f0fdf4;
    /* Light green tint */
    border-left: 3px solid #00796b;
}

.drawer-badge-new {
    background: #00796b;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: auto;
}

/* --- FEATURE: Highlight 'List Your Business' in Drawer --- */
#drawer-list-business-item .drawer-link {
    color: var(--primary-blue);
    font-weight: 600;
}

#drawer-list-business-item .drawer-icon svg {
    fill: var(--primary-blue);
}

/* Footer */
.drawer-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.drawer-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #fef2f2;
    color: #ef4444;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.drawer-logout-btn svg {
    fill: #ef4444;
}

.drawer-logout-btn:hover {
    background: #fee2e2;
}

/* Mobile Full Width */
@media (max-width: 480px) {
    .side-drawer {
        width: 100%;
        right: -100%;
    }
}

/* Add this to ensure image fits in header circle */
.profile-picture-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}



/* Gear button */
.settings-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.settings-btn:hover .settings-icon {
    filter: brightness(1.2);
}