﻿/* ==================== PREMIUM ELEGANT DESIGN ==================== */
/* Updated: Navbar border reduced - v11.0.1 */

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

:root {
    --primary: #1e3a5f;
    --primary-light: #2d5a87;
    --accent: #c9a227;
    --accent-light: #dbb84d;
    --emerald: #047857;
    --dark: #0a0a0a;
    --dark-soft: #1a1a1a;
    --charcoal: #2d2d2d;
    --gray: #6b7280;
    --gray-light: #9ca3af;
    --cream: #faf8f5;
    --white: #ffffff;
    --gold-gradient: linear-gradient(135deg, #c9a227 0%, #f4d03f 50%, #c9a227 100%);
    --dark-gradient: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    --elegant-gradient: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.2);
    --shadow-gold: 0 10px 40px rgba(201, 162, 39, 0.2);
    --radius: 16px;
    --radius-sm: 10px;
}

html {
    scroll-behavior: auto;
    scroll-padding-top: 100px;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Hide default scrollbar and use custom thin scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    overflow-x: hidden;
}

/* Webkit browsers - thin scrollbar */
html::-webkit-scrollbar {
    width: 8px;
}

html::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

html::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    line-height: 1.7;
    background: var(--cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
}

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

/* Updated: Added height auto to prevent distortion */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==================== PREVENT MOBILE MENU FLASH ON PAGE LOAD ==================== */
/* Hide mobile menu by default to prevent flash during refresh */
@media (max-width: 768px) {
    .nav-menu:not(.active) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        transform: translateX(100%) !important;
    }

    /* Also hide mobile menu overlay */
    .mobile-menu-overlay:not(.active) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    /* CRITICAL: Hide city selector initially to prevent flash */
    .nav-city-selector-mobile:not(.loaded),
    .nav-city-selector:not(.loaded) {
        visibility: hidden !important;
        opacity: 0 !important;
    }

    /* Show city selector when loaded */
    .nav-city-selector-mobile.loaded,
    .nav-city-selector.loaded {
        visibility: visible !important;
        opacity: 1 !important;
        transition: opacity 0.2s ease !important;
    }
}

/* ==================== ELEGANT NAVBAR ==================== */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    height: 81px;
    min-height: 81px;
    max-height: 81px;
    box-sizing: border-box !important;
    overflow: visible;
    /* Start visible, JS will handle the transition */
    visibility: visible;
    opacity: 1;
    padding-right: 10px;
}

/* When JS adds loaded class, ensure it stays visible */
.navbar.loaded {
    visibility: visible !important;
    opacity: 1 !important;
}

/* ==================== NOTIFICATION BAR - MARQUEE ==================== */
.notification-bar {
    position: fixed;
    top: 81px;
    /* Below navbar */
    left: 0;
    right: 0;
    width: 100%;
    z-index: 998;
    background: var(--accent);
    height: 35px;
    /* Fixed height - original size */
    padding: 5px 0;
    /* Balanced padding */
    box-sizing: border-box;
    /* Include padding in height */
    overflow: hidden;
    display: none;
    /* Hidden by default, JS will show it */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: opacity 0.2s ease;
    margin: 0 !important;
    border-bottom: none;
}

/* ============= TICKER POSITIONING - UNIFIED APPROACH ============= */
/* Simple, clean positioning that works for both authenticated and non-authenticated users */

/* STOCK TICKER - Always fixed below navbar */
.stock-ticker {
    position: fixed !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 997 !important;
    margin: 0 !important;
    padding: 8px 15px !important;
    background: linear-gradient(90deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    top: 81px !important;
    /* Exactly below navbar - no gap */
}

/* Stock ticker with notification */
body.has-notification .stock-ticker {
    top: 116px !important;
    /* navbar(81) + notification(35) = 116px exactly - no gap */
}

/* BREAKING NEWS TICKER - Always fixed below stock ticker */
.breaking-ticker {
    position: fixed !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 998 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 15px !important;
    background: linear-gradient(90deg, #dc2626 0%, #b91c1c 50%, #dc2626 100%) !important;
    min-height: 44px !important;
    align-items: center !important;
    box-sizing: border-box !important;
    top: 121px !important;
    /* Below stock ticker: navbar(81) + stock(40) */
}

/* Breaking ticker with notification */
body.has-notification .breaking-ticker {
    top: 156px !important;
    /* navbar(81) + notification(35) + stock(40) */
}

/* MOBILE: Show breaking ticker on mobile (removed hiding rule) */
@media (max-width: 768px) {
    .breaking-ticker {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        top: 117px !important;
        /* Mobile: navbar(81) + stock(36) */
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }

    /* Small mobile tweaks */
    @media (max-width: 480px) {
        .nav-brand {
            font-size: 1.05rem !important;
        }

        .stock-ticker,
        .breaking-ticker {
            padding: 8px 10px !important;
            font-size: 0.85rem !important;
        }

        .breaking-ticker {
            min-height: 40px !important;
        }
    }
}

/* NEWS PORTAL - Always starts below both tickers */
.news-portal {
    position: relative !important;
    margin-top: 0 !important;
    padding-top: 165px !important;
    /* navbar(81) + stock(40) + breaking(44) = 165px */
    overflow: visible !important;
}

/* News portal with notification */
body.has-notification .news-portal {
    padding-top: 200px !important;
    /* navbar(81) + notification(35) + stock(40) + breaking(44) */
}

/* News portal for authenticated users - exact fit no gap */
body.user-authenticated .news-portal {
    padding-top: 165px !important;
    /* Desktop: navbar(81) + stock(40) + breaking(44) = 165px */
}

/* News portal for authenticated users with notification */
body.user-authenticated.has-notification .news-portal {
    padding-top: 200px !important;
    /* Desktop: navbar(81) + notification(35) + stock(40) + breaking(44) = 200px */
}

/* MOBILE: Adjust padding since breaking ticker is hidden */
@media (max-width: 768px) {
    .news-portal {
        padding-top: 121px !important;
        /* Mobile: navbar(81) + stock(40) = 121px (no breaking ticker) */
    }

    body.has-notification .news-portal {
        padding-top: 156px !important;
        /* Mobile: navbar(81) + notification(35) + stock(40) = 156px (no breaking ticker) */
    }

    /* Mobile: Authenticated users - same padding */
    body.user-authenticated .news-portal {
        padding-top: 121px !important;
        /* Mobile: navbar(81) + stock(40) = 121px (no breaking ticker) */
    }

    body.user-authenticated.has-notification .news-portal {
        padding-top: 156px !important;
        /* Mobile: navbar(81) + notification(35) + stock(40) = 156px (no breaking ticker) */
    }
}

/* NEWS HEADER - Ensure it stays below tickers but above content */
.news-header {
    position: relative !important;
    z-index: 10 !important;
    /* Higher than content (1) but lower than fixed elements (997-998) */
}

.news-header-inner {
    position: relative !important;
    z-index: 10 !important;
}

.news-brand {
    position: relative !important;
    z-index: 10 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

/* News portal children - remove extra margins */
.news-portal>* {
    margin-top: 0 !important;
}

.news-portal>*:first-child {
    margin-top: 0 !important;
}

/* Specific elements that might overlap with fixed tickers */
.news-portal .news-header,
.news-portal .category-nav,
.news-portal .news-main-container {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 0 !important;
}

/* HOME PAGE: Rules handled by .home-content-wrapper at line 400+ */
/* No specific authenticated/non-authenticated rules needed - same padding for all */

/* ==================== UNIFIED LAYOUT SYSTEM ==================== */
/* These rules work with the CSS variables defined in index.html */
/* --header-height-base: 81px (navbar only) */
/* --header-height-with-notification: 116px (navbar + notification) */

/* #app padding is now handled globally in index.html for better stability */
#app {
    margin: 0;
}

/* Home page - #app has no padding, wrapper handles it */
body.home-page #app {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* News page - #app has no padding, news-portal handles it */
body.news-page #app {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Auth pages - full viewport centered */
body.auth-page #app {
    padding-top: 0 !important;
    margin: 0 !important;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile auth page - align to top */
@media (max-width: 768px) {
    body.auth-page #app {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }
}

/* ============= MOBILE RESPONSIVE ============= */
@media (max-width: 768px) {

    /* CRITICAL FIX: Mobile navbar container layout */
    .navbar .container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        padding: 12px 16px !important;
        width: 100% !important;
        height: 81px !important;
    }

    /* Mobile nav-left-section - contains brand and city selector */
    .nav-left-section {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex: 1 !important;
        min-width: 0 !important;
        max-width: calc(100% - 50px) !important;
        /* Leave space for hamburger */
        overflow: hidden !important;
    }

    /* Mobile nav brand - Flexible Horizontal Layout */
    .nav-brand {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        flex: 1 !important;
        /* Take remaining space */
        min-width: 0 !important;
        max-width: none !important;
        overflow: visible !important;
        padding: 5px 0 !important;
    }

    .nav-brand span {
        font-size: 0.75rem !important;
        /* Slightly smaller to fit */
        font-weight: 700 !important;
        color: var(--primary) !important;
        line-height: 1.2 !important;
        text-transform: uppercase !important;
        white-space: normal !important;
        /* Allow wrapping */
        overflow: visible !important;
        text-overflow: clip !important;
        display: block !important;
        max-width: none !important;
    }

    /* Mobile Logo Size */
    .nav-brand #siteLogo {
        height: 40px !important;
        width: 40px !important;
        flex-shrink: 0 !important;
        border: 2px solid var(--accent) !important;
    }

    /* CRITICAL: Hide City Selector TEXT on mobile to give brand space */
    #selectedCityName {
        display: none !important;
    }

    /* Mobile city selector - Icon Only */
    .nav-city-selector-mobile {
        display: flex !important;
        flex-shrink: 0 !important;
        width: auto !important;
        max-width: 40px !important;
        margin-right: 5px !important;
    }

    .nav-city-selector-mobile .city-selector-btn {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        background: #ffffff !important;
        border: 1px solid #1e3a5f !important;
        /* Primary border */
        box-shadow: 0 2px 8px rgba(30, 58, 95, 0.15) !important;
    }

    /* Target the location icon color specifically */
    .nav-city-selector-mobile .city-selector-btn i {
        color: #1e3a5f !important;
        /* Deep Primary Blue */
        font-size: 1.1rem !important;
    }

    /* Hide chevron and text in mobile city button */
    .nav-city-selector-mobile .city-selector-btn .fa-chevron-down {
        display: none !important;
    }

    /* CRITICAL: Hamburger menu - always visible on right */
    .nav-toggle {
        display: flex !important;
        flex-shrink: 0 !important;
        order: 999 !important;
        /* Always last */
        margin-left: auto !important;
        margin-right: 4px !important;
        width: 36px !important;
        height: 36px !important;
        background: transparent !important;
        border: none !important;
        z-index: 100001 !important;
    }

    /* Mobile ticker heights */
    .stock-ticker {
        min-height: 36px !important;
        padding: 6px 10px !important;
        position: fixed !important;
        top: 81px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        /* Exactly below navbar - no gap */
    }

    .breaking-ticker {
        min-height: 40px !important;
        padding: 8px 10px !important;
        position: fixed !important;
        top: 117px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        /* Below stock ticker: navbar(81) + stock(36) */
        z-index: 995 !important;
        /* Lower z-index to prevent overlap */
    }

    /* Mobile tickers with notification */
    body.has-notification .stock-ticker {
        top: 116px !important;
        /* navbar(81) + notification(35) = 116px exactly - no gap */
    }

    body.has-notification .breaking-ticker {
        top: 152px !important;
        /* navbar(81) + notification(35) + stock(36) */
        z-index: 995 !important;
        /* Lower z-index to prevent overlap */
    }

    /* Mobile news portal - FIXED: Ensure SSPGM NEWS header appears below breaking ticker */
    .news-portal {
        padding-top: 175px !important;
        /* navbar(81) + stock(36) + breaking(40) + buffer(18) */
    }

    body.has-notification .news-portal {
        padding-top: 192px !important;
        /* navbar(81) + notification(35) + stock(36) + breaking(40) = 192px exactly */
    }

    /* CRITICAL FIX: Ensure news header is positioned below breaking ticker in mobile */
    .news-header {
        position: relative !important;
        z-index: 999 !important;
        /* Higher z-index than breaking ticker */
        margin-top: 0 !important;
        top: 0 !important;
        background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%) !important;
    }

    /* Ensure news header content is visible and properly spaced */
    .news-header-inner {
        position: relative !important;
        z-index: 999 !important;
        /* Higher z-index than breaking ticker */
        padding: 15px 10px !important;
    }

    /* Adjust news brand for mobile */
    .news-brand {
        font-size: 1.2rem !important;
    }

    /* MOBILE OVERRIDE: Authenticated users need SAME compact spacing as non-authenticated */
    body.user-authenticated .news-portal {
        padding-top: 117px !important;
        /* Mobile: navbar(81) + stock(36) = 117px - SAME AS NON-AUTHENTICATED */
    }

    body.user-authenticated.has-notification .news-portal {
        padding-top: 152px !important;
        /* Mobile: navbar(81) + notification(35) + stock(36) = 152px - SAME AS NON-AUTHENTICATED */
    }

    /* Mobile home page spacing - Handled by JavaScript */
    /* Removed CSS overrides to prevent conflict */

    /* News portal with notification bar (desktop) - REMOVED - Handled by authenticated/non-authenticated specific rules above */

    .notification-bar[style*="display: flex"],
    .notification-bar[style*="display:flex"] {
        display: flex !important;
    }
}

/* ==================== HOME CONTENT WRAPPER ==================== */
/* Padding controlled by CSS based on body classes */
/* DEFAULT: Padding handles the fixed navbar height */
.home-content-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    padding-top: 81px !important;
    /* Match --navbar-height */
    position: relative;
    background: transparent !important;
}

/* Increase padding when notification is present */
body.home-page.has-notification .home-content-wrapper {
    margin-top: 0 !important;
    padding-top: 116px !important;
    /* Match --header-height-with-notification */
}

/* MOBILE: Ensure proper spacing */
@media (max-width: 768px) {

    /* Default mobile spacing */
    body.home-page .home-content-wrapper {
        margin-top: 0 !important;
        padding-top: 81px !important;
    }

    /* When notification is present */
    body.home-page.has-notification .home-content-wrapper {
        margin-top: 0 !important;
        padding-top: 116px !important;
    }

    /* CRITICAL FIX: Force proper spacing for non-authenticated users - REMOVED to prevent gap when no notification */
    /* body.home-page:not(.user-authenticated) .home-content-wrapper { ... } */

    /* Ensure ads section appears properly below notification bar */
    body.home-page .ads-section-contained {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Ensure notification bar is positioned correctly */
    body.home-page .notification-bar {
        position: fixed !important;
        top: 81px !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 999 !important;
    }
}

/* DESKTOP: Gap fix is handled by proper HTML structure in home.js */
/* All sections are inside home-content-wrapper for consistent spacing */

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
}

.notification-content i {
    font-size: 1.2rem;
    flex-shrink: 0;
    animation: pulse-icon 1.5s ease-in-out infinite;
}

@keyframes pulse-icon {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.notification-marquee {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.notification-marquee span {
    display: inline-block;
    padding-left: 100%;
    width: max-content;
    animation: marquee 40s linear infinite;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        /* Translate by -200% to account for 100% padding-left plus the text width */
        transform: translateX(-200%);
    }
}

/* Body class when notification is active - handled in main ads section below */

body.has-notification .banner-section-contained {
    margin-top: 0 !important;
}

/* ==================== NAVBAR ==================== */
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 0 20px;
    padding-right: 25px;
    height: 81px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    /* FIXED: Changed to visible to show dropdowns */
}

/* Nav Left Section - Contains Brand + City Selector */
.nav-left-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    flex-shrink: 1;
    min-width: 0;
    max-width: 45%;
}

/* DESKTOP: Hide user profile info that incorrectly shows in nav-left-section */
@media (min-width: 769px) {

    .nav-left-section .mobile-user-info,
    .nav-left-section .mobile-user-header,
    .nav-left-section .mobile-user-name,
    .nav-left-section .mobile-user-email,
    .nav-left-section .mobile-user-actions {
        display: none !important;
    }
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    height: 45px;
    line-height: 1;
    flex-shrink: 1;
    min-width: 0;
    max-width: 280px;
    overflow: hidden;
}

@media (min-width: 769px) {
    .mobile-only-link {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mobile-only-link {
        display: block !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-only-link a {
        padding: 15px 20px !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        font-weight: 500 !important;
        color: var(--primary) !important;
    }

    .mobile-only-link i {
        width: 20px;
        text-align: center;
        color: var(--accent);
    }
}

.nav-brand span {
    white-space: nowrap;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 200px;
}

/* DESKTOP: Allow full brand name visibility and add spacing */
@media (min-width: 769px) {
    .nav-brand {
        max-width: none !important;
        width: auto !important;
        margin-right: 40px !important;
        /* Force space after logo/brand */
    }

    .nav-brand span {
        max-width: none !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
    }

    .nav-left-section {
        max-width: none !important;
        flex: 0 0 auto !important;
        /* Don't shrink */
    }
}

.nav-brand #siteLogo {
    height: 45px;
    width: 45px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--accent);
    box-shadow: 0 2px 10px rgba(201, 162, 39, 0.3);
    flex-shrink: 0;
}

.nav-brand i {
    font-size: 1.6rem;
    color: var(--accent);
    flex-shrink: 0;
}

/* DESKTOP ONLY: Move Nav Menu closer to Brand */
@media (min-width: 769px) {
    .navbar .container {
        justify-content: flex-start !important;
        gap: 0 !important;
        /* Minimal gap between nav elements */
    }

    /* CRITICAL FIX: Remove huge gap between city selector and menu */
    .nav-menu {
        margin-left: 0 !important;
        /* No extra margin */
        flex-grow: 0 !important;
    }

    .nav-left-section {
        margin-right: 0 !important;
        flex-shrink: 0 !important;
        width: auto !important;
        max-width: none !important;
    }

    /* Ensure user dropdown stays on the right */
    .user-dropdown {
        margin-left: auto !important;
    }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 26px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: 0.3s;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 1 auto;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    /* FIXED: Changed from hidden to visible to show dropdowns */
}



/* Hide sidebar logout button on desktop (it is in user dropdown) */
@media (min-width: 769px) {
    #sidebarLogoutItem {
        display: none !important;
    }
}

/* CRITICAL FIX: Ensure Brand/Logo is ALWAYS visible when logged in */
body.user-authenticated .nav-left-section,
body.user-authenticated .nav-brand {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 1 !important;
}

body.user-authenticated .nav-brand #siteLogo {
    display: block !important;
}

/* CRITICAL FIX: Ensure proper spacing between brand and menu on desktop */
@media (min-width: 769px) {

    /* Apply to ALL users on desktop */
    .navbar .container {
        gap: 30px !important;
    }

    .nav-menu {
        margin-left: 30px !important;
    }
}

/* CRITICAL FIX: Hide mobile-only elements on DESKTOP (min-width: 769px) */
@media (min-width: 769px) {

    #mobileUserHeader,
    .mobile-user-header {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        visibility: hidden !important;
    }

    /* Hide mobile menu header on desktop */
    .nav-menu-header,
    .mobile-menu-header {
        display: none !important;
    }

    /* Hide mobile user section on desktop */
    .mobile-user-section {
        display: none !important;
    }

    /* Hide mobile close button on desktop - only show in mobile sidebar */
    .nav-close-btn {
        display: none !important;
    }
}

/* Hide mobile profile links by default - shown via JS when logged in */
/* Using ID selectors for maximum specificity */
#mobileProfileLink,
#mobileEditProfileLink {
    display: none !important;
}

#mobileProfileLink.visible,
#mobileEditProfileLink.visible {
    display: block !important;
}

.mobile-profile-link {
    display: none !important;
}

.mobile-profile-link.visible {
    display: block !important;
}

.nav-menu li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    padding: 6px 10px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray);
    border-radius: var(--radius-sm);
    transition: color 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-menu a::after {
    display: none;
}

.nav-menu a:hover {
    color: var(--primary);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.dropdown-toggle i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-medium);
    min-width: auto;
    padding: 4px 0;
    opacity: 0;
    visibility: hidden;
    z-index: 1002;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Only transition opacity and visibility - NOT transform */
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Show on hover (desktop) */
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 6px 14px;
    color: var(--gray);
    font-size: 0.85rem;
    transition: color 0.2s ease, background-color 0.2s ease;
    text-align: left;
    white-space: nowrap;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background: var(--cream);
    color: var(--primary);
}

/* ==================== USER DROPDOWN (Profile Icon) ==================== */
.user-dropdown {
    position: relative;
    margin-left: 8px;
    margin-right: 5px;
    flex-shrink: 0;
    z-index: 1001;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.user-dropdown-btn:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    transform: none !important;
}

.user-dropdown-btn span,
.user-dropdown-btn i.fa-chevron-down {
    display: none !important;
}

.user-dropdown-btn i.fa-user {
    font-size: 1.2rem;
    /* Larger icon without circle frame */
    color: #1e3a5f !important;
    /* Navy Blue Icon */
}

/* Specific override if using white text on dark bg elsewhere, but general rule should apply */
.user-dropdown.active .user-dropdown-btn i.fa-chevron-down {
    display: none !important;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-medium);
    min-width: 220px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1002;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 8px;
}

.user-dropdown-header i {
    font-size: 2rem;
    color: var(--primary);
}

.user-dropdown-header div {
    display: flex;
    flex-direction: column;
}

.user-dropdown-header .user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

.user-dropdown-header .user-email {
    font-size: 0.75rem;
    color: var(--gray);
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--gray);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.user-dropdown-menu a:hover {
    background: var(--cream);
    color: var(--primary);
}

.user-dropdown-menu a i {
    width: 16px;
    text-align: center;
    color: var(--accent);
}

.user-dropdown-menu .logout-link {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 8px;
    padding-top: 12px;
    color: #dc3545;
}

.user-dropdown-menu .logout-link:hover {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}

.user-dropdown-menu .logout-link i {
    color: #dc3545;
}

/* ==================== MENU DROPDOWN - NESTED SUB-DROPDOWN ==================== */
.menu-dropdown {
    flex-direction: column !important;
    min-width: auto;
    width: auto;
    padding: 4px 0 !important;
}

.menu-dropdown>li {
    flex: none;
}

/* Sub-dropdown container */
.sub-dropdown {
    position: relative;
}

.sub-dropdown-toggle {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 6px 10px !important;
    text-align: left !important;
    font-size: 0.82rem !important;
    white-space: nowrap;
}

.sub-dropdown-toggle i:first-child {
    color: var(--accent);
    width: 14px;
    font-size: 0.8rem;
}

.sub-dropdown-toggle .sub-arrow {
    font-size: 0.55rem;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.sub-dropdown:hover .sub-arrow {
    transform: translateX(2px);
}

/* Sub-dropdown menu (appears on right side) - DISABLED - SEE END OF FILE FOR WORKING VERSION */
/* .sub-dropdown-menu {
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-medium);
    min-width: 140px;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1003;
    list-style: none;
    display: none;
} */

/* Show on hover (desktop) - DISABLED */
/* .sub-dropdown:hover .sub-dropdown-menu {
    opacity: 1;
    visibility: visible;
    display: block;
} */

/* Show on active class (click/touch) - DISABLED */
/* .sub-dropdown.active .sub-dropdown-menu {
    opacity: 1;
    visibility: visible;
    display: block;
} */

.sub-dropdown-menu li {
    padding: 5px 10px;
    font-size: 0.78rem;
    color: var(--gray);
    cursor: default;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    white-space: nowrap;
}

.sub-dropdown-menu li:last-child {
    border-bottom: none;
}

.sub-dropdown-menu li:hover {
    background: rgba(201, 162, 39, 0.1);
    color: var(--dark);
}

.sub-dropdown-menu::-webkit-scrollbar {
    width: 4px;
}

.sub-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sub-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(100, 100, 100, 0.3);
    border-radius: 4px;
}

.sub-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 100, 100, 0.5);
}

/* Firefox scrollbar */
.sub-dropdown-menu {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 100, 100, 0.3) transparent;
}

/* ==================== HERO - LUXURIOUS ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--dark-gradient);
    padding-top: 81px;
    /* navbar height */
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(30, 58, 95, 0.15) 0%, transparent 50%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('assets/itefaci/Community Hall (Samaj Wadi).jpeg') center/cover;
    opacity: 0.12;
    filter: grayscale(30%);
}

.hero-content {
    position: relative;
    text-align: center;
    padding: 130px 28px 90px;
    color: var(--white);
    max-width: 900px;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: rgba(201, 162, 39, 0.15);
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 32px;
    color: var(--accent-light);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-badge i {
    color: var(--accent);
}

.hero-title {
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.15;
    letter-spacing: -1px;
    color: var(--white);
}

.hero-title span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    opacity: 0.75;
    margin-bottom: 48px;
    font-weight: 300;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-stats {
    display: flex;
    gap: 60px;
    justify-content: center;
    padding: 36px 50px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stat {
    text-align: center;
}

.hero-stat span {
    display: block;
    font-size: 2.8rem;
    font-weight: 700;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-stat small {
    font-size: 0.85rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent);
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
}

@keyframes float {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-12px);
    }
}

/* ==================== ELEGANT BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 36px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--dark);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(201, 162, 39, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--dark);
    border-color: var(--white);
}

.btn-whatsapp {
    background: #128c7e;
    color: var(--white);
}

.btn-whatsapp:hover {
    background: #0d7a6e;
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(18, 140, 126, 0.3);
}

.btn-sm {
    padding: 12px 24px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 18px 42px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ==================== SECTIONS ==================== */
section {
    padding: 80px 0;
    position: relative;
}

/* First section margin reset - padding is handled by #app */
section:first-of-type {
    margin-top: 0 !important;
}



/* When notification bar is active */
body.has-notification section:first-of-type {
    margin-top: 0 !important;
}

/* 
   CRITICAL FIX v2: Remapping layout for Guest Users on Generic Pages 
   The negative margin approach was inconsistent. Instead, we adjust the 
   padding-top of the main container (#app) for guest users.
   
   Default #app padding with notification: 116px (81px nav + 35px notif)
   Target #app padding for Guests: 81px (Navbar only)
   
   This forces the content (Hero) to start immediately after the Navbar (at 81px).
   Since the Notification Bar is fixed at top:81px (height 35px), the Hero background
   will naturally extend BEHIND the Notification Bar, eliminating the white gap.
   The Internal padding of .history-hero (40px) ensures the text content is still 
   visible and not hidden behind the bar.
   
   We exclude .home-page and .auth-page as they have their own specific layouts.
*/
body.has-notification:not(.user-authenticated):not(.home-page):not(.auth-page):not(.news-page) #app {
    padding-top: 70px !important;
    /* Force overlap: 11px behind 81px navbar end */
    min-height: calc(100vh - 70px) !important;
}

/* Compensate for the overlap to ensure text isn't hidden */
body.has-notification:not(.user-authenticated) .history-hero,
body.has-notification:not(.user-authenticated) .rules-page-wrapper {
    padding-top: 46px !important;
    /* 40px base + 6px extra */
}



.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-tag {
    display: inline-block;
    padding: 8px 20px;
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark);
}

.section-header p {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-header.light h2,
.section-header.light p {
    color: var(--white);
}

.section-header.light .section-tag {
    border-color: var(--accent-light);
    color: var(--accent-light);
}

/* ==================== SERVICES - MINIMAL ELEGANT ==================== */
.services-section {
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 36px;
}

.service-card {
    background: var(--cream);
    padding: 48px 40px;
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.service-card:hover {
    background: var(--white);
    box-shadow: var(--shadow-medium);
    transform: translateY(-8px);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 28px;
    background: var(--elegant-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--white);
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    background: var(--gold-gradient);
    color: var(--dark);
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 14px;
    font-weight: 700;
    color: var(--dark);
}

.service-card p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.8;
}

.service-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.service-link i {
    transition: transform 0.3s ease;
}

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

.service-link:hover i {
    transform: translateX(6px);
}

/* ==================== INVENTORY - CLEAN GRID ==================== */
.inventory-section {
    background: var(--cream);
}

.inventory-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 420px;
}

.search-box i {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-light);
}

.search-box input {
    width: 100%;
    padding: 18px 24px 18px 54px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--white);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.1);
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

.inventory-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.inventory-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.inventory-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--cream);
    padding: 12px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.inventory-icon {
    display: none;
}

.inventory-content {
    padding: 18px;
    text-align: center;
}

.inventory-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.inventory-details {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.inventory-detail {
    text-align: center;
}

.inventory-detail small {
    display: block;
    color: var(--gray-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.inventory-detail strong {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 700;
}

.stock-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.stock-available {
    background: #ecfdf5;
    color: var(--emerald);
}

.stock-low {
    background: #fffbeb;
    color: #b45309;
}

.stock-out {
    background: #fef2f2;
    color: #b91c1c;
}

/* ==================== FACILITIES - PREMIUM ==================== */
.facilities-section {
    background: var(--dark-gradient);
    padding: 80px 0;
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

.facility-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    transition: all 0.4s ease;
}

.facility-card:hover {
    transform: translateY(-12px) scale(1.02);
}

.facility-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--cream);
    padding: 12px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.facility-icon {
    display: none;
}

.facility-content {
    padding: 18px;
}

.facility-type {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.facility-type.venue {
    background: var(--elegant-gradient);
    color: var(--white);
}

.facility-type.equipment {
    background: var(--gold-gradient);
    color: var(--dark);
}

.facility-type.service {
    background: #ecfdf5;
    color: var(--emerald);
}

.facility-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.facility-pricing {
    display: flex;
    gap: 28px;
}

.facility-price small {
    display: block;
    color: var(--gray-light);
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.facility-price strong {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 700;
}


/* ==================== CALENDAR SECTION ==================== */
.calendar-section {
    background: var(--white);
    padding: 60px 0;
}

/* ==================== BOOKING - SOPHISTICATED ==================== */
.booking-section {
    background: var(--cream);
}

.booking-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

.booking-info .section-tag {
    margin-bottom: 20px;
}

.booking-info h2 {
    font-size: 2.4rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--dark);
}

.booking-info>p {
    color: var(--gray);
    margin-bottom: 32px;
    font-size: 1.05rem;
    line-height: 1.9;
}

.booking-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 32px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 18px 22px;
    background: var(--white);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    color: var(--dark);
}

.feature:hover {
    border-color: var(--accent);
    transform: translateX(6px);
}

.feature i {
    color: var(--emerald);
    font-size: 1.2rem;
}

.booking-phone {
    margin-top: 24px;
    color: var(--gray);
    font-size: 1.05rem;
    font-weight: 500;
}

.booking-phone i {
    margin-right: 12px;
    color: var(--accent);
}

.booking-form {
    background: var(--white);
    padding: 44px;
    border-radius: var(--radius);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-soft);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 5px 8px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: inherit;
    background: var(--cream);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.08);
}

/* ==================== GALLERY - ELEGANT CAROUSEL ==================== */
.gallery-section {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
    padding: 8px 0 10px 0;
    /* More compact */
    overflow: hidden;
}

.gallery-section .section-header {
    text-align: center;
    margin-bottom: 5px;
    /* Minimal */
}

.gallery-section .section-tag {
    background: rgba(217, 119, 6, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(217, 119, 6, 0.4);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: inline-block;
}

.gallery-section h2 {
    color: #fff;
}

.gallery-section p {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 5px 0 15px 0 !important;
    }

    .gallery-section .section-header {
        margin-bottom: 5px !important;
    }

    .gallery-section h2 {
        font-size: 1.3rem !important;
    }

    .gallery-section p {
        font-size: 0.8rem !important;
        margin-bottom: 10px !important;
    }
}

.gallery-carousel-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.gallery-carousel {
    display: flex;
    gap: 12px;
    /* Reduced */
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 50px;
    /* Reduced */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-carousel::-webkit-scrollbar {
    display: none;
}

/* Gallery Item - Compact Cards */
.gallery-item {
    flex: 0 0 160px;
    /* Compact width */
    height: 200px;
    /* Taller */
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #1a1a2e;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Responsive gallery items */
@media (max-width: 768px) {
    .gallery-carousel-wrapper {
        padding: 0 50px;
        /* Space for arrows on both sides */
    }

    .gallery-carousel {
        padding: 5px 0;
        /* Minimal */
        scroll-snap-type: x mandatory;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }

    .gallery-item {
        flex: 0 0 150px;
        /* Compact */
        width: 150px;
        height: 180px;
        /* Balanced height */
        scroll-snap-align: center;
        margin: 0;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Adjust nav arrows position for mobile */
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .gallery-nav.prev {
        left: 5px;
    }

    .gallery-nav.next {
        right: 5px;
    }
}

/* Business Hub Promo Mobile Fixes */
.biz-hub-reg-btn {
    border: 2.5px solid #ff3b30 !important;
    color: #ff3b30 !important;
    background: transparent !important;
    font-weight: 700 !important;
}

.promo-section .btn {
    padding: 12px 30px;
    border-radius: 30px;
}

@media (max-width: 768px) {
    #business-hub-promo {
        padding: 35px 0 !important;
    }

    #business-hub-promo .section-header {
        margin-bottom: 20px !important;
    }

    #business-hub-promo .btn {
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
        padding: 10px 20px !important;
        font-size: 0.82rem !important;
        justify-content: center !important;
        border-radius: 50px !important;
    }

    #business-hub-promo .btn i {
        font-size: 0.9rem !important;
    }
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 80px rgba(217, 119, 6, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.7s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Gradient Overlay */
.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            transparent 0%,
            transparent 40%,
            rgba(0, 0, 0, 0.3) 70%,
            rgba(0, 0, 0, 0.9) 100%);
    z-index: 1;
    transition: all 0.4s ease;
}

.gallery-item:hover::before {
    background: linear-gradient(180deg,
            rgba(217, 119, 6, 0.1) 0%,
            transparent 30%,
            rgba(0, 0, 0, 0.4) 70%,
            rgba(0, 0, 0, 0.95) 100%);
}

/* Caption Styling */
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    z-index: 2;
    transform: translateY(10px);
    opacity: 0.9;
    transition: all 0.4s ease;
    line-height: 1.3;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
    opacity: 1;
}

/* Category Badge */
.gallery-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #d97706, #f59e0b);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(217, 119, 6, 0.4);
}

/* Navigation Arrows */
/* Navigation Arrows */
.gallery-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
}

.gallery-nav:hover {
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

/* View All Button */
.gallery-view-all {
    text-align: center;
    margin-top: 15px;
    /* Reduced */
    margin-bottom: 5px;
}

.gallery-view-all a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.gallery-view-all a:hover {
    background: #fff;
    color: #1a1a2e;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

.gallery-view-all a i {
    transition: transform 0.3s ease;
}

.gallery-view-all a:hover i {
    transform: translateX(5px);
}

/* Scroll Indicator Dots */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

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

.gallery-dot.active {
    background: var(--primary);
    width: 30px;
    border-radius: 5px;
}

/* Old grid style - keep for fallback */
.gallery-grid {
    display: none;
}

/* ==================== ABOUT - PREMIUM ==================== */
/* ==================== ABOUT - PREMIUM ==================== */
.about-section {
    background: var(--cream);
    padding: 60px 0;
    /* Increased for better visibility */
    display: block !important;
    /* Ensure always visible */
}

.about-section .section-header {
    text-align: center;
    margin-bottom: 30px;
}

.about-section .section-tag {
    display: inline-block !important;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    /* Reduced from 70px */
    align-items: center;
}

.about-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    max-height: 320px;
    /* Limit height */
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-content .section-tag {
    margin-bottom: 15px;
}

.about-content h2 {
    font-size: 2rem;
    /* Reduced from 2.4rem */
    margin-bottom: 16px;
    /* Reduced from 24px */
    font-weight: 700;
    color: var(--dark);
}

.about-content>p {
    color: var(--gray);
    margin-bottom: 24px;
    /* Reduced from 36px */
    line-height: 1.8;
    font-size: 0.95rem;
    /* Reduced from 1.05rem */
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    /* Reduced from 24px */
}

.about-feature {
    display: flex;
    gap: 14px;
    /* Reduced from 18px */
    padding: 16px;
    /* Reduced from 22px */
    background: var(--white);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.about-feature:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.about-feature i {
    width: 52px;
    height: 52px;
    background: var(--elegant-gradient);
    color: var(--white);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
}

.about-feature:hover i {
    background: var(--gold-gradient);
    color: var(--dark);
}

.about-feature h4 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--dark);
}

.about-feature p {
    font-size: 0.9rem;
    color: var(--gray);
}

/* ==================== CONTACT - LUXURIOUS ==================== */
.contact-section {
    background: var(--dark-gradient);
    padding: 35px 0;
    /* Reduced from 80px */
}

/* Hide GET IN TOUCH tag */
.contact-section .section-tag {
    display: none !important;
}

/* Reduce section header margin */
.contact-section .section-header {
    margin-bottom: 20px;
}

.contact-section .container {
    max-width: 1400px;
}

/* Contact Grid - 4 cards in a row */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    /* Reduced from 24px */
    margin-bottom: 20px;
    /* Reduced from 40px */
}

.contact-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    padding: 20px 16px;
    /* Reduced from 32px 24px */
    border-radius: 10px;
    text-align: center;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: var(--accent);
}

.contact-card i {
    font-size: 1.5rem;
    /* Reduced from 2rem */
    margin-bottom: 10px;
    /* Reduced from 16px */
    color: var(--accent);
}

.contact-card h4 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-card p,
.contact-card a {
    font-size: 0.9rem;
    opacity: 0.8;
}

.contact-card a:hover {
    opacity: 1;
    color: var(--accent-light);
}

/* Contact Map - Full width below cards */
.contact-map {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 20px;
    /* Reduced from 40px */
    overflow: hidden;
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 300px;
    /* Reduced from 600px */
    border: none;
}

/* Old layout styles - keep for other pages */
.contact-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    align-items: start;
}

.contact-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-card-item {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    padding: 28px 20px;
    border-radius: 12px;
    text-align: center;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.contact-card-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: var(--accent);
}

.contact-card-item i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--accent);
}

.contact-card-item h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-card-item p,
.contact-card-item a {
    font-size: 0.9rem;
    opacity: 0.8;
}

.contact-card-item a:hover {
    opacity: 1;
    color: var(--accent-light);
}

.contact-map-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    height: 450px;
}

/* ==================== FOOTER - REFINED ==================== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 20px 0 10px;
}

/* Hide calendar and family directory from footer if not logged in */
body:not(.user-authenticated) .calendar-footer-link,
body:not(.user-authenticated) .family-directory-footer-link {
    display: none !important;
}


.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 15px;
}

.footer-brand h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.footer-brand h3 i {
    color: var(--accent);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    /* Reduced from 0.95rem */
    line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--accent-light);
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    padding: 3px 0;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 10px;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i {
    color: var(--accent);
    width: 18px;
}

.footer-bottom {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

/* ==================== FLOATING ELEMENTS ==================== */
.whatsapp-float {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    background: #128c7e;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 30px rgba(18, 140, 126, 0.4);
    z-index: 999;
    transition: all 0.4s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(18, 140, 126, 0.5);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(18, 140, 126, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(18, 140, 126, 0);
    }
}

.scroll-top {
    position: fixed;
    bottom: 112px;
    right: 32px;
    width: 52px;
    height: 52px;
    background: var(--elegant-gradient);
    color: var(--white);
    border: none;
    border-radius: 0;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 999;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-6px);
    background: var(--gold-gradient);
    color: var(--dark);
}

/* ==================== MISC ==================== */
.install-prompt {
    position: fixed;
    bottom: 28px;
    left: 28px;
    right: 28px;
    max-width: 440px;
    background: var(--white);
    padding: 24px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-strong);
    z-index: 1001;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.install-prompt.hidden {
    transform: translateY(200%);
}

.install-content {
    display: flex;
    align-items: center;
    gap: 18px;
}

.install-content>i {
    font-size: 2.2rem;
    color: var(--primary);
}

.install-text h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--dark);
}

.install-text p {
    font-size: 0.9rem;
    color: var(--gray);
}

.install-btn {
    padding: 12px 26px;
    background: var(--gold-gradient);
    color: var(--dark);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
}

.close-install-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--gray-light);
    cursor: pointer;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.lightbox.show {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius);
}

.lightbox-close {
    position: absolute;
    top: 28px;
    right: 40px;
    font-size: 2.8rem;
    color: var(--white);
    cursor: pointer;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    transform: translateX(-150px);
    background: var(--dark);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 2001;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.4s ease;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.toast.success {
    background: var(--emerald);
}

.toast.error {
    background: #b91c1c;
}

.loading {
    text-align: center;
    padding: 60px;
    color: var(--gray);
}

.loading i {
    font-size: 2.5rem;
    margin-bottom: 18px;
    color: var(--primary);
}

/* ==================== ADS/SPONSORS SECTION ==================== */
.ads-section {
    background: var(--cream);
    padding: 80px 0;
}

.ads-banner-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.ads-slider {
    display: flex;
    transition: transform 0.5s ease;
}

.ad-banner {
    min-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: var(--white);
    border-radius: 0 !important;
    padding: 40px;
    box-shadow: var(--shadow-soft);
}

.ad-banner-image {
    border-radius: 0 !important;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.ad-banner-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.ad-banner-content {
    padding: 20px;
}

.ad-banner-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark);
}

.ad-banner-desc {
    color: var(--gray);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 28px;
}

.ad-banner-social {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.ad-social-btn {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    text-decoration: none;
}

.ad-social-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--dark);
    color: var(--white);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.ad-social-btn:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

.ad-social-btn.website {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.ad-social-btn.website:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.ad-social-btn.instagram {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: var(--white);
}

.ad-social-btn.instagram:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 30px rgba(240, 148, 51, 0.4);
}

.ad-social-btn.facebook {
    background: #1877f2;
    color: var(--white);
}

.ad-social-btn.facebook:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 30px rgba(24, 119, 242, 0.4);
}

.ad-social-btn.linkedin {
    background: #0077b5;
    color: var(--white);
}

.ad-social-btn.linkedin:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 119, 181, 0.4);
}

.ads-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.ads-nav {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--elegant-gradient);
    color: var(--white);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.ads-nav:hover {
    transform: scale(1.1);
    background: var(--gold-gradient);
    color: var(--dark);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {

    .booking-wrapper,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
        max-height: 420px;
    }

    .about-section {
        padding: 50px 0;
    }

    .about-content h2 {
        font-size: 1.8rem;
    }

    .about-content>p {
        font-size: 0.95rem;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-map-wrapper {
        height: 350px;
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-stats {
        gap: 40px;
        padding: 28px 36px;
    }
}

@media (max-width: 768px) {

    /* Navbar */
    .navbar {
        background: #ffffff !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
        z-index: 99998 !important;
        position: fixed !important;
        border-bottom: 0.5px solid rgba(0, 0, 0, 0.04) !important;
        height: 81px !important;
        display: flex !important;
        align-items: center !important;
    }

    .navbar .container {
        padding: 12px 20px;
        padding-right: 16px;
        /* Ensure hamburger is not cut */
    }

    .nav-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 36px;
        height: 36px;
        background: transparent;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        gap: 6px;
        padding: 6px;
        margin-right: 4px;
        z-index: 100001;
    }

    .nav-toggle span {
        display: block;
        width: 24px;
        height: 2.5px;
        background: #1e3a5f;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Hide hamburger button when menu is open */
    .nav-toggle.active {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    /* Mobile Sidebar - Premium Full-Screen Design */
    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        right: -10px !important;
        bottom: 0 !important;
        left: auto !important;
        width: calc(85% + 10px) !important;
        max-width: 320px !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: #ffffff !important;
        flex-direction: column !important;
        padding: 0 !important;
        padding-right: 10px !important;
        padding-bottom: 120px !important;
        /* Extra space for logout button */
        margin: 0 !important;
        list-style: none !important;
        box-shadow: -10px 0 50px rgba(0, 0, 0, 0.3) !important;
        z-index: 999999 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        display: none !important;
        align-items: flex-start !important;
        flex-wrap: nowrap !important;
        border-radius: 0 !important;
        visibility: hidden !important;
        opacity: 0 !important;
        transform: translateX(100%) !important;
        transition: transform 0.35s ease, visibility 0s 0.35s, opacity 0.35s !important;
    }


    .nav-menu.active {
        display: flex !important;
        /* Show when active */
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateX(0) !important;
        transition: transform 0.35s ease, visibility 0s, opacity 0.35s !important;
    }

    /* Hide body scrollbar when sidebar is open */
    body.sidebar-open {
        overflow: hidden !important;
    }

    /* Ensure mobile-user-header is first and fully visible */
    .nav-menu .mobile-user-header {
        flex-shrink: 0 !important;
        order: -1 !important;
        margin-top: 0 !important;
    }

    /* Ensure standalone close button is positioned correctly when no user header */
    .nav-menu .nav-close-standalone {
        flex-shrink: 0 !important;
        order: -1 !important;
        margin: 12px 0 0 auto !important;
        position: relative !important;
        top: auto !important;
        right: 12px !important;
    }

    /* Hide pseudo-element header since we now have actual header */
    .nav-menu::before {
        display: none !important;
    }

    /* Sidebar Header with Close Button */
    .nav-menu-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: 70px;
        min-height: 70px;
        background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%) !important;
        padding: 0 20px !important;
        box-sizing: border-box;
        flex-shrink: 0;
        border-bottom: none !important;
        border-radius: 0 !important;
    }

    .nav-menu-header::before {
        display: none !important;
    }

    .nav-menu-header .menu-title {
        color: #ffffff;
        font-size: 1.2rem;
        font-weight: 600;
        letter-spacing: 1px;
    }

    /* Close Button Styling - Positioned at top-left of sidebar */
    .nav-close-btn {
        position: absolute;
        top: 12px;
        left: 12px;
        background: transparent;
        border: none;
        color: #555555;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex !important;
        /* Override global hide rule */
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1.3rem;
        transition: all 0.3s ease;
        z-index: 10;
    }

    .nav-close-btn:hover {
        background: rgba(0, 0, 0, 0.08);
        color: #1e3a5f;
        transform: rotate(90deg);
    }

    /* Menu Items Container */
    .nav-menu li {
        list-style: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        width: 100%;
        margin: 0;
        padding: 0;
        position: relative;
        background: #ffffff;
        flex-shrink: 0 !important;
        /* Prevent items from shrinking, forcing scroll */
    }


    /* Left Accent Bar on Hover */
    .nav-menu li::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(180deg, #1e3a5f 0%, #2d5a87 100%);
        transform: scaleY(0);
        transform-origin: center;
        transition: transform 0.3s ease;
    }

    .nav-menu li:hover::before,
    .nav-menu li:active::before {
        transform: scaleY(1);
    }

    /* Menu Links - Properly Aligned */
    .nav-menu li a {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        padding: 14px 20px !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
        color: #1e3a5f !important;
        background: transparent !important;
        transition: all 0.25s ease !important;
        text-decoration: none;
        gap: 14px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Icon Styling - Force consistent alignment */
    .nav-menu li a i {
        font-size: 1.15rem;
        width: 28px;
        min-width: 28px;
        max-width: 28px;
        flex-shrink: 0;
        text-align: center;
        color: #1e3a5f !important;
        /* Same color for all icons */
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Force all nav-menu li to have same structure (except mobile-user-section) */
    .nav-menu>li:not(.mobile-user-section) {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Hover State */
    .nav-menu li a:hover,
    .nav-menu li a:active {
        background: linear-gradient(90deg, rgba(30, 58, 95, 0.1) 0%, rgba(30, 58, 95, 0.05) 100%) !important;
        color: #1e3a5f !important;
        padding-left: 24px !important;
    }

    .nav-menu li a:hover i,
    .nav-menu li a:active i {
        transform: scale(1.1);
        color: #d97706;
    }

    /* Remove underline effects */
    .nav-menu a::after {
        display: none !important;
    }

    /* Mobile Overlay Background */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.35s ease;
        z-index: 99998;
    }

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

    /* Mobile Login Button Styling - Fixed at bottom of sidebar */
    .nav-auth {
        display: block !important;
        width: 100% !important;
        max-width: 320px !important;
        /* Match sidebar width */
        margin: 0 !important;
        padding: 0 !important;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        background: #ffffff;
        box-sizing: border-box;
        /* Fixed at bottom of sidebar */
        position: fixed !important;
        top: auto !important;
        /* Override any inherited top value */
        bottom: 0 !important;
        right: 0 !important;
        left: auto !important;
        z-index: 100000 !important;
        /* Hidden by default - slide with sidebar */
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Show Login when sidebar is open - nav-auth is inside nav-menu */
    .nav-menu.active .nav-auth {
        transform: translateX(0);
    }

    .nav-auth a {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 16px 20px !important;
        margin: 0 !important;
        /* No margin - full width */
        background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%) !important;
        color: #ffffff !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        gap: 10px;
        border-radius: 0;
        /* No border radius - edge to edge */
        box-sizing: border-box;
        transition: all 0.3s ease;
    }

    .nav-auth a:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
    }

    .nav-auth a i {
        font-size: 1.1rem;
        color: #ffffff !important;
    }

    /* Mobile User Profile Section (when logged in) */
    .mobile-user-section {
        display: none !important;
        width: 100%;
        margin-top: auto !important;
        padding: 15px 20px !important;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        background: rgba(30, 58, 95, 0.03);
        /* No order - appears after Login in DOM */
    }

    .mobile-user-section.active {
        display: block !important;
    }

    .mobile-user-info {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 0;
        margin-bottom: 10px;
    }

    .mobile-user-info i {
        font-size: 2rem;
        color: #1e3a5f;
    }

    .mobile-user-info span {
        font-size: 1rem;
        font-weight: 600;
        color: #1e3a5f;
    }

    .mobile-logout-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 12px;
        background: #dc2626;
        color: #ffffff;
        border: none;
        border-radius: 8px;
        font-size: 0.95rem;
        font-weight: 500;
        gap: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-logout-btn:hover {
        background: #b91c1c;
    }

    /* Calendar nav item - Fix alignment to match other items */
    /* IMPORTANT: display and visibility controlled by JS/global CSS */
    .calendar-nav-item {
        position: static !important;
        /* visibility and display controlled by global CSS rules */
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .calendar-nav-item a {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        padding: 14px 20px !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
        color: #1e3a5f !important;
        background: transparent !important;
        gap: 14px;
        width: 100%;
        box-sizing: border-box;
    }

    .calendar-nav-item a i {
        font-size: 1.15rem;
        width: 28px;
        min-width: 28px;
        text-align: center;
        color: #1e3a5f !important;
    }

    /* Family Directory nav item - Fix alignment */
    /* IMPORTANT: display and visibility controlled by JS/global CSS */
    .family-directory-nav-item {
        position: static !important;
        /* visibility and display controlled by global CSS rules */
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .family-directory-nav-item a {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        padding: 18px 20px !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
        color: #1e3a5f !important;
        background: transparent !important;
        gap: 14px;
        width: 100%;
        box-sizing: border-box;
    }

    .family-directory-nav-item a i {
        font-size: 1.15rem;
        width: 28px;
        min-width: 28px;
        text-align: center;
        color: var(--accent);
    }

    /* Dropdown menu styles for mobile - Professional */
    .nav-dropdown {
        position: relative;
        /* Natural DOM order - dropdown content stays with parent */
    }

    .nav-dropdown>a {
        position: relative;
    }

    .nav-dropdown>a .fa-chevron-down {
        margin-left: auto;
        transition: transform 0.3s ease;
        font-size: 0.8rem;
    }

    .nav-dropdown.active>a .fa-chevron-down {
        transform: rotate(180deg);
    }

    .dropdown-menu {
        display: none;
        position: static !important;
        width: 100% !important;
        background: rgba(30, 58, 95, 0.03) !important;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05) !important;
        padding: 8px 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    /* Only active class controls dropdown on mobile (not hover) */
    .nav-dropdown.active .dropdown-menu {
        display: block !important;
    }

    .dropdown-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    }

    .dropdown-menu li:last-child {
        border-bottom: none;
    }

    .dropdown-menu li a {
        padding: 14px 24px 14px 52px !important;
        font-size: 0.9rem !important;
        color: #4a5568 !important;
        font-weight: 400 !important;
    }

    .dropdown-menu li a:hover {
        background: rgba(201, 162, 39, 0.1) !important;
        padding-left: 56px !important;
    }

    /* Sub-dropdown styles for mobile - DISABLED - SEE END OF FILE */
    /* .sub-dropdown {
        position: relative;
    }

    .sub-dropdown-menu {
        display: none;
        position: static !important;
        width: 100% !important;
        background: #f0f0f0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        max-height: 300px !important;
        overflow-y: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        left: 0 !important;
    }

    .menu-dropdown .sub-dropdown.active > .sub-dropdown-menu,
    .menu-dropdown .sub-dropdown:hover > .sub-dropdown-menu,
    .sub-dropdown.active > .sub-dropdown-menu,
    .sub-dropdown:hover > .sub-dropdown-menu {
        display: block !important;
    }

    .sub-dropdown-menu li {
        padding: 12px 24px 12px 56px !important;
        font-size: 0.9rem !important;
        background: #f0f0f0 !important;
        border-bottom: 1px solid #e0e0e0 !important;
        color: #333 !important;
    }

    .sub-dropdown-menu li:hover {
        background: #e8e8e8 !important;
        color: #c9a227 !important;
    } */

    .sub-arrow {
        transition: transform 0.3s ease;
    }

    .sub-dropdown.active .sub-arrow {
        transform: rotate(90deg) !important;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .hero-stat {
        padding: 18px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .hero-stat:last-child {
        border-bottom: none;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .about-section {
        padding: 40px 0;
    }

    .about-content h2 {
        font-size: 1.6rem;
    }

    .about-feature {
        padding: 14px;
    }

    .about-feature i {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .about-feature h4 {
        font-size: 0.95rem;
    }

    .about-feature p {
        font-size: 0.85rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contact-map iframe {
        height: 350px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-contact p {
        justify-content: center;
    }

    section {
        padding: 80px 0;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .booking-features {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }
}

/* ==================== MOBILE APP-LIKE STYLES ==================== */
@media (max-width: 768px) {

    /* Full width sections */
    .container {
        padding: 0 16px;
    }

    section {
        padding: 60px 0;
    }

    /* First section should have top margin on mobile too */
    section:first-of-type {
        margin-top: 81px;
        /* navbar height */
    }

    /* When notification bar is active on mobile */
    body.has-notification section:first-of-type {
        margin-top: 122px;
        /* navbar + notification */
    }


    /* Navbar - App style */
    .navbar .container {
        padding: 12px 16px;
    }

    .nav-brand {
        font-size: 1.2rem;
        gap: 10px;
    }

    .nav-brand i {
        font-size: 1.3rem;
    }

    /* Hero - Compact */
    .hero-content {
        padding: 100px 16px 60px;
    }

    .hero-badge {
        padding: 8px 16px;
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .hero-buttons {
        gap: 12px;
        margin-bottom: 40px;
    }

    .hero-buttons .btn {
        padding: 14px 24px;
        font-size: 0.9rem;
    }

    .hero-stats {
        padding: 20px;
        gap: 0;
        border-radius: 12px;
    }

    .hero-stat span {
        font-size: 2rem;
    }

    .hero-stat small {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    /* Section headers */
    .section-header {
        margin-bottom: 40px;
    }

    .section-tag {
        padding: 6px 14px;
        font-size: 0.7rem;
        letter-spacing: 2px;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    /* Services */
    .services-grid {
        gap: 20px;
    }

    .service-card {
        padding: 30px 24px;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .service-card h3 {
        font-size: 1.1rem;
    }

    /* Inventory */
    .inventory-controls {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 30px;
    }

    .search-box {
        max-width: 100%;
    }

    .search-box input {
        padding: 14px 20px 14px 48px;
    }

    .inventory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .inventory-item {
        border-radius: 12px;
    }

    .inventory-image {
        height: 100px;
    }

    .inventory-content {
        padding: 12px;
    }

    .inventory-name {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .stock-badge {
        padding: 4px 10px;
        font-size: 0.7rem;
    }

    .inventory-details {
        margin-top: 12px;
        padding-top: 12px;
    }

    .inventory-detail small {
        font-size: 0.65rem;
    }

    .inventory-detail strong {
        font-size: 1rem;
    }

    /* Facilities */
    .facilities-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .facility-card {
        border-radius: 12px;
    }

    .facility-image {
        height: 140px;
    }

    .facility-content {
        padding: 16px;
    }

    .facility-name {
        font-size: 1rem;
    }

    /* Calendar */
    .calendar-box {
        padding: 20px;
        border-radius: 12px;
    }

    .calendar-nav h3 {
        font-size: 1.1rem;
    }

    .calendar-nav button {
        width: 40px;
        height: 40px;
    }

    .calendar-weekdays span {
        font-size: 0.75rem;
        padding: 8px 4px;
    }

    .calendar-day {
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .calendar-legend {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }

    .calendar-legend span {
        font-size: 0.8rem;
    }

    /* Booking Form */
    .booking-wrapper {
        gap: 40px;
    }

    .booking-info h2 {
        font-size: 1.8rem;
    }

    .booking-features {
        gap: 12px;
    }

    .feature {
        padding: 14px 16px;
        font-size: 0.85rem;
    }

    .booking-form {
        padding: 24px;
        border-radius: 12px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    /* Gallery */
    .gallery-grid {
        gap: 12px;
    }

    .gallery-item {
        border-radius: 10px;
    }

    /* About */
    .about-content h2 {
        font-size: 1.8rem;
    }

    .about-feature {
        padding: 16px;
        gap: 14px;
    }

    .about-feature i {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .about-feature h4 {
        font-size: 0.95rem;
    }

    /* Contact */
    .contact-card {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .contact-card i {
        font-size: 1.8rem;
    }

    .contact-card h4 {
        font-size: 1rem;
    }

    /* Footer */
    .footer {
        padding: 50px 0 20px;
    }

    .footer-grid {
        gap: 30px;
    }

    .footer-brand h3 {
        font-size: 1.3rem;
        justify-content: center;
    }

    /* Floating buttons */
    .whatsapp-float {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
        bottom: 24px;
        right: 16px;
    }

    .scroll-top {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.4);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        z-index: 10;
    }

    .ads-slider .slick-prev:hover,
    .ads-slider .slick-next:hover {
        background: rgba(255, 255, 255, 0.5);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .ads-slider .slick-prev:before,
    .ads-slider .slick-next:before {
        font-size: 20px;
        color: var(--text-color);
        /* Or a specific color for the arrows */
    }

    .ads-slider .slick-prev {
        left: 15px;
    }

    .ads-slider .slick-next {
        right: 15px;
    }

    /* Install prompt */
    .install-prompt {
        left: 16px;
        right: 16px;
        bottom: 16px;
        padding: 16px 20px;
        border-radius: 12px;
    }

    .install-content {
        gap: 12px;
    }

    .install-content>i {
        font-size: 1.8rem;
    }

    .install-text h4 {
        font-size: 0.95rem;
    }

    .install-text p {
        font-size: 0.8rem;
    }

    .install-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    /* Toast */
    .toast {
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(150px);
        padding: 14px 20px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .toast.show {
        transform: translateX(0) translateY(0);
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .hero-stat span {
        font-size: 1.6rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
}


/* ==================== ADS SLIDER - UNIFIED BANNER DESIGN ==================== */
.ads-section {
    padding: 15px 0;
    background: var(--cream);
    position: relative;
    overflow: hidden;
    margin-top: 0px;
    /* No margin - should touch the navbar/notification directly */
}

.ads-section.hidden {
    display: none;
}

.ads-banner-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.ads-slider {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Ad Banner - Unified Split Layout */
.ad-banner-split {
    display: none;
    width: 100%;
    min-height: 180px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
}

.ad-banner-split.active {
    display: flex !important;
    flex-direction: row;
    align-items: stretch;
}

/* Left Side - Content */
.ad-banner-left {
    flex: 0 0 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 40px;
    color: #ffffff;
}

.ad-banner-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.3;
    color: #f4d03f;
}

.ad-banner-desc {
    font-size: 1rem;
    margin: 0 0 18px 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.ad-banner-social {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

/* Right Side - Image fills entire right area */
.ad-banner-right {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    overflow: hidden;
    min-height: 280px;
    background: #f8f9fa;
}

/* Image - Full size, no cropping */
.ad-full-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
    object-position: center;
}

.ad-banner-right img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
    object-position: center;
}

/* Social Buttons */
.ad-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.ad-social-btn:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Tooltip for social buttons */
.ad-social-btn::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    pointer-events: none;
}

.ad-social-btn::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: -4px;
}

.ad-social-btn:hover::after,
.ad-social-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

.ad-social-btn.website {
    background: #3b82f6;
}

.ad-social-btn.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.ad-social-btn.facebook {
    background: #1877f2;
}

.ad-social-btn.linkedin {
    background: #0a66c2;
}

/* Navigation Arrows */
.ads-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 10;
    pointer-events: none;
}

.ads-nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #1e3a5f;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
}

.ads-nav:hover {
    background: #f4d03f;
    transform: scale(1.1);
}

.ads-nav:active {
    transform: scale(0.95);
}

.ads-controls.hidden {
    display: none;
}

.ads-nav:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    color: #c9a227;
}

/* Slide indicator dots */
.ads-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

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

.ads-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.ads-dot.active {
    background: var(--white);
    width: 24px;
    border-radius: 4px;
}

/* ==================== NEWS & EVENTS SECTION ==================== */
.news-events-section {
    padding: 15px 0 40px 0;
    background: var(--cream);
}

/* Hide STAY UPDATED tag in news-events section */
.news-events-section .section-tag {
    display: none !important;
}

/* Hide OUR WORK tag in gallery section */
.gallery-section .section-tag {
    display: none !important;
}



/* News Meta & Source */
.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 4px;
    font-weight: 500;
}

.news-source {
    color: #1e3a5f;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.read-more-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #1e3a5f;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border 0.2s;
}

.news-item:hover .read-more-link {
    border-bottom-color: #1e3a5f;
}

.loading-news {
    padding: 30px 0;
    text-align: center;
    color: #666;
    font-style: italic;
}

.news-only-view {
    opacity: 0.2;
    filter: blur(2px);
    pointer-events: none;
    transition: all 0.4s ease;
}

.news-events-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.news-column,
.events-column {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    /* Clip overflowing content */
}

.news-column h3,
.events-column h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-column h3 i,
.events-column h3 i {
    color: var(--accent);
    font-size: 0.9rem;
}

.news-list,
.events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 350px;
    /* Fixed height for scroll */
    overflow-y: auto !important;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-right: 8px;
}

/* Show vertical scrollbar */
.news-list::-webkit-scrollbar,
.events-list::-webkit-scrollbar {
    width: 6px;
    display: block;
}

.news-list::-webkit-scrollbar-track,
.events-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.news-list::-webkit-scrollbar-thumb,
.events-list::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

.news-list,
.events-list {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) #f1f1f1;
}

/* ===== NEWS/EVENT CARD DESIGN ===== */
.news-item,
.event-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    cursor: pointer;
    flex-shrink: 0;
}

/* No hover effect */
.news-item:hover,
.event-item:hover {
    background: #ffffff !important;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Image - Larger, rounded */
.news-image,
.event-image {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    height: 70px;
    min-height: 70px;
    max-height: 70px;
    border-radius: 10px;
    object-fit: fill;
    flex-shrink: 0;
}

/* Content Container */
.news-content,
.event-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Title - Bold, Dark */
.news-content h4,
.event-content h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Description - Gray text */
.news-content p,
.event-content p,
.news-desc-short,
.event-desc-short {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-desc-full,
.event-desc-full {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.45;
}

/* Read More Button */
.read-more-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    display: inline;
}

/* Button Info Small */
.btn-info-small {
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-block;
}

/* Mobile Compact View for News/Events */
@media (max-width: 768px) {
    .news-events-section {
        padding: 10px 0 25px 0 !important;
    }

    .news-events-section .section-header {
        margin-bottom: 25px !important;
    }

    .news-events-section .section-header h2 {
        font-size: 1.4rem !important;
    }

    .news-column h3,
    .events-column h3 {
        font-size: 0.95rem !important;
        margin-bottom: 10px !important;
        padding-bottom: 8px !important;
    }

    .news-item,
    .event-item {
        padding: 10px !important;
        gap: 12px !important;
        border-radius: 10px !important;
    }

    .news-image,
    .event-image {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        min-height: 60px !important;
        max-width: 60px !important;
        max-height: 60px !important;
    }

    .news-content h4,
    .event-content h4 {
        font-size: 0.85rem !important;
        -webkit-line-clamp: 1 !important;
        line-clamp: 1 !important;
    }

    .news-desc-short,
    .event-desc-short {
        font-size: 0.75rem !important;
        -webkit-line-clamp: 1 !important;
        line-clamp: 1 !important;
        margin-bottom: 4px !important;
    }

    .news-meta,
    .event-date {
        font-size: 0.68rem !important;
    }

    .btn-info-small {
        padding: 4px 8px !important;
        font-size: 0.7rem !important;
    }

    .news-list,
    .events-list {
        max-height: 280px !important;
        /* Reduced for compactness */
        gap: 8px !important;
    }
}

.read-more-btn:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Date - Golden accent */
.news-date,
.event-date {
    font-size: 0.75rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    font-weight: 500;
}

.no-data {
    text-align: center;
    color: var(--gray);
    padding: 20px;
    font-style: italic;
}

/* Gallery Category Badge */
.gallery-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==================== RESPONSIVE - NEW SECTIONS ==================== */
@media (max-width: 768px) {
    .ads-section {
        margin-top: 0px;
        /* No margin in mobile - should touch navbar/notification directly */
    }

    /* Fixed height for mobile ads slider */
    .ads-slider {
        height: 400px;
        /* Reduced for mobile */
    }

    .ad-banner-split {
        height: 400px;
        /* Match slider height */
        flex-direction: column;
    }

    .ad-banner-split.active {
        flex-direction: column;
    }

    .ad-banner-left {
        padding: 25px 20px;
        text-align: center;
        align-items: center;
        order: 2;
        flex: none;
        height: auto;
    }

    .ad-banner-left h2 {
        font-size: 1.4rem;
    }

    .ad-banner-left p {
        font-size: 0.9rem;
    }

    .ad-banner-right {
        padding: 0;
        order: 1;
        flex: none;
        width: 100%;
        min-height: 200px;
        height: auto;
        background: #f8f9fa;
    }

    .ad-banner-right img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

    .ad-full-image {
        width: 100%;
        height: 220px;
        object-fit: contain;
    }

    .ad-banner-title {
        font-size: 1.25rem;
        margin-bottom: 8px;
    }

    .ad-banner-desc {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .ad-banner-social {
        justify-content: center;
    }

    .ad-social-btn {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .ads-controls {
        bottom: 10px;
        gap: 12px;
    }

    .ads-nav {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .news-events-section {
        padding: 50px 0;
    }

    .news-events-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .news-column,
    .events-column {
        padding: 20px;
    }

    .news-column h3,
    .events-column h3 {
        font-size: 1.1rem;
    }

    .news-image,
    .event-image {
        width: 60px;
        height: 60px;
    }

    .news-content h4,
    .event-content h4 {
        font-size: 0.9rem;
    }

    section {
        padding: 60px 0;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .ads-slider {
        height: 350px;
        /* Reduced for small mobile */
    }

    .ad-banner-split {
        height: 350px;
    }

    .ad-banner-right {
        height: 180px;
        /* Smaller image on very small screens */
    }

    .ad-banner-left h2 {
        font-size: 1.2rem;
    }

    .ad-banner-left p {
        font-size: 0.85rem;
    }

    .ad-banner {
        grid-template-rows: 42% 58%;
    }

    .ad-banner-image {
        padding: 15px;
    }

    .ad-banner-content {
        padding: 20px 24px;
    }

    .ad-banner-title {
        font-size: 1.4rem;
    }

    .ad-banner-desc {
        font-size: 0.85rem;
        margin-bottom: 16px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .ad-social-btn {
        width: 42px;
        height: 42px;
        font-size: 1.05rem;
        border-radius: 8px;
    }
}

/* ==================== PAGE HEADER - For separate pages ==================== */
/* headerSpacer div handles the fixed header offset */
/* page-header only needs its own internal padding */
.page-header {
    padding: 20px 0 15px;
    background: var(--cream);
    text-align: center;
}

.page-header .section-tag {
    margin-bottom: 16px;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.page-header p {
    color: var(--gray);
    font-size: 1.1rem;
}

.page-header-dark {
    background: var(--dark-gradient);
}

.page-header-dark h1,
.page-header-dark p {
    color: var(--white);
}

.page-header-dark .section-tag {
    border-color: var(--accent-light);
    color: var(--accent-light);
}

/* ==================== GALLERY PAGE ==================== */

/* Year Filter Section */
.gallery-filter-section {
    padding: 25px 0;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.year-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.year-btn {
    padding: 8px 18px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.year-btn:hover {
    border-color: #bbb;
    color: #333;
}

.year-btn.active {
    background: #444;
    color: #fff;
    border-color: #444;
}

/* Gallery Page Section */
.gallery-page-section {
    padding: 40px 0 60px;
    background: #fff;
    min-height: 400px;
}

.gallery-grid-full {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-grid-full .gallery-item {
    position: relative !important;
    overflow: hidden !important;
    cursor: pointer !important;
    background: #f5f5f5 !important;
    border-radius: 4px !important;
    flex: none !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 75% !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
}

.gallery-grid-full .gallery-item:hover {
    transform: none !important;
    box-shadow: none !important;
}

.gallery-grid-full .gallery-item::before,
.gallery-grid-full .gallery-item::after {
    display: none !important;
    content: none !important;
    background: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.gallery-grid-full .gallery-item img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    transform: none !important;
    transition: opacity 0.2s ease !important;
}

.gallery-grid-full .gallery-item:hover img {
    opacity: 0.85 !important;
    transform: none !important;
}

.gallery-grid-full .gallery-caption,
.gallery-grid-full .gallery-category {
    display: none !important;
    visibility: hidden !important;
}

/* No images message */
.gallery-no-images {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    grid-column: 1 / -1;
}

.gallery-no-images i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ccc;
    display: block;
}

.gallery-no-images p {
    font-size: 1.1rem;
}

/* ==================== VIDEO GALLERY ==================== */
.video-grid-full {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.video-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.video-item:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.video-play-overlay i {
    font-size: 4rem;
    color: white;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.video-item:hover .video-play-overlay i {
    transform: scale(1.1);
    opacity: 1;
}

.video-info {
    padding: 15px;
}

.video-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.video-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-modal.show {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.video-modal-content iframe {
    width: 100%;
    height: 100%;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    line-height: 1;
    transition: all 0.3s ease;
}

.video-modal-close:hover {
    transform: scale(1.1);
    color: var(--accent);
}

/* Media Type Filter */
.media-type-filter {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.media-type-btn {
    padding: 12px 30px;
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.media-type-btn:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

.media-type-btn.active {
    background: var(--primary);
    color: white;
}

.media-type-btn i {
    font-size: 1.1rem;
}

/* ==================== NEWS PAGE ==================== */
.news-page-section,
.events-page-section {
    padding: 60px 0;
    background: var(--cream);
}

.news-grid-full,
.events-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-card,
.event-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.news-card:hover,
.event-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.news-card-image,
.event-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-content,
.event-card-content {
    padding: 24px;
}

.news-card-content h3,
.event-card-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.news-card-content p,
.event-card-content p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.news-card-date,
.event-card-date {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==================== ABOUT PAGE ==================== */
.about-page-section {
    padding: 60px 0;
    background: var(--white);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 60px 0;
    padding: 40px;
    background: var(--elegant-gradient);
    border-radius: var(--radius);
}

.stat-item {
    text-align: center;
    color: var(--white);
}

.stat-number {
    display: inline-block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-light);
}

.stat-suffix {
    display: inline-block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 8px;
}

.why-choose-us {
    margin-top: 60px;
}

.why-choose-us h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--dark);
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.reason-card {
    text-align: center;
    padding: 30px;
    background: var(--cream);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.reason-card:hover {
    background: var(--white);
    box-shadow: var(--shadow-medium);
    transform: translateY(-5px);
}

.reason-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.reason-card h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.reason-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ==================== CONTACT PAGE ==================== */
.contact-page-section {
    padding: 8px 0 60px;
    background: var(--cream);
}

/* New 2-Column Layout */
.contact-layout-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
}

.contact-cards-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 20px;
}

.contact-card-item {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.contact-card-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.contact-card-item i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.contact-card-item h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.contact-card-item p,
.contact-card-item a {
    color: var(--gray);
    font-size: 0.95rem;
}

.contact-card-item a:hover {
    color: var(--accent);
}

/* Contact Form Section - Full Width */
.contact-form-section {
    width: 100%;
}

.contact-form-wrapper-full {
    background: var(--white);
    padding: 50px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-medium);
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.form-header h3 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.form-header p {
    color: var(--gray);
    font-size: 1rem;
}

.contact-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark);
}

.contact-form label i {
    color: var(--accent);
    font-size: 0.9rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Old styles for backward compatibility */
.contact-form-map {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-form-wrapper,
.contact-map-wrapper {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.contact-map-wrapper {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.contact-form-wrapper h3,
.contact-map-wrapper h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    color: var(--dark);
}

.contact-map-wrapper h3 {
    display: none;
}

.map-container {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.map-container {
    border-radius: var(--radius);
    overflow: hidden;
}

/* ==================== CROCKERY & FACILITIES PAGE ==================== */
.crockery-page-section,
.facilities-page-section {
    padding: 60px 0;
    background: var(--cream);
}

/* ==================== CALENDAR PAGE ==================== */
.calendar-page-section {
    padding: 20px 0;
    padding-top: 81px;
    /* navbar height only */
    background: var(--white);
}

/* When notification bar is active */
body.has-notification .calendar-page-section {
    padding-top: 122px;
    /* navbar + notification only */
}

.calendar-page-section .container {
    max-width: 1200px;
}

.calendar-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: stretch;
}

.booking-form-section {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.booking-form-section h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.booking-form-section h3 i {
    color: var(--primary);
}

/* Calendar Card - Admin Style */
.calendar-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.calendar-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.calendar-card-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.calendar-card-header h3 i {
    color: var(--primary);
}

.calendar-nav-btns {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cal-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-nav-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.current-month-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    min-width: 150px;
    text-align: center;
}

.calendar-card-body {
    padding: 20px;
}

/* City Selection Message */
.city-selection-message {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    margin-bottom: 20px;
}

.city-selection-message .message-content {
    max-width: 400px;
    margin: 0 auto;
}

.city-selection-message i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 16px;
    display: block;
}

.city-selection-message h4 {
    font-size: 24px;
    color: var(--dark);
    margin-bottom: 12px;
    font-weight: 600;
}

.city-selection-message p {
    font-size: 16px;
    color: var(--gray);
    line-height: 1.6;
}

/* Mobile responsive for city selection message */
@media (max-width: 768px) {
    .city-selection-message {
        padding: 30px 15px;
        margin-bottom: 15px;
    }

    .city-selection-message i {
        font-size: 36px;
        margin-bottom: 12px;
    }

    .city-selection-message h4 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .city-selection-message p {
        font-size: 14px;
    }
}

/* Calendar Grid - Admin Style */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 20px;
}

.calendar-header {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 8px;
}

.calendar-day {
    min-height: 80px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-day:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.15);
}

.calendar-day.other-month {
    background: #f8fafc;
    color: #94a3b8;
}

.calendar-day.today {
    border-color: var(--primary);
    background: #ebf8ff;
}

.calendar-day-number {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.calendar-day.today .calendar-day-number {
    color: var(--primary);
}

/* Calendar Booking Badges - Shows Customer Name */
.calendar-booking {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.calendar-booking.booked {
    background: #faf089;
    color: #744210;
}

.calendar-booking.confirmed {
    background: #bee3f8;
    color: #2c5282;
}

.calendar-booking.completed {
    background: #c6f6d5;
    color: #276749;
}

.calendar-booking.more {
    background: #e2e8f0;
    color: #64748b;
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    gap: 24px;
    justify-content: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #64748b;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.booked {
    background: #ecc94b;
}

.legend-dot.confirmed {
    background: #4299e1;
}

.legend-dot.completed {
    background: #48bb78;
}

/* Booking Form */
.booking-form .form-group {
    margin-bottom: 16px;
}

.booking-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 6px;
}

.booking-form input,
.booking-form select,
.booking-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s;
    background: #fff;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.booking-form textarea {
    resize: vertical;
}

.btn-block {
    width: 100%;
    margin-top: 12px;
    padding: 14px 20px;
}

/* Calendar Responsive */
@media (max-width: 992px) {
    .calendar-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .calendar-card-header {
        flex-direction: column;
        gap: 12px;
    }

    .calendar-nav-btns {
        gap: 8px;
    }

    .current-month-label {
        font-size: 0.9rem;
        min-width: 120px;
    }

    .calendar-grid {
        gap: 2px;
    }

    .calendar-header {
        padding: 8px 4px;
        font-size: 0.75rem;
    }

    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }

    .calendar-day-number {
        font-size: 0.8rem;
    }

    .calendar-booking {
        font-size: 0.6rem;
        padding: 1px 4px;
    }

    .calendar-legend {
        flex-wrap: wrap;
        gap: 12px;
    }

    .legend-item {
        font-size: 0.8rem;
    }
}

/* ==================== RESPONSIVE - PAGES ==================== */
@media (max-width: 992px) {
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-layout-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-form-map,
    .calendar-page-section .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* headerSpacer handles offset, page-header just needs internal padding */
    .page-header {
        padding: 15px 0 20px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .contact-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .contact-layout-grid {
        grid-template-columns: 1fr;
    }

    .contact-card-item {
        padding: 20px;
    }

    .contact-card-item i {
        font-size: 1.5rem;
    }

    .contact-form-wrapper-full {
        padding: 30px 20px;
    }

    .form-header h3 {
        font-size: 1.4rem;
    }

    .form-header i {
        font-size: 2.5rem;
    }

    .gallery-grid-full {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .video-grid-full {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .media-type-filter {
        flex-wrap: wrap;
        gap: 10px;
    }

    .media-type-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .year-filter {
        gap: 8px;
    }

    .year-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .news-grid-full,
    .events-grid-full {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
        padding: 30px 20px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .contact-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .contact-card-item {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-grid-full {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .video-grid-full {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .media-type-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .year-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .gallery-filter-section {
        padding: 20px 0;
    }

    .about-stats,
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== GALLERY CAROUSEL RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .gallery-item {
        flex: 0 0 350px;
        height: 450px;
    }

    .gallery-carousel {
        padding: 20px 50px;
    }
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 60px 0;
    }

    .gallery-item {
        flex: 0 0 300px;
        height: 400px;
    }

    .gallery-carousel {
        padding: 15px 40px;
        gap: 15px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .gallery-caption {
        padding: 20px;
        font-size: 1rem;
    }

    .gallery-category {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .gallery-section {
        padding: 50px 0;
    }

    .gallery-item {
        flex: 0 0 280px;
        height: 380px;
    }

    .gallery-carousel {
        padding: 10px 20px;
        gap: 12px;
    }

    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .gallery-nav.prev {
        left: 5px;
    }

    .gallery-nav.next {
        right: 5px;
    }

    .gallery-caption {
        padding: 15px;
        font-size: 0.9rem;
    }

    .gallery-view-all a {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .gallery-dots {
        margin-top: 20px;
    }
}

/* ==================== ADS FULL WIDTH STYLES ==================== */
.ads-fullwidth {
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

.ads-fullwidth .ads-banner-container {
    max-width: 100vw !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ads-fullwidth .ads-slider {
    max-width: 100vw !important;
    width: 100vw !important;
}

.ads-fullwidth .ad-banner {
    max-width: 100vw !important;
    width: 100vw !important;
    border-radius: 0 !important;
    height: 400px !important;
    display: block;
    overflow: hidden;
}

.ads-fullwidth .ad-banner-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.ads-fullwidth .ad-banner-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}


/* Ad Banner Full Width - Proper Display */
.ad-banner-image-wrapper {
    width: 100vw;
    height: auto;
    min-height: 200px;
    position: relative;
    overflow: hidden;
    display: block;
}

.ad-banner-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain !important;
    display: block;
    background: #f8f9fa;
}

.ad-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 30px;
    z-index: 10;
}

@media (max-width: 768px) {
    .ad-banner-image-wrapper {
        min-height: 150px;
    }

    .ad-banner-img {
        min-height: 150px;
    }

    .ad-banner-overlay {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .ad-banner-image-wrapper {
        min-height: 120px;
    }

    .ad-banner-overlay {
        padding: 15px;
    }
}


/* Responsive Ad Banner */
@media (max-width: 900px) {
    .ad-banner-split.active {
        flex-direction: column;
        min-height: auto;
    }

    .ad-banner-left {
        flex: none;
        width: 100%;
        padding: 25px 30px;
        text-align: center;
        align-items: center;
    }

    .ad-banner-right {
        flex: none;
        width: 100%;
        padding: 15px 30px 25px;
    }

    .ad-full-image {
        max-height: 200px;
    }

    .ad-banner-title {
        font-size: 1.3rem;
    }

    .ad-banner-desc {
        font-size: 0.9rem;
    }

    .ad-banner-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ad-banner-left {
        padding: 20px;
    }

    .ad-banner-right {
        padding: 10px 20px 20px;
    }

    .ad-full-image {
        max-height: 160px;
    }

    .ad-banner-title {
        font-size: 1.1rem;
    }

    .ad-social-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}


.ad-social-btn.website {
    background: #3b82f6;
    color: white;
}

.ad-social-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.ad-social-btn.facebook {
    background: #1877f2;
    color: white;
}

.ad-social-btn.linkedin {
    background: #0077b5;
    color: white;
}

.ad-social-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 968px) {
    .ad-banner-split {
        flex-direction: column;
        max-height: none;
    }

    .ad-banner-left {
        flex: 0 0 auto;
        width: 100%;
        padding: 30px;
    }

    .ad-banner-right {
        flex: 0 0 auto;
        width: 100%;
        min-height: 250px;
        padding: 15px;
    }

    .ad-full-image {
        max-height: 300px;
    }

    .ad-banner-title {
        font-size: 1.5rem;
    }

    .ad-banner-desc {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .ad-banner-left {
        padding: 20px;
    }

    .ad-banner-right {
        min-height: 200px;
    }

    .ad-full-image {
        max-height: 200px;
    }

    .ad-banner-title {
        font-size: 1.3rem;
    }

    .ad-social-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}


/* Ad Slider - One at a time */
.ads-slider {
    position: relative;
    width: 100vw;
    height: 300px;
    /* Reduced height */
    overflow: hidden;
}

.ad-banner-split {
    display: none;
    /* Hide all by default */
    width: 100vw;
    height: 300px;
    /* Reduced height - same as slider */
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8f 100%);
}

.ad-banner-split.active {
    display: flex !important;
    /* Show only active */
    animation: fadeIn 0.5s ease;
}

/* Ad banner left content */
.ad-banner-left {
    flex: 1;
    padding: 30px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.ad-banner-left h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin: 0;
}

.ad-banner-left p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0;
}

/* Ad banner right image */
.ad-banner-right {
    flex: 1;
    height: 300px;
    /* Reduced height */
    overflow: hidden;
    position: relative;
}

.ad-banner-right img {
    width: 100%;
    height: 100%;
    object-fit: fill !important;
    object-position: top center !important;
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Dots indicator */
.ads-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

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

.ads-dot.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

/* ==================== PROFESSIONAL HOMEPAGE BANNER ==================== */
.homepage-banner-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0;
    background: #1e3a5f;
    margin-top: 10px;
}

.homepage-banner-section.hidden {
    display: none;
}

.homepage-banner-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

.homepage-banner-slider {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.homepage-banner-item {
    width: 100%;
    display: none;
    position: relative;
}

.homepage-banner-item.active {
    display: block;
}

/* Smooth Slide Animation */
.homepage-banner-item.slide-in-right {
    animation: slideInRight 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.homepage-banner-item.slide-in-left {
    animation: slideInLeft 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.homepage-banner-item.fade-in {
    animation: bannerFadeZoom 0.8s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bannerFadeZoom {
    from {
        opacity: 0;
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.homepage-banner-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.homepage-banner-item img {
    width: 100%;
    height: auto;
    max-height: 450px;
    display: block;
    margin: 0;
    border-radius: 0;
    object-fit: contain;
    /* Show FULL image without cropping */
    object-position: center;
    /* Center the image */
    background: #1e3a5f;
    /* Background color for any empty space */
}

.homepage-banner-item:hover img {
    transform: scale(1.01);
}

/* Navigation Arrows - Professional Style */
.homepage-banner-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 -10px;
    pointer-events: none;
    z-index: 10;
}

.banner-nav {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    margin: 0 15px;
}

.banner-nav::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.banner-nav:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.15);
}

.banner-nav:hover::before {
    opacity: 1;
}

.banner-nav:active {
    transform: scale(1.05);
}

/* Dots Indicator - Modern Style */
.homepage-banner-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
}

.banner-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.banner-dot.active {
    background: var(--accent);
    width: 35px;
    border-radius: 6px;
    box-shadow: 0 0 15px rgba(201, 162, 39, 0.5);
}

/* Progress Bar Animation */
.banner-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 0 0 20px 20px;
    animation: progressBar 5s linear infinite;
}

@keyframes progressBar {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .homepage-banner-section {
        padding: 0;
    }

    .homepage-banner-container {
        padding: 0;
    }

    .homepage-banner-slider {
        border-radius: 0;
    }

    .banner-nav {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    .homepage-banner-section {
        padding: 0;
    }

    .homepage-banner-container {
        padding: 0;
    }

    .homepage-banner-slider {
        border-radius: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }

    .homepage-banner-item img {
        height: auto;
        max-height: 280px;
        object-fit: contain;
        /* Show FULL image on mobile */
        object-position: center;
    }

    .ads-fullwidth .ad-banner {
        height: 300px !important;
    }

    .banner-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin: 0 8px;
    }

    .homepage-banner-dots {
        bottom: 15px;
        padding: 8px 15px;
        gap: 10px;
    }

    .banner-dot {
        width: 10px;
        height: 10px;
    }

    .banner-dot.active {
        width: 28px;
    }
}

@media (max-width: 480px) {
    .homepage-banner-section {
        padding: 0;
    }

    .homepage-banner-item img {
        height: auto;
        max-height: 180px;
        object-fit: contain;
        /* Show FULL image on small mobile */
        object-position: center;
    }

    .ads-fullwidth .ad-banner {
        height: 200px !important;
    }

    .homepage-banner-container {
        padding: 0;
    }

    .homepage-banner-slider {
        border-radius: 0;
    }
}

.banner-nav {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
    margin: 0 5px;
}

.homepage-banner-dots {
    bottom: 10px;
    padding: 6px 12px;
    gap: 8px;
}

.banner-dot {
    width: 8px;
    height: 8px;
}

.banner-dot.active {
    width: 22px;
}


/*==================== LOGIN/USER DROPDOWN STYLES ====================*/
.nav-auth {
    margin-left: auto;
    /* Prevent layout shift when switching between login/user dropdown */
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Hide nav-auth when logged in - JS sets inline style */
.nav-auth.hidden,
.nav-auth[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
}

/* DESKTOP: Hide mobile logout button - only show user dropdown with logout inside */
@media (min-width: 769px) {

    .nav-logout,
    #navLogout,
    div.nav-logout {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

.nav-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px !important;
    background: linear-gradient(135deg, #1e3a5f, #2d5a87);
    color: white !important;
    border-radius: 30px;
    font-weight: 600 !important;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
}

.nav-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.4);
    background: linear-gradient(135deg, #162d4a, #1e3a5f);
}

.nav-login-btn::after {
    display: none !important;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
    display: none;
    padding-right: 0;
    min-width: 0;
    z-index: 1001;
}

/* When user dropdown is shown */
.user-dropdown[style*="display: flex"],
.user-dropdown[style*="display:flex"] {
    display: flex !important;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.2);
    min-width: 0;
    flex-shrink: 0;
}

.user-dropdown-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    display: block;
}

.user-dropdown-btn:hover {
    background: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.user-dropdown-btn i:first-child {
    font-size: 1rem;
}

.user-dropdown-btn i:last-child {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
}

.user-dropdown.active .user-dropdown-btn i:last-child {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: white;
    border-radius: 0;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1050;
    overflow: hidden;
}

.user-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 15px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
}

.user-dropdown-header i {
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 50%;
    color: white !important;
}

.user-dropdown-header .user-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: white !important;
}

.user-dropdown-header .user-email {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-top: 2px;
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    color: #333;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.user-dropdown-menu a:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #f5f0ff 100%);
    color: #667eea;
}

.user-dropdown-menu a i {
    width: 18px;
    color: #888;
    font-size: 0.9rem;
}

.user-dropdown-menu a:hover i {
    color: #667eea;
}

.user-dropdown-menu hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 0;
}

.user-dropdown-menu .logout-link {
    color: #e74c3c;
}

.user-dropdown-menu .logout-link:hover {
    background: linear-gradient(135deg, #fff5f5 0%, #ffefef 100%);
    color: #c0392b;
}

.user-dropdown-menu .logout-link i {
    color: #e74c3c;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-auth {
        /* Fixed at bottom of sidebar */
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        right: 0 !important;
        left: auto !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        z-index: 100000 !important;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-menu.active .nav-auth {
        transform: translateX(0) !important;
    }

    .nav-auth.hidden,
    .nav-auth[style*="display: none"] {
        display: none !important;
        visibility: hidden !important;
    }

    .nav-login-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px !important;
    }

    .user-dropdown {
        position: fixed;
        bottom: 80px;
        right: 16px;
        margin-left: 0;
        z-index: 999;
    }

    .user-dropdown[style*="display: flex"] {
        display: flex !important;
    }

    .user-dropdown-btn {
        width: 50px;
        height: 50px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        box-shadow: 0 4px 20px rgba(255, 75, 110, 0.4);
    }

    .user-dropdown-btn span,
    .user-dropdown-btn i:last-child {
        display: none;
    }

    .user-dropdown-btn i:first-child {
        font-size: 1.4rem;
    }

    .user-dropdown-menu {
        right: 0;
        bottom: calc(100% + 10px);
        top: auto;
        transform: translateY(10px);
    }

    .user-dropdown.active .user-dropdown-menu {
        transform: translateY(0);
    }
}

/* ==================== COMBINED ADS & BANNER SECTION (NEW) ==================== */
.ads-banner-combined-section {
    padding: 3px 0 60px;
    background: var(--cream);
}

.ads-banner-combined-section .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-subtitle i {
    color: var(--accent);
}

/* Ads Wrapper */
.combined-ads-wrapper,
.combined-banner-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.combined-ads-slider-container,
.combined-banner-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

/* Ads Slider */
.combined-ads-slider {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.combined-ads-slider .ad-banner-split {
    display: none;
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8f 100%);
}

.combined-ads-slider .ad-banner-split.active {
    display: flex !important;
    animation: fadeIn 0.5s ease;
}

.combined-ads-slider .ad-banner-left {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.combined-ads-slider .ad-banner-left h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin: 0;
}

.combined-ads-slider .ad-banner-left p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin: 0;
}

.combined-ads-slider .ad-banner-right {
    flex: 1;
    height: 280px;
    overflow: hidden;
}

.combined-ads-slider .ad-banner-right img {
    width: 100%;
    height: 100%;
    object-fit: fill !important;
    object-position: top center !important;
}

/* Banner Slider */
.combined-banner-slider {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.combined-banner-slider .homepage-banner-item {
    display: none;
    width: 100%;
    height: 280px;
}

.combined-banner-slider .homepage-banner-item.active {
    display: block;
}

.combined-banner-slider .homepage-banner-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-sm);
}

/* Navigation Buttons */
.combined-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.combined-nav:hover {
    background: var(--accent);
    color: var(--dark);
    transform: translateY(-50%) scale(1.1);
}

.combined-nav.prev {
    left: 10px;
}

.combined-nav.next {
    right: 10px;
}

/* Banner Dots */
.combined-banner-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

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

.combined-banner-dots .banner-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 1024px) {
    .ads-banner-combined-section .container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .ads-banner-combined-section {
        padding: 3px 0 40px;
    }

    .combined-ads-slider,
    .combined-banner-slider,
    .combined-ads-slider .ad-banner-split,
    .combined-banner-slider .homepage-banner-item,
    .combined-banner-slider .homepage-banner-item img {
        height: auto;
        min-height: 280px;
    }

    .combined-ads-slider .ad-banner-split {
        flex-direction: column;
        height: auto !important;
        min-height: 280px;
    }

    .combined-ads-slider .ad-banner-left {
        order: 2;
        padding: 16px 20px;
        flex: 0 0 auto;
        width: 100%;
    }

    .combined-ads-slider .ad-banner-left h2 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .combined-ads-slider .ad-banner-left p {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    .combined-ads-slider .ad-banner-right {
        order: 1;
        height: 140px;
        flex: 0 0 140px;
        width: 100%;
    }

    .combined-nav {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {

    .combined-ads-slider,
    .combined-banner-slider,
    .combined-ads-slider .ad-banner-split,
    .combined-banner-slider .homepage-banner-item,
    .combined-banner-slider .homepage-banner-item img {
        height: 200px;
    }

    .combined-ads-wrapper,
    .combined-banner-wrapper {
        padding: 16px;
    }
}


/* ==================== ADS & BANNER SECTIONS - 70% WIDTH (SEPARATE) ==================== */

/* Ads Section - Full Width */
.ads-section-contained {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 0;
    margin-top: 0 !important;
    background: transparent;
    /* Changed from cream to transparent - no gap visible */
    display: flex;
    justify-content: center;
}

/* When notification bar is active */
body.has-notification .ads-section-contained {
    margin-top: 0 !important;
    /* Gap handled by notification bar margin-bottom */
}

.ads-contained-wrapper {
    width: 70%;
    max-width: 1200px;
    position: relative;
    background: #fff;
    border-radius: 0;
    padding: 2px;
    margin-top: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(201, 162, 39, 0.3);
    overflow: hidden;
}

.ads-slider-contained {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-radius: 0;
    box-shadow: var(--shadow-medium);
}

.ads-slider-contained .ad-banner-split {
    display: none;
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.ads-slider-contained .ad-banner-split.active {
    display: flex !important;
    height: 100%;
    align-items: stretch;
    animation: fadeIn 0.5s ease;
}

.ads-slider-contained .ad-banner-left {
    flex: 1;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.ads-slider-contained .ad-banner-left h2 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin: 0;
}

.ads-slider-contained .ad-banner-left p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0;
}

.ads-slider-contained .ad-banner-right {
    flex: 1;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e293b;
    padding: 0;
}

.ads-slider-contained .ad-banner-right img {
    width: 100%;
    height: 100%;
    object-fit: fill !important;
    /* Changed from cover to fill to prevent cutting */
    object-position: top center !important;
}

/* Ad Social Buttons */
.ad-banner-social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.ad-social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.ad-social-btn.website {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ad-social-btn.instagram {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.ad-social-btn.facebook {
    background: #1877f2;
}

.ad-social-btn.linkedin {
    background: #0077b5;
}

.ad-social-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ========================================
   ADS SECTION - FULL WIDTH
   ======================================== */
.ads-section-contained {
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
}

.ads-contained-wrapper {
    width: 100%;
    max-width: 100%;
    position: relative;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: none;
}

.ads-slider-contained {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.ads-slider-contained .ad-item {
    display: none;
    width: 100%;
    height: 300px;
}

.ads-slider-contained .ad-item.active {
    display: block;
}

.ads-slider-contained .ad-item img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    object-position: center;
    background: #f8fafc;
}

.ads-nav-contained {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.ads-nav-contained:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.ads-nav-contained.prev {
    left: 15px;
}

.ads-nav-contained.next {
    right: 15px;
}

.ads-nav-contained .arrow-icon {
    font-size: 1.8rem;
    color: #333;
    line-height: 1;
}

/* ========================================
   BANNER SECTION - FULL WIDTH
   ======================================== */
.banner-section-contained {
    padding: 0 0 15px;
    margin-top: 0;
    background: var(--cream);
    display: flex;
    justify-content: center;
}

.banner-contained-wrapper {
    width: 70%;
    max-width: 1200px;
    position: relative;
    background: #fff;
    border-radius: 3px;
    padding: 2px;
    margin-top: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(201, 162, 39, 0.3);
}

END BACKUP */

/* Banner Section - Full Width */
.banner-section-contained {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 0;
    margin-top: 0;
    background: transparent;
}

.banner-contained-wrapper {
    width: 100vw;
    max-width: none;
    position: relative;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border: none;
}

.banner-slider-contained {
    position: relative;
    width: 100vw;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
}

.banner-slider-contained .homepage-banner-item {
    display: none;
    width: 100%;
}

.banner-slider-contained .homepage-banner-item.active {
    display: block;
}

.banner-slider-contained .homepage-banner-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
}

/* Banner Dots */
.banner-dots-contained {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.banner-dot.active {
    background: var(--accent);
    border-color: white;
    transform: scale(1.2);
}

.banner-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Navigation Buttons - Shared Glassmorphism Style */
.ads-nav-contained,
.banner-nav-contained,
.gallery-nav,
.glass-back-btn {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    color: #333;
    padding: 0;
    outline: none;
}

.glass-back-btn {
    position: fixed;
    top: calc(var(--navbar-height) + 15px);
    left: 15px;
    width: 44px;
    height: 44px;
    z-index: 10001;
    /* Higher than navbar */
    background: rgba(255, 255, 255, 0.25);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    color: #1a1a1a;
}

.glass-back-btn {
    display: none !important;
}

.glass-back-btn.hidden {
    display: none !important;
}

.glass-back-btn:hover,
.banner-nav-contained:hover,
.ads-nav-contained:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.7);
}

.glass-back-btn:active,
.banner-nav-contained:active,
.ads-nav-contained:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.2);
}

/* Home Banner Arrows (Centered) */
.banner-nav-contained {
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
}

/* Ad Section Arrows (Moved to Bottom) */
.ads-nav-contained {
    bottom: 20px;
    top: auto;
    transform: none;
    width: 40px;
    height: 40px;
}

/* Lock Unlock Animation - Shake and glow like unlocking */
@keyframes unlockPulse {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }

    10% {
        transform: rotate(-8deg) scale(1.08);
        box-shadow: 0 6px 25px rgba(255, 255, 255, 0.5);
    }

    20% {
        transform: rotate(8deg) scale(1.08);
        box-shadow: 0 6px 25px rgba(255, 255, 255, 0.5);
    }

    30% {
        transform: rotate(-8deg) scale(1.08);
        box-shadow: 0 6px 25px rgba(255, 255, 255, 0.5);
    }

    40% {
        transform: rotate(0deg) scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }
}

.banner-nav-contained:hover {
    background: rgba(255, 255, 255, 0.45);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

.ads-nav-contained:hover {
    background: rgba(255, 255, 255, 0.45);
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

.arrow-icon {
    color: #333;
    font-size: 24px;
    font-weight: 700;
    user-select: none;
    line-height: 1;
}

.ads-nav-contained.prev,
.banner-nav-contained.prev {
    left: 10px;
}

.ads-nav-contained.next,
.banner-nav-contained.next {
    right: 10px;
}

/* Banner Dots */
.banner-dots-contained {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

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

.banner-dots-contained .banner-dot.active {
    background: white;
    width: 28px;
    border-radius: 5px;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {

    .ads-contained-wrapper,
    .banner-contained-wrapper {
        width: 100%;
        max-width: 100%;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {

    /* Ads section - full width in mobile */
    .ads-section-contained {
        padding: 0;
        /* No padding - should touch navbar/notification directly */
        width: 100%;
    }

    /* Banner section - full width in mobile */
    .banner-section-contained {
        padding: 0 0 10px;
        width: 100%;
    }

    /* Full width wrappers - no side spacing */
    .ads-contained-wrapper,
    .banner-contained-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* Remove border radius for full-screen edge-to-edge display */
    .ads-slider-contained,
    .banner-slider-contained {
        border-radius: 0;
        box-shadow: none;
    }

    .ads-slider-contained,
    .banner-slider-contained,
    .ads-slider-contained .ad-banner-split,
    .banner-slider-contained .homepage-banner-item {
        height: auto;
        min-height: 200px;
        border-radius: 0;
    }

    /* Mobile banner image - show full image without cropping */
    .banner-slider-contained .homepage-banner-item img {
        width: 100%;
        height: auto;
        min-height: 200px;
        object-fit: contain;
        object-position: center;
        background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    }

    .ads-slider-contained .ad-banner-split {
        flex-direction: column;
        height: auto !important;
        min-height: 280px;
    }

    .ads-slider-contained .ad-banner-left {
        order: 2;
        padding: 20px;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .ads-slider-contained .ad-banner-left h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .ads-slider-contained .ad-banner-left p {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .ads-slider-contained .ad-banner-right {
        order: 1;
        height: 180px;
        flex: 0 0 180px;
        border-radius: 0;
    }

    .ads-slider-contained .ad-banner-right img {
        border-radius: 0;
    }

    .banner-nav-contained {
        width: 36px;
        height: 36px;
    }

    .ads-nav-contained {
        width: 32px;
        height: 32px;
        bottom: 15px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {

    /* Full width on small mobile too */
    .ads-contained-wrapper,
    .banner-contained-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        border-radius: 0;
    }

    .ads-slider-contained,
    .banner-slider-contained,
    .ads-slider-contained .ad-banner-split,
    .banner-slider-contained .homepage-banner-item {
        height: auto;
        min-height: 180px;
    }

    /* Small mobile banner image - show full image without cropping */
    .banner-slider-contained .homepage-banner-item img {
        width: 100%;
        height: auto;
        min-height: 180px;
        object-fit: contain;
        object-position: center;
        background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    }

    .ads-slider-contained .ad-banner-split {
        flex-direction: column !important;
        height: auto !important;
        min-height: 300px;
    }

    .ads-slider-contained .ad-banner-left {
        order: 2;
        padding: 16px 20px;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .ads-slider-contained .ad-banner-right {
        order: 1;
        height: 130px;
        flex: 0 0 130px;
    }

    .ads-slider-contained .ad-banner-left h2 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .ads-slider-contained .ad-banner-left p {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    .ad-banner-social {
        margin-top: 10px;
    }

    .ad-social-btn {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }
}

/*
 ==================== IMAGE OPTIMIZATION & ASPECT RATIO ==================== */

/* Ensure all images maintain proper aspect ratios and quality */
.inventory-item img,
.facility-card img,
.gallery-item img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Inventory Images - Optimized for product display */
.inventory-image {
    aspect-ratio: 4/3;
    object-position: center;
}

/* Facility Images - Optimized for venue/facility display */
.facility-image {
    aspect-ratio: 16/9;
    object-position: center;
}

/* Gallery Images - Optimized for showcase */
.gallery-item img {
    aspect-ratio: 4/5;
    object-position: center;
}

/* Ads Section Images */
.ad-image,
.ads-carousel img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    aspect-ratio: 16/9;
    border-radius: 0 !important;
    transform: none !important;
    transition: none !important;
}

/* Disable ad hover effects */
.ad-image:hover,
.ads-carousel img:hover {
    transform: none !important;
}

/* Banner Images */
.banner-image,
#homepage-banner img {
    width: 100%;
    height: 100%;
    max-height: 500px;
    object-fit: fill;
    aspect-ratio: 21/9;
    border-radius: 0 !important;
    transform: none !important;
    transition: none !important;
}

/* Disable any hover effects */
#homepage-banner:hover img,
.banner-image:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* News/Events Images */
.news-image,
.event-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    aspect-ratio: 16/9;
    border-radius: var(--radius-sm);
}

/* Logo Images */
.nav-brand img,
.site-logo {
    aspect-ratio: 1/1;
    object-fit: cover;
}

/* Responsive Image Adjustments */
@media (max-width: 768px) {
    .inventory-image {
        height: 180px;
    }

    .facility-image {
        height: 200px;
    }

    .banner-image,
    #homepage-banner img {
        max-height: 300px;
        aspect-ratio: 16/9;
    }

    .gallery-item {
        flex: 0 0 280px;
        height: 380px;
    }
}

@media (max-width: 480px) {
    .inventory-image {
        height: 160px;
    }

    .facility-image {
        height: 180px;
    }

    .banner-image,
    #homepage-banner img {
        max-height: 200px;
    }

    .gallery-item {
        flex: 0 0 240px;
        height: 320px;
    }
}

/* Image Loading States */
img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Image Error Handling */
img[src=""],
img:not([src]) {
    opacity: 0;
}

/* Prevent image distortion */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* High DPI Display Optimization */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .inventory-image,
    .facility-image,
    .gallery-item img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ==================== LAYOUT SHIFT PREVENTION ==================== */
/* Prevent layout shift when navigating between pages */
* {
    /* Prevent text rendering changes from causing layout shift */
    text-rendering: optimizeSpeed;
}

/* Ensure consistent navbar width across all pages */
.navbar,
.navbar .container {
    contain: layout style;
}

/* Prevent nav menu items from causing layout shift */
.nav-menu li,
.nav-menu a {
    contain: layout;
}

/* Prevent calendar and family directory nav items from causing layout shift */
/* Hidden by default - completely removed from layout */
.calendar-nav-item,
.family-directory-nav-item {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* When visible (inline style sets display: block) */
.calendar-nav-item[style*="display: block"],
.family-directory-nav-item[style*="display: block"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    height: auto !important;
    overflow: visible !important;
}

/* Smooth transitions for elements that show/hide */
.nav-auth,
.user-dropdown,
.calendar-nav-item {
    transition: opacity 0.15s ease;
}

/* Prevent notification bar from causing content jump */
.notification-bar {
    contain: layout style;
}

/* Ensure first content section has stable positioning */
.ads-section-contained,
.ads-section,
.page-header {
    contain: layout;
}

/* Prevent dropdown menus from affecting layout */
.dropdown-menu,
.sub-dropdown-menu,
.user-dropdown-menu {
    contain: layout style paint;
}

/* Stable scrollbar - prevent horizontal shift by always reserving space */
html {
    width: 100%;
}

/* Prevent font loading from causing layout shift */
body {
    font-synthesis: none;
}

/* Ensure images don't cause layout shift */
img {
    content-visibility: auto;
}

/* ==================== CRITICAL: PREVENT PAGE NAVIGATION SHAKE ==================== */
/* Fixed height navbar - prevents any shake */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 81px !important;
    display: flex !important;
    align-items: center !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Ensure nav container doesn't shift */
.navbar>.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Nav brand - prevent text rendering issues */
.nav-brand,
.nav-brand span,
.nav-brand i {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Nav items - only color transitions, no padding/margin changes */
.nav-menu a {
    transition: color 0.2s ease, background-color 0.2s ease !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dropdown absolute position - doesn't affect header height */
.dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    margin-top: 0 !important;
}


/* Ensure page content doesn't affect navbar */
main,
section:first-of-type,
.page-header,
.ads-section-contained {
    transform: none;
    will-change: auto;
}



/* ==================== CRITICAL FIX: Sub-dropdown menu visibility ==================== */
/* This section ensures sub-dropdown menus are visible on hover */

/* Desktop: Show on hover */
@media (min-width: 769px) {

    .sub-dropdown:hover>.sub-dropdown-menu,
    .sub-dropdown.active>.sub-dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
    }
}

/* Mobile: Show on hover and active */
@media (max-width: 768px) {

    .sub-dropdown:hover>.sub-dropdown-menu,
    .sub-dropdown.active>.sub-dropdown-menu,
    .menu-dropdown .sub-dropdown:hover>.sub-dropdown-menu,
    .menu-dropdown .sub-dropdown.active>.sub-dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Ensure list items are visible */
    .sub-dropdown-menu li {
        display: block !important;
        padding: 10px 20px 10px 50px !important;
        color: #333 !important;
        background: #f5f5f5 !important;
        border-bottom: 1px solid #e0e0e0 !important;
    }

    .sub-dropdown-menu li:hover {
        background: #e8e8e8 !important;
        color: #c9a227 !important;
    }
}


/* ==================== NEW MEGAMENU STYLES ==================== */
/* This replaces the old nested dropdown with a simpler megamenu */

.has-megamenu {
    position: relative;
}

.megamenu-toggle {
    cursor: pointer;
}

.megamenu-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 15px;
    display: none;
    z-index: 9999;
    min-width: 400px;
    gap: 20px;
}

/* Show megamenu on hover */
.has-megamenu:hover .megamenu-content {
    display: flex !important;
}

/* Show megamenu when active (for mobile click) */
.has-megamenu.active .megamenu-content {
    display: flex !important;
}

.megamenu-column {
    flex: 1;
    min-width: 150px;
}

.megamenu-heading {
    font-weight: 600;
    color: #1e3a5f;
    padding: 8px 10px;
    border-bottom: 2px solid #c9a227;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.megamenu-heading i {
    color: #c9a227;
    margin-right: 8px;
}

.megamenu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}

.megamenu-list li {
    padding: 8px 10px;
    font-size: 0.85rem;
    color: #555;
    cursor: default;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.megamenu-list li:hover {
    background: rgba(201, 162, 39, 0.1);
    color: #1e3a5f;
}

/* Scrollbar for megamenu list */
.megamenu-list::-webkit-scrollbar {
    width: 5px;
}

.megamenu-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.megamenu-list::-webkit-scrollbar-thumb {
    background: #c9a227;
    border-radius: 5px;
}

/* Mobile responsive megamenu */
@media (max-width: 768px) {
    .megamenu-content {
        position: static;
        width: 100%;
        min-width: 100%;
        flex-direction: column;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        background: #f5f5f5;
    }

    .has-megamenu:hover .megamenu-content {
        display: none !important;
    }

    .has-megamenu.active .megamenu-content {
        display: flex !important;
    }

    .megamenu-column {
        border-bottom: 1px solid #e0e0e0;
        padding: 10px 15px;
    }

    .megamenu-heading {
        padding: 5px 0;
        font-size: 0.9rem;
    }

    .megamenu-list {
        max-height: 200px;
    }

    .megamenu-list li {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
}


/* ==================== NEW NESTED DROPDOWN STYLES ==================== */
/* Clean nested dropdown - Menu > Crockery/Facilities > Items list */

.nav-dropdown-new {
    position: relative;
}

.dropdown-toggle-new {
    cursor: pointer;
}

/* First level dropdown (Crockery, Facilities) */
.dropdown-menu-new {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    padding: 8px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Show first dropdown on hover */
.nav-dropdown-new:hover>.dropdown-menu-new {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-dropdown-new {
    position: relative;
}

.sub-toggle-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.sub-toggle-new:hover {
    background: #f5f5f5;
    color: #c9a227;
}

.sub-toggle-new i:first-child {
    color: #c9a227;
    margin-right: 10px;
    width: 18px;
}

.sub-toggle-new .arrow-icon {
    font-size: 0.7rem;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.sub-dropdown-new:hover .arrow-icon {
    transform: translateX(3px);
}

/* Second level dropdown (Items list) */
.sub-menu-new {
    position: absolute;
    left: 100%;
    top: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

/* Show second dropdown on hover */
.sub-dropdown-new:hover>.sub-menu-new {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.sub-menu-new li {
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #555;
    cursor: default;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.sub-menu-new li:last-child {
    border-bottom: none;
}

.sub-menu-new li:hover {
    background: rgba(201, 162, 39, 0.1);
    color: #1e3a5f;
    padding-left: 20px;
}

/* Scrollbar styling */
.sub-menu-new::-webkit-scrollbar {
    width: 5px;
}

.sub-menu-new::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.sub-menu-new::-webkit-scrollbar-thumb {
    background: #c9a227;
    border-radius: 5px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .dropdown-menu-new {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: #f9f9f9;
    }

    .nav-dropdown-new:hover>.dropdown-menu-new {
        display: none;
    }

    .nav-dropdown-new.active>.dropdown-menu-new {
        display: block;
    }

    .sub-menu-new {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: #f0f0f0;
        max-height: none;
    }

    .sub-dropdown-new:hover>.sub-menu-new {
        display: none;
    }

    .sub-dropdown-new.active>.sub-menu-new {
        display: block;
    }

    .sub-toggle-new {
        padding: 14px 20px 14px 30px;
    }

    .sub-menu-new li {
        padding: 12px 20px 12px 50px;
    }
}


/* ==================== FINAL FIX: Original Nested Dropdown ==================== */
/* This CSS ensures the original dropdown structure works on all pages */

/* Reset any conflicting styles */
.nav-dropdown .dropdown-menu.menu-dropdown {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    min-width: 180px !important;
    padding: 8px 0 !important;
    list-style: none !important;
    margin: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
    z-index: 9999 !important;
}

/* Show dropdown on hover */
.nav-dropdown:hover>.dropdown-menu.menu-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Sub-dropdown container */
.menu-dropdown .sub-dropdown {
    position: relative !important;
}

/* Sub-dropdown toggle link */
.menu-dropdown .sub-dropdown-toggle {
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px !important;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.menu-dropdown .sub-dropdown-toggle:hover {
    background: #f5f5f5 !important;
    color: #c9a227 !important;
}

.menu-dropdown .sub-dropdown-toggle i:first-child {
    color: #c9a227 !important;
    margin-right: 10px !important;
    width: 18px !important;
}

.menu-dropdown .sub-dropdown-toggle .sub-arrow {
    font-size: 0.7rem !important;
    margin-left: auto !important;
    padding-left: 15px !important;
}

/* Sub-dropdown menu (items list) - DISABLED - SEE END OF FILE FOR WORKING VERSION */
/* .menu-dropdown .sub-dropdown-menu {
    position: absolute !important;
    left: 100% !important;
    top: 0 !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    min-width: 200px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    padding: 8px 0 !important;
    list-style: none !important;
    margin: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(-10px) !important;
    transition: all 0.3s ease !important;
    z-index: 10000 !important;
    display: block !important;
} */

/* Show sub-dropdown on hover - DISABLED */
/* .menu-dropdown .sub-dropdown:hover > .sub-dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
} */

/* Sub-dropdown menu items */
.menu-dropdown .sub-dropdown-menu li {
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
    color: #555 !important;
    cursor: default !important;
    border-bottom: 1px solid #f0f0f0 !important;
    transition: all 0.2s ease !important;
    display: block !important;
}

.menu-dropdown .sub-dropdown-menu li:last-child {
    border-bottom: none !important;
}

.menu-dropdown .sub-dropdown-menu li:hover {
    background: rgba(201, 162, 39, 0.15) !important;
    color: #1e3a5f !important;
    padding-left: 20px !important;
}

/* Scrollbar for sub-dropdown */
.menu-dropdown .sub-dropdown-menu::-webkit-scrollbar {
    width: 5px;
}

.menu-dropdown .sub-dropdown-menu::-webkit-scrollbar-thumb {
    background: #c9a227;
    border-radius: 5px;
}

/* Mobile responsive - keep click behavior */
@media (max-width: 768px) {
    .nav-dropdown .dropdown-menu.menu-dropdown {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        display: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: #f9f9f9 !important;
    }

    .nav-dropdown:hover>.dropdown-menu.menu-dropdown {
        display: none !important;
    }

    .nav-dropdown.active>.dropdown-menu.menu-dropdown {
        display: block !important;
    }

    .menu-dropdown .sub-dropdown-menu {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        display: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: #f0f0f0 !important;
        max-height: none !important;
        left: 0 !important;
    }

    .menu-dropdown .sub-dropdown:hover>.sub-dropdown-menu {
        display: none !important;
    }

    .menu-dropdown .sub-dropdown.active>.sub-dropdown-menu {
        display: block !important;
    }

    .menu-dropdown .sub-dropdown-toggle {
        padding: 14px 20px 14px 30px !important;
    }

    .menu-dropdown .sub-dropdown-menu li {
        padding: 12px 20px 12px 50px !important;
    }
}


/* ==================== FINAL OVERRIDE: Force Sub-Dropdown Visibility ==================== */
/* This is the FINAL fix - highest priority */

/* Desktop: Force show on hover */
@media (min-width: 769px) {

    .menu-dropdown .sub-dropdown:hover>.sub-dropdown-menu,
    .sub-dropdown:hover>.sub-dropdown-menu,
    .sub-dropdown:hover>#crockeryList,
    .sub-dropdown:hover>#facilitiesList {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
        pointer-events: auto !important;
    }
}

/* Force list items to be visible */
.sub-dropdown-menu li,
#crockeryList li,
#facilitiesList li {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}


/* ==================== CRITICAL FIX: NESTED DROPDOWN VISIBILITY ==================== */
/* This section MUST be at the end to override all previous rules */

/* Force sub-dropdown to be positioned correctly */
.sub-dropdown {
    position: relative !important;
}

/* Initial hidden state for sub-dropdown-menu */
.sub-dropdown-menu,
#crockeryList,
#facilitiesList {
    position: absolute !important;
    left: 100% !important;
    top: 0 !important;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
    min-width: 250px !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    padding: 12px 0 !important;
    margin: 0 !important;
    list-style: none !important;
    z-index: 9999999 !important;
    display: none !important;
    /* CHANGED: Start with display none */
    transition: opacity 0.15s ease !important;
}

/* Show on hover - DESKTOP ONLY */
@media (min-width: 769px) {

    .sub-dropdown:hover>.sub-dropdown-menu,
    .sub-dropdown:hover>#crockeryList,
    .sub-dropdown:hover>#facilitiesList {
        display: block !important;
        /* CHANGED: Show on hover */
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
}

/* Force list items to be visible */
.sub-dropdown-menu li,
#crockeryList li,
#facilitiesList li {
    display: block !important;
    padding: 12px 20px !important;
    color: #333 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 0.9rem !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}

.sub-dropdown-menu li:hover,
#crockeryList li:hover,
#facilitiesList li:hover {
    background: rgba(201, 162, 39, 0.2) !important;
    color: #1e3a5f !important;
}

.sub-dropdown-menu li:last-child,
#crockeryList li:last-child,
#facilitiesList li:last-child {
    border-bottom: none !important;
}

/* Mobile: Show on active class (click) */
@media (max-width: 768px) {

    .sub-dropdown-menu,
    #crockeryList,
    #facilitiesList {
        position: static !important;
        left: 0 !important;
        width: 100% !important;
        box-shadow: none !important;
        background: #f5f5f5 !important;
        max-height: none !important;
        display: none !important;
    }

    .sub-dropdown.active>.sub-dropdown-menu,
    .sub-dropdown.active>#crockeryList,
    .sub-dropdown.active>#facilitiesList {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .sub-dropdown:hover>.sub-dropdown-menu,
    .sub-dropdown:hover>#crockeryList,
    .sub-dropdown:hover>#facilitiesList {
        display: none !important;
    }

    .sub-dropdown-menu li,
    #crockeryList li,
    #facilitiesList li {
        padding: 12px 20px 12px 50px !important;
    }
}



/* ==================== CRITICAL FIX: NAV LINKS CLICKABLE ==================== */
/* Ensure all nav links are clickable and not blocked */

.nav-menu li a {
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1 !important;
}

.nav-menu>li {
    pointer-events: auto !important;
}

/* User dropdown must be clickable */
.user-dropdown,
.user-dropdown-btn,
.user-dropdown-menu,
.user-dropdown-menu a {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ensure dropdown toggle is clickable */
.dropdown-toggle {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Fix for nav-auth login button */
.nav-auth,
.nav-auth a,
.nav-login-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
    /* position: relative removed - conflicts with mobile absolute positioning */
}

/* Mobile: Ensure sidebar links are clickable */
@media (max-width: 768px) {
    .nav-menu li a {
        cursor: pointer !important;
        pointer-events: auto !important;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
    }

    .nav-menu.active {
        pointer-events: auto !important;
    }

    .nav-menu.active li,
    .nav-menu.active li a {
        pointer-events: auto !important;
    }
}


/* ==================== FAMILY DIRECTORY PAGE ==================== */
.directory-page {
    padding: 20px 0 60px;
    padding-top: 81px;
    /* navbar height only */
    background: var(--cream);
    min-height: 100vh;
}

/* When notification bar is active */
body.has-notification .directory-page {
    padding-top: 122px;
    /* navbar + notification only */
}

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

/* Page Header - Compact */
.directory-page .page-header {
    text-align: center;
    margin-bottom: 20px;
}

.directory-page .page-header h1 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.directory-page .page-header h1 i {
    color: var(--accent);
    font-size: 1.3rem;
}

.directory-page .page-header p {
    color: var(--gray);
    font-size: 0.85rem;
}

/* Register CTA - Compact */
.register-cta {
    background: var(--gold-gradient);
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.register-cta h3 {
    color: var(--dark);
    font-size: 0.95rem;
    margin: 0;
}

.register-cta .btn {
    background: var(--primary);
    color: #fff;
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Search & Filter - Compact */
.search-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.directory-page .search-box {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    position: relative;
}

.directory-page .search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-light);
    font-size: 0.85rem;
}

.directory-page .search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    background: #fff;
    transition: all 0.2s ease;
}

.directory-page .search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.filter-select {
    padding: 2px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    background: #fff;
    min-width: 130px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 42px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Stats Bar - Compact */
.stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-card {
    background: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-width: 140px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.stat-icon.families {
    background: #dbeafe;
    color: #2563eb;
}

.stat-icon.members {
    background: #d1fae5;
    color: #059669;
}

.stat-icon.cities {
    background: #fef3c7;
    color: #d97706;
}

.stat-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
}

.stat-info p {
    font-size: 0.7rem;
    color: var(--gray);
    margin-top: 2px;
}

/* Family Cards Grid - Compact Horizontal Style */
.families-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.family-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.family-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.family-card-header {
    background: var(--elegant-gradient);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.family-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.family-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.family-photo i {
    font-size: 1.5rem;
    color: var(--gray-light);
}

.family-header-info {
    flex: 1;
    min-width: 0;
}

.family-name {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.family-location {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.family-location i {
    margin-right: 4px;
    font-size: 0.7rem;
}

.family-card-body {
    padding: 10px 12px;
    flex: 1;
}

.family-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #1c1e21;
    font-weight: 500;
}

.info-row i {
    font-size: 0.9rem;
    color: #1e3a5f;
}

.family-members-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid #f0f2f5;
}

.member-avatars {
    display: flex;
}

.member-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -8px;
    background: #e4e6eb;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-avatar:first-child {
    margin-left: 0;
}

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

.member-avatar i {
    font-size: 0.6rem;
    color: #bcc0c4;
}

.member-count {
    font-size: 0.7rem;
    color: #65676b;
}

.btn-view-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    background: #f0f2f5;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-view-profile:hover {
    background: var(--primary);
    color: #fff;
}

.btn-view-profile i {
    font-size: 0.75rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 20px;
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-light);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--gray);
    margin-bottom: 20px;
}

/* Loading */
.directory-page .loading {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

    .stats-bar {
        flex-direction: column;
    }
}


/* ==================== FAMILY PROFILE PAGE ==================== */
.profile-page {
    padding-top: 0;
    /* headerSpacer handles spacing */
    background: #f0f2f5;
    min-height: calc(100vh - 81px);
}

/* When notification bar is active */
body.has-notification .profile-page {
    padding-top: 0;
    /* headerSpacer handles spacing */
    min-height: calc(100vh - 122px);
}

.back-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 35px 20px 0;
}

.profile-layout {
    display: flex;
    max-width: 1000px;
    margin: 0 auto;
    gap: 16px;
    padding: 20px 20px 40px;
}

/* Left Sidebar */
.profile-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 93px;
    height: fit-content;
}

.sidebar-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sidebar-profile {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #e4e6eb;
}

.sidebar-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 12px;
    overflow: hidden;
    border: 3px solid var(--accent);
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-photo i {
    font-size: 2.5rem;
    color: #bcc0c4;
}

.sidebar-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1c1e21;
    margin-bottom: 4px;
}

.sidebar-location {
    font-size: 0.85rem;
    color: #65676b;
}

.sidebar-location i {
    color: var(--accent);
    margin-right: 4px;
    font-size: 0.8rem;
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 8px 0;
}

.profile-page .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.profile-page .menu-item:hover {
    background: #f0f2f5;
}

.profile-page .menu-item.active {
    background: #e7f3ff;
    border-left-color: var(--primary);
}

.profile-page .menu-item i {
    width: 22px;
    font-size: 1rem;
    color: #65676b;
    text-align: center;
}

.profile-page .menu-item.active i {
    color: var(--primary);
}

.profile-page .menu-item span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1c1e21;
}

.profile-page .menu-item .count {
    margin-left: auto;
    background: #e4e6eb;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    color: #65676b;
}

/* Main Content */
.profile-main {
    flex: 1;
    min-width: 0;
}

/* Content Section */
.content-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    overflow: hidden;
    display: none;
}

.content-section.active {
    display: block;
}

.profile-page .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 8px;
    cursor: pointer;
    margin-bottom: 0;
}

.profile-page .section-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1c1e21;
    margin: 0;
}

.profile-page .section-header h3 i {
    color: var(--accent);
    font-size: 1rem;
}

.section-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.section-toggle i {
    font-size: 0.75rem;
    color: #65676b;
    transition: transform 0.3s;
}

.profile-page .section-header.collapsed .section-toggle i {
    transform: rotate(-90deg);
}

.section-body {
    padding: 8px 20px 14px;
}

.profile-page .section-header.collapsed+.section-body {
    display: none;
}

/* Info Grid - Profile Page */
.profile-page .info-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
}

.profile-page .info-row:last-child {
    border-bottom: none;
}

.profile-page .info-row>i {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.9rem;
    margin-right: 14px;
    flex-shrink: 0;
}

.profile-page .info-row .info-label {
    font-size: 0.75rem;
    color: #65676b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-page .info-row .info-value {
    font-size: 0.95rem;
    color: #1c1e21;
    font-weight: 500;
}

/* Family Tree Compact */
.tree-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.tree-person {
    text-align: center;
    padding: 10px;
    background: #f0f2f5;
    border-radius: 10px;
    min-width: 90px;
}

.tree-person.self {
    background: linear-gradient(135deg, var(--primary) 0%, #2d5a87 100%);
}

.tree-person.self .tree-p-name,
.tree-person.self .tree-p-rel {
    color: #fff;
}

.tree-p-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 auto 8px;
    overflow: hidden;
    border: 2px solid var(--accent);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.tree-p-avatar i {
    font-size: 1.5rem;
    color: #bcc0c4;
}

.tree-p-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1c1e21;
}

.tree-p-rel {
    font-size: 0.7rem;
    color: #65676b;
}

/* Member Cards */
.members-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.member-mini {
    background: #f0f2f5;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    transition: all 0.2s;
}

.member-mini:hover {
    background: #e4e6eb;
    transform: translateY(-2px);
}

.member-mini-photo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin: 0 auto 6px;
    overflow: hidden;
    border: 2px solid var(--accent);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-mini-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-mini-photo i {
    font-size: 1.3rem;
    color: #bcc0c4;
}

.member-mini-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1c1e21;
}

.member-mini-rel {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    font-size: 0.6rem;
    margin-top: 4px;
}

.member-mini-details {
    margin-top: 6px;
    font-size: 0.7rem;
    color: #1c1e21;
    text-align: left;
}

.member-mini-details div {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 0;
}

.member-mini-details i {
    font-size: 0.65rem;
    color: var(--primary);
    width: 12px;
}

/* Head of Family Badge */
.head-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 600;
    margin-top: 4px;
}

.head-badge i {
    color: #d97706;
    font-size: 0.6rem;
}

/* Back Button */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
}

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

/* Loading & Error */
.profile-page .loading-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    width: 100%;
}

.profile-page .error-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
}

.profile-page .error-state i {
    font-size: 3rem;
    color: #bcc0c4;
    margin-bottom: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .profile-layout {
        flex-direction: column;
        padding: 12px;
    }

    .profile-sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }

    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        padding: 8px;
        gap: 4px;
    }

    .profile-page .menu-item {
        flex-direction: column;
        padding: 8px 12px;
        min-width: 70px;
        text-align: center;
        border-left: none;
        border-bottom: 2px solid transparent;
        border-radius: 8px;
    }

    .profile-page .menu-item.active {
        border-left: none;
        border-bottom-color: var(--primary);
    }

    .profile-page .menu-item i {
        margin: 0 0 4px 0;
    }

    .profile-page .menu-item span {
        font-size: 0.7rem;
    }

    .profile-page .menu-item .count {
        display: none;
    }

    .members-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ==================== FAMILY REGISTRATION PAGE ==================== */
.family-page {
    padding-top: 81px;
    /* navbar height only */
    padding-bottom: 30px;
    background: var(--cream);
    min-height: 100vh;
}

/* When notification bar is active */
body.has-notification .family-page {
    padding-top: 122px;
    /* navbar + notification only */
}

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

.family-page .page-header {
    text-align: center;
    margin-bottom: 12px;
}

.page-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 8px;
}

.family-page .page-header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin: 0;
}

.family-page .page-header p {
    color: var(--gray);
    font-size: 0.95rem;
}

.close-form-btn {
    width: 40px;
    height: 40px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 50%;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.close-form-btn:hover {
    background: #dc2626;
    color: #fff;
}

/* Form Card */
.form-card {
    background: #fff;
    border-radius: 0;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.form-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--cream);
}

.form-card-header i {
    font-size: 1.2rem;
    color: var(--accent);
}

.form-card-header h2 {
    font-size: 1.05rem;
    color: var(--dark);
    font-weight: 600;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.form-group {
    margin-bottom: 0;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 4px;
}

.form-group label span {
    color: #e53e3e;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Input Styles */
.form-input,
.form-select {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 0.78rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    background: #fff;
    min-height: 27px;
    box-sizing: border-box;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
    cursor: pointer;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.1);
}

.form-input::placeholder {
    color: #a0aec0;
    font-size: 0.72rem;
}

/* Photo Upload */
.photo-upload {
    display: flex;
    align-items: center;
    gap: 15px;
}

.photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--cream);
    border: 2px dashed #cbd5e0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-preview:hover {
    border-color: var(--primary);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview i {
    font-size: 1.5rem;
    color: #a0aec0;
}

.photo-preview input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.photo-info {
    flex: 1;
}

.photo-info p {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 6px;
}

.photo-info .btn-upload {
    padding: 8px 16px;
    font-size: 0.8rem;
}

/* Address Section */
.address-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {
    .address-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .address-grid .full-width>div>div {
        grid-template-columns: 1fr !important;
    }
}

/* Family Members Section */
.members-list {
    margin-top: 20px;
}

.member-card {
    background: var(--cream);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
    border: 1px solid #e2e8f0;
}

.member-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.member-number {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

.btn-remove-member {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-remove-member:hover {
    background: #dc2626;
    color: #fff;
}

/* Add Member Button */
.btn-add-member {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px;
    background: var(--cream);
    border: 2px dashed var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
}

.btn-add-member:hover {
    background: var(--primary);
    color: #fff;
    border-style: solid;
}

/* Family Tree Preview */
.tree-preview {
    background: var(--cream);
    border-radius: 15px;
    padding: 30px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tree-empty {
    text-align: center;
    color: var(--gray);
}

.tree-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.tree-empty p {
    font-size: 0.9rem;
}

/* Tree Structure */
.family-tree {
    width: 100%;
}

.tree-level {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tree-member {
    text-align: center;
    position: relative;
}

.tree-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--accent);
    margin: 0 auto 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.tree-avatar i {
    font-size: 1.5rem;
    color: var(--gray-light);
}

.tree-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dark);
}

.tree-relation {
    font-size: 0.7rem;
    color: var(--gray);
}

.tree-you .tree-avatar {
    border-color: var(--primary);
    background: var(--primary);
}

.tree-you .tree-avatar i {
    color: #fff;
}

/* Privacy Toggle */
.privacy-section {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 10px;
}

.toggle-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e0;
    border-radius: 26px;
    cursor: pointer;
    transition: 0.3s;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--emerald);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 0.9rem;
    color: var(--dark);
    font-weight: 500;
}

@media (max-width: 480px) {
    .toggle-label {
        font-size: 0.8rem;
    }
}

/* Head of Family Toggle */
.head-toggle-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 8px;
}

.head-toggle {
    position: relative;
    width: 40px;
    height: 22px;
}

.head-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.head-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e0;
    border-radius: 22px;
    cursor: pointer;
    transition: 0.3s;
}

.head-slider:before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.head-toggle input:checked+.head-slider {
    background: #d97706;
}

.head-toggle input:checked+.head-slider:before {
    transform: translateX(18px);
}

.head-label {
    font-size: 0.75rem;
    color: #92400e;
    font-weight: 600;
}

.head-label i {
    color: #d97706;
    margin-right: 4px;
}

/* Submit Buttons */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-save-draft {
    flex: 1;
    min-width: 150px;
    padding: 16px 30px;
    background: var(--cream);
    color: var(--dark);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-save-draft:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-submit {
    flex: 2;
    min-width: 200px;
    padding: 16px 30px;
    background: var(--gold-gradient);
    color: var(--dark);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 10px 30px rgba(201, 162, 39, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(201, 162, 39, 0.4);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.alert.show {
    display: flex;
}

.alert.success {
    background: #d1fae5;
    color: #065f46;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.alert.info {
    background: #dbeafe;
    color: #1e40af;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--dark);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Responsive */
@media (max-width: 600px) {
    .form-card {
        padding: 25px 20px;
    }

    .photo-upload {
        flex-direction: column;
        text-align: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-save-draft,
    .btn-submit {
        width: 100%;
    }
}


/* Shreebai Story Page Styles */
.story-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.story-image-sidebar {
    flex-shrink: 0;
    width: 280px;
    position: sticky;
    top: 30px;
}

.story-image-card {
    background: #fff;
    border-radius: 0;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.story-image-card img {
    width: 100%;
    max-width: 240px;
    border-radius: 12px;
    border: 3px solid #c9a227;
    box-shadow: 0 4px 20px rgba(201, 162, 39, 0.3);
}

.story-image-card h4 {
    color: #1e3a5f;
    margin-top: 15px;
    font-size: 1.1rem;
}

.story-image-card p {
    color: #4a5568;
    font-size: 0.9rem;
    margin-top: 5px;
}

.story-content {
    flex: 1;
    min-width: 0;
}

.story-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border-left: 3px solid #c9a227;
}

.story-section h2 {
    color: #1e3a5f;
    font-size: 1.2rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-section h2 i {
    color: #c9a227;
    font-size: 1rem;
}

.story-section p {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.highlight-quote {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1), rgba(201, 162, 39, 0.05));
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 3px solid #c9a227;
    margin: 15px 0;
    font-style: italic;
    color: #1e3a5f;
    font-size: 0.95rem;
}

.miracle-highlight {
    background: linear-gradient(135deg, #1e3a5f, #0f2744);
    color: #fff;
    padding: 18px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
}

.miracle-highlight h3 {
    color: #c9a227;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.miracle-highlight p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
}

.location-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #faf8f5;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
}

.location-info i {
    font-size: 1.5rem;
    color: #c9a227;
}

.location-info div h4 {
    color: #1e3a5f;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.location-info div p {
    color: #4a5568;
    margin: 0;
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .story-layout {
        flex-direction: column;
    }

    .story-image-sidebar {
        width: 100%;
        position: static;
    }

    .story-image-card {
        display: flex;
        align-items: center;
        gap: 20px;
        text-align: left;
    }

    .story-image-card img {
        width: 120px;
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .story-image-card {
        flex-direction: column;
        text-align: center;
    }

    .story-section {
        padding: 20px;
    }
}

/* Kuldevi Page Styles */
.kuldevi-main-image {
    text-align: center;
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kuldevi-main-image img {
    max-width: 100%;
    width: 700px;
    border: 4px solid #c9a227;
    box-shadow: 0 10px 40px rgba(201, 162, 39, 0.3);
}

.kuldevi-main-image p {
    color: #4a5568;
    font-size: 0.95rem;
    margin-top: 15px;
    font-style: italic;
}

.kuldevi-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border-left: 3px solid #c9a227;
}

.kuldevi-section h2 {
    color: #1e3a5f;
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kuldevi-section h2 i {
    color: #c9a227;
    font-size: 1rem;
}

.kuldevi-section p {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.meaning-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.meaning-card {
    background: linear-gradient(135deg, #faf8f5, #fff);
    padding: 18px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(201, 162, 39, 0.3);
}

.meaning-card h3 {
    color: #c9a227;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.meaning-card p {
    color: #4a5568;
    margin: 4px 0;
    font-size: 0.85rem;
}

.highlight-box {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1), rgba(201, 162, 39, 0.05));
    padding: 18px;
    border-radius: 10px;
    border-left: 3px solid #c9a227;
    margin: 15px 0;
}

.highlight-box h3 {
    color: #1e3a5f;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.highlight-box h3 i {
    color: #c9a227;
    font-size: 0.9rem;
}

.highlight-box p {
    margin: 0;
    font-size: 0.9rem;
}

.note-box {
    background: linear-gradient(135deg, #1e3a5f, #0f2744);
    color: #fff;
    padding: 18px;
    border-radius: 10px;
    margin: 20px 0;
}

.note-box h3 {
    color: #c9a227;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.note-box p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0;
    font-size: 0.9rem;
}

/* Sants & Bhaktas Page Styles */
.sants-layout {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.sants-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.sants-menu {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.sants-menu-header {
    background: linear-gradient(135deg, #1e3a5f, #0f2744);
    color: #fff;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sants-menu-header i {
    color: #c9a227;
}

.sants-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sants-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.sants-menu-item:last-child {
    border-bottom: none;
}

.sants-menu-link {
    display: block;
    padding: 12px 20px;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sants-menu-link:hover {
    background: #faf8f5;
    color: #1e3a5f;
    padding-left: 25px;
}

.sants-menu-link.active {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.15), rgba(201, 162, 39, 0.05));
    color: #1e3a5f;
    font-weight: 600;
    border-left: 3px solid #c9a227;
}

.sants-content {
    flex: 1;
    min-width: 0;
}

.sant-detail {
    display: none;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.sant-detail.active {
    display: block;
}

.sant-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.sant-image {
    width: 150px;
    height: 180px;
    border-radius: 10px;
    object-fit: cover;
    border: 3px solid #c9a227;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.sant-header-no-image {
    display: block;
    margin-bottom: 20px;
}

.sant-header-no-image .sant-info h2 {
    color: #1e3a5f;
    font-size: 1.4rem;
    margin-bottom: 5px;
    padding-bottom: 10px;
    border-bottom: 2px solid #c9a227;
}

.sant-info h2 {
    color: #1e3a5f;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.sant-info h3 {
    color: #c9a227;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.sant-body p {
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 12px;
    font-size: 0.95rem;
    text-align: justify;
}

.sant-highlight {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1), rgba(201, 162, 39, 0.05));
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 3px solid #c9a227;
    margin: 15px 0;
}

.sant-highlight p {
    margin: 0;
    font-weight: 500;
}

.intro-content {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.intro-content h2 {
    color: #1e3a5f;
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.intro-content h2 i {
    color: #c9a227;
}

.intro-content p {
    color: #4a5568;
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

@media (max-width: 900px) {
    .sants-layout {
        flex-direction: column;
    }

    .sants-sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }

    .sants-menu-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .sants-menu-item {
        border-right: 1px solid #f0f0f0;
    }

    .sant-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 500px) {
    .sants-menu-list {
        grid-template-columns: 1fr;
    }

    .sants-menu-item {
        border-right: none;
    }
}


/* Surnames Page Specific Styles */
.surnames-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 30px;
}

.surname-card {
    background: linear-gradient(135deg, #faf8f5 0%, #fff 100%);
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-left: 3px solid #c9a227;
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.surname-card:hover {
    transform: translateY(-3px);
    border-color: #c9a227;
    box-shadow: 0 8px 20px rgba(201, 162, 39, 0.2);
    background: linear-gradient(135deg, #fff 0%, #faf8f5 100%);
}

.surname-card h3 {
    color: #1e3a5f;
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
}

.surname-card .surname-gu {
    color: #4a5568;
    font-size: 0.85rem;
    margin-top: 4px;
    font-weight: 500;
}

.surnames-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.surnames-intro p {
    color: #4a5568;
    font-size: 1.1rem;
    line-height: 1.8;
}

.surname-count {
    display: inline-block;
    background: linear-gradient(135deg, #c9a227 0%, #f4d03f 100%);
    color: #1e3a5f;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.3);
}

.surname-count i {
    margin-right: 8px;
}

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.alphabet-btn {
    background: #faf8f5;
    border: 1px solid rgba(201, 162, 39, 0.3);
    color: #1e3a5f;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.alphabet-btn:hover,
.alphabet-btn.active {
    background: linear-gradient(135deg, #c9a227 0%, #f4d03f 100%);
    color: #1e3a5f;
    border-color: #c9a227;
}

.search-box {
    max-width: 400px;
    margin: 0 auto 30px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 30px;
    background: #fff;
    color: #1e3a5f;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #c9a227;
    box-shadow: 0 0 20px rgba(201, 162, 39, 0.2);
}

.search-box input::placeholder {
    color: #a0aec0;
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #c9a227;
}

.no-results {
    text-align: center;
    color: #4a5568;
    padding: 40px;
    display: none;
}

.no-results i {
    font-size: 3rem;
    color: #c9a227;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .surnames-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }

    .alphabet-filter {
        gap: 5px;
        margin-bottom: 20px;
    }

    .alphabet-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
        padding: 0;
        /* Added to ensure width/height are respected */
        display: flex;
        /* Added for centering text */
        align-items: center;
        /* Added for centering text */
        justify-content: center;
        /* Added for centering text */
    }

    .surname-card {
        padding: 10px 8px;
    }

    .surname-card h3 {
        font-size: 0.85rem;
    }

    .surname-card .surname-gu {
        font-size: 0.75rem;
    }
}


/* ==================== SIGNUP PAGE STYLES ==================== */

/* Progress Steps */
.signup-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 40px;
    padding: 0 20px;
    position: relative;
}

.signup-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.step-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.progress-step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.progress-step.completed .step-number {
    background: var(--emerald);
    color: white;
    border-color: var(--emerald);
}

.progress-step.completed .step-label {
    color: var(--emerald);
}

/* Signup Steps */
.signup-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.signup-step.active {
    display: block;
}

.signup-step h3 {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.step-description {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 30px;
}

/* Pincode Section */
.pincode-section {
    margin-bottom: 30px;
}

.pincode-input-group {
    display: flex;
    gap: 12px;
}

.pincode-input-group input {
    flex: 1;
}

.pincode-input-group button {
    white-space: nowrap;
    padding: 12px 20px;
}

.btn-icon {
    margin-right: 6px;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    padding: 0 16px;
}

/* Manual Selection */
.manual-selection {
    display: grid;
    gap: 20px;
}

/* Location Display */
.location-display {
    margin-top: 30px;
    animation: slideDown 0.3s ease;
}

.location-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: var(--radius-sm);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.location-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.location-info {
    flex: 1;
}

.location-info h4 {
    font-size: 18px;
    color: var(--emerald);
    margin-bottom: 4px;
    font-weight: 600;
}

.location-info p {
    font-size: 14px;
    color: #047857;
    margin: 0;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-link:hover {
    background: rgba(30, 58, 95, 0.1);
}

/* Password Strength */
.password-strength {
    margin-top: 12px;
}

.strength-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.strength-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.form-actions button {
    flex: 1;
}

.form-actions .btn-secondary {
    flex: 0 0 auto;
    min-width: 120px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-strong);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.loading-spinner p {
    color: var(--primary);
    font-weight: 600;
    margin: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-medium);
    z-index: 9998;
    max-width: 400px;
    transform: translateX(500px);
    transition: transform 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border-left: 4px solid;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left-color: var(--emerald);
    color: var(--emerald);
    background: #f0fdf4;
}

.notification-error {
    border-left-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
}

.notification-warning {
    border-left-color: #f59e0b;
    color: #f59e0b;
    background: #fffbeb;
}

.notification-info {
    border-left-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .signup-progress {
        padding: 0 10px;
    }

    .signup-progress::before {
        left: 15%;
        right: 15%;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .step-label {
        font-size: 10px;
    }

    .pincode-input-group {
        flex-direction: column;
    }

    .pincode-input-group button {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn-secondary {
        width: 100%;
    }

    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .signup-step h3 {
        font-size: 20px;
    }

    .location-card {
        flex-direction: column;
        text-align: center;
    }

    .location-icon {
        font-size: 40px;
    }
}


/* ==================== AUTH CONTAINER (LOGIN/SIGNUP) ==================== */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 40px 20px;
    /* Top padding for navbar */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Mobile auth container - align to top instead of center */
@media (max-width: 768px) {
    .auth-container {
        min-height: 100vh !important;
        min-height: 100dvh !important;
        padding: 40px 20px 20px 20px !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100dvh !important;
        overflow-y: auto !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
        padding-top: 60px !important;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding-top: 40px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

.auth-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-strong);
    padding: 40px;
    width: 100%;
    max-width: 600px;
    animation: fadeIn 0.4s ease;
}

/* Mobile auth card - responsive sizing with reduced height */
@media (max-width: 768px) {
    .auth-card {
        padding: 20px 15px !important;
        margin: 15px !important;
        max-width: calc(100% - 30px) !important;
        width: calc(100% - 30px) !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 15px 12px !important;
        margin: 10px !important;
        max-width: calc(100% - 20px) !important;
        width: calc(100% - 20px) !important;
        max-height: 75vh !important;
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

/* Mobile auth header - reduced spacing */
@media (max-width: 768px) {
    .auth-header {
        margin-bottom: 20px !important;
    }
}

@media (max-width: 480px) {
    .auth-header {
        margin-bottom: 15px !important;
    }
}

.auth-header h2 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 700;
}

/* Mobile auth header */
@media (max-width: 768px) {
    .auth-header h2 {
        font-size: 24px !important;
    }
}

@media (max-width: 480px) {
    .auth-header h2 {
        font-size: 22px !important;
    }
}

.auth-header p {
    color: var(--gray);
    font-size: 14px;
}

.auth-form {
    margin-top: 30px;
}

/* Mobile auth form - reduced spacing */
@media (max-width: 768px) {
    .auth-form {
        margin-top: 20px !important;
    }
}

@media (max-width: 480px) {
    .auth-form {
        margin-top: 15px !important;
    }
}

.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* Mobile auth footer - reduced spacing */
@media (max-width: 768px) {
    .auth-footer {
        margin-top: 20px !important;
        padding-top: 15px !important;
    }
}

@media (max-width: 480px) {
    .auth-footer {
        margin-top: 15px !important;
        padding-top: 12px !important;
    }
}

.auth-footer p {
    color: var(--gray);
    font-size: 14px;
}

.auth-footer .link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-footer .link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    background: white;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Mobile form inputs - reduced height */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 16px !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .form-group {
        margin-bottom: 14px !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px 10px !important;
        font-size: 14px !important;
    }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: none;
}

.form-group input:disabled,
.form-group select:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--gray);
}

.form-hint {
    color: var(--gray-light);
    font-size: 12px;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Mobile buttons - reduced height */
@media (max-width: 768px) {

    .btn-primary,
    .btn-secondary {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {

    .btn-primary,
    .btn-secondary {
        padding: 10px 16px !important;
        font-size: 14px !important;
    }
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f3f4f6;
    color: var(--dark);
}

.btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        padding: 30px 20px;
    }

    .auth-header h2 {
        font-size: 24px;
    }
}


/* ==================== CITY SELECTOR (GUEST MODE) ==================== */
/* Desktop version - outside nav menu, in navbar right side */
.nav-city-selector-desktop {
    display: none;
    /* Hidden by default, shown only on desktop */
    position: relative;
    margin-left: auto;
    margin-right: 16px;
}

@media (min-width: 769px) {
    .nav-city-selector-desktop {
        display: flex !important;
        align-items: center;
    }

    /* Hide mobile version on desktop */
    .nav-city-selector-mobile {
        display: none !important;
    }
}

/* Mobile version - original position */
.nav-city-selector {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 0;
    margin-left: auto;
}

@media (max-width: 768px) {

    /* Show mobile version, hide desktop version */
    .nav-city-selector-desktop {
        display: none !important;
    }

    .nav-city-selector-mobile {
        display: flex !important;
        flex-shrink: 0 !important;
        max-width: 140px !important;
    }

    /* Mobile city selector positioning */
    .nav-city-selector {
        flex: 0 1 auto;
        max-width: 140px;
        /* Limit width on mobile */
    }

    .city-selector-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .city-selector-btn span {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .city-selector-menu {
        position: fixed !important;
        left: 10px !important;
        right: auto !important;
        min-width: auto;
        max-width: calc(100vw - 20px);
        width: auto;
    }

    /* Ensure city names show fully - no truncation */
    .city-selector-item {
        padding: 10px 12px !important;
    }

    .city-selector-item-info {
        flex: 1;
    }

    .city-selector-item-city {
        white-space: nowrap;
        font-size: 0.9rem !important;
    }

    .city-selector-item-state {
        white-space: nowrap;
        font-size: 0.75rem !important;
    }
}

.city-selector-dropdown {
    position: relative;
}

.city-selector-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.2);
    white-space: nowrap;
}

.city-selector-btn:hover {
    background: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.city-selector-btn i:first-child {
    color: #c9a227;
    font-size: 0.8rem;
}

.city-selector-btn i:last-child {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
}

.city-selector-btn span {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.city-selector-dropdown.active .city-selector-btn i:last-child {
    transform: rotate(180deg);
}

.city-selector-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    max-height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.city-selector-dropdown.active .city-selector-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.city-selector-header {
    padding: 12px 15px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 12px 12px 0 0;
}

.city-selector-header i {
    color: #c9a227;
    font-size: 1rem;
}

.city-selector-list {
    padding: 8px;
    overflow-y: auto;
    max-height: 320px;
}

.city-selector-list::-webkit-scrollbar {
    width: 6px;
}

.city-selector-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.city-selector-list::-webkit-scrollbar-thumb {
    background: #c9a227;
    border-radius: 10px;
}

.city-selector-loading {
    padding: 20px 15px;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

.city-selector-loading i {
    margin-right: 6px;
    color: #c9a227;
}

.city-selector-item {
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.city-selector-item:hover {
    background: #f8fafc;
    transform: translateX(3px);
}

.city-selector-item.active {
    background: linear-gradient(135deg, #e6f2ff 0%, #f0f7ff 100%);
    border-left: 3px solid #c9a227;
}

.city-selector-item i {
    color: #c9a227;
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
}

.city-selector-item-info {
    flex: 1;
}

.city-selector-item-city {
    font-weight: 600;
    color: #1e3a5f;
    font-size: 0.85rem;
    margin-bottom: 1px;
    line-height: 1.1;
}

.city-selector-item-state {
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.1;
}

.city-selector-item-check {
    color: #10b981;
    font-size: 0.95rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.city-selector-item.active .city-selector-item-check {
    opacity: 1;
}

.city-selector-empty {
    padding: 20px 15px;
    text-align: center;
    color: #94a3b8;
}

.city-selector-empty i {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

.city-selector-empty p {
    margin: 0;
    font-size: 0.85rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {}


/* ==================== CRITICAL FIX: NAVBAR BORDER OVERRIDE ==================== */
/* This rule is at the end to override all other navbar border rules */
.navbar,
nav.navbar,
.navbar.loaded {
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

@media (max-width: 768px) {

    .navbar,
    nav.navbar,
    .navbar.loaded {
        border-bottom: 0.5px solid rgba(0, 0, 0, 0.04) !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    }
}

/* ==================== GLOBAL LAYOUT FIX FOR NOTIFICATION BAR ==================== */
/* Ensure SPA content clears the fixed notification bar */
body.has-notification #app {
    padding-top: 116px !important;
}

body.has-notification .navbar {
    top: 0 !important;
}

/* Ensure notification bar stays below navbar */
body.has-notification .notification-bar {
    top: 81px !important;
    display: flex !important;
}

/* ==================== GLOBAL MARGIN RESET FOR SPA CONTENT ==================== */
/* Ensure no section has double top margin when notification is active */
#app>.section,
#app>section,
#app>div[class*='section'] {
    margin-top: 0 !important;
}

/* NOTE: Notification bar layout rules are now consolidated at the end of file */


/* ==================== FINAL LAYOUT FIX - NOTIFICATION BAR ==================== */
/* Single source of truth for notification bar layout - BULLETPROOF */

/* CSS Variables matching index.html */
:root {
    --navbar-height: 81px;
    --notification-height: 35px;
    --content-top-with-notification: 116px;
    /* navbar(81) + notification(35) */
    --content-top-without-notification: 81px;
}

/* Default: No notification bar visible */
#app {
    padding-top: var(--content-top-without-notification);
    min-height: calc(100vh - 200px);
}

/* When notification bar IS visible - FORCE THIS */
body.has-notification #app {
    padding-top: var(--content-top-with-notification) !important;
}

/* Ensure no extra margins on first content elements - ALL pages */
/* Note: home-content-wrapper is excluded as it handles its own positioning */
#app>*:first-child,
#app>section:first-child,
#app>div:first-child {
    margin-top: 0 !important;
}

body.has-notification #app>*:first-child,
body.has-notification #app>section:first-child,
body.has-notification #app>div:first-child {
    margin-top: 0 !important;
}

/* Target ALL page types that might add unwanted margins */
body.has-notification .homepage-banner-section,
body.has-notification .banner-section-contained,
body.has-notification .page-header,
body.has-notification .calendar-page-section,
body.has-notification .gallery-page,
body.has-notification .gallery-section,
body.has-notification .about-section,
body.has-notification .contact-section,
body.has-notification .directory-page,
body.has-notification .history-page,
body.has-notification .news-events-section,
body.has-notification .ads-section-contained {
    margin-top: 0 !important;
}

/* Ensure page-header (common to many pages) starts at right position */
.page-header {
    margin-top: 0 !important;
}

/* Mobile adjustment - notification bar may wrap to 2 lines */
@media (max-width: 768px) {
    :root {
        --content-top-with-notification: 116px;
    }

    /* Only apply padding-top for non-home pages */
    body.has-notification:not(.home-page) #app {
        padding-top: var(--content-top-with-notification) !important;
    }

    /* Home page wrapper - Handled by JavaScript */
    /* Removed CSS overrides */
}

/* Extra small screens */
@media (max-width: 480px) {
    :root {
        --content-top-with-notification: 116px;
    }

    /* Only apply padding-top for non-home pages */
    body.has-notification:not(.home-page) #app {
        padding-top: var(--content-top-with-notification) !important;
    }

    /* Home page wrapper - Handled by JavaScript */
    /* Removed CSS overrides */
}

/* ==================== HOME PAGE - CLEAN LAYOUT ==================== */
/* Padding is controlled by JavaScript inline style in home.js using getBoundingClientRect() */
/* This ensures pixel-perfect positioning regardless of notification bar state */

/* Remove any margin from ads section on home page - DISABLED, handled in final fix */
/* body.home-page .ads-section-contained { margin-top: 0 !important; } */

/* Ensure home-content-wrapper has no visible background that creates gap */
body.home-page .home-content-wrapper {
    background: transparent !important;
}

/* Match #app background to cream color - for AUTHENTICATED users */
body.home-page.user-authenticated #app {
    background: var(--cream) !important;
}

/* Home page wrapper - all users - Negative margin to eliminate gap completely */
body.home-page .home-content-wrapper {
    margin-top: -81px !important;
    /* Negative margin to pull content up to navbar */
    background: transparent !important;
    padding-top: 81px !important;
    /* Exact navbar height - should touch perfectly */
}

/* Increase padding when notification is present - KEEP THIS SAME */
body.home-page.has-notification .home-content-wrapper {
    margin-top: -116px !important;
    /* Negative margin to pull content up */
    padding-top: 116px !important;
    /* navbar(81) + notification(35) = 116px - PERFECT, DON'T CHANGE */
}

/* Guest users: REMOVED - now uses blue gradient same as auth users (see line 12345) */
/* body.home-page:not(.user-authenticated) #app { background: transparent !important; } */

/* Ads and Banner sections - no extra margins/padding */
body.home-page #ads,
body.home-page .banner-section-contained {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background: transparent !important;
}

/* CRITICAL: Home page body background - white instead of cream to prevent visible gaps */
body.home-page {
    background: #ffffff !important;
}

/* Ensure home content wrapper has white background - ONLY for authenticated users */
body.home-page.user-authenticated .home-content-wrapper {
    background: #ffffff !important;
}

/* Home page #app background - use cream color instead of blue */
body.home-page.user-authenticated #app {
    background: var(--cream) !important;
}

/* Non-authenticated: SAME as authenticated - use cream color */
body.home-page:not(.user-authenticated) #app {
    background: var(--cream) !important;
}

body.home-page:not(.user-authenticated) .home-content-wrapper {
    background: transparent !important;
}

/* Ads section positioning - DO NOT set margin-top here, handled later */
/* body.home-page .ads-section-contained margin handled in final fix section */

/* Remove any spacer gaps */
body.home-page #quoteAdsSpacer {
    display: none !important;
    height: 0 !important;
}

/* CRITICAL: Force breaking ticker to be EXACTLY after stock ticker with zero gap */
.breaking-ticker {
    border-top: none !important;
    margin-top: 0 !important;
    transform: translateY(0) !important;
}

.stock-ticker {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    transform: translateY(0) !important;
}

/* Ensure tickers are perfectly aligned */
.stock-ticker+.breaking-ticker,
.breaking-ticker {
    position: fixed !important;
    top: calc(81px + 38px + 40px) !important;
    /* navbar + notification + stock ticker */
}

/* When no notification bar */
body:not(.has-notification) .breaking-ticker {
    top: calc(81px + 40px) !important;
    /* navbar + stock ticker */
}

/* MOBILE OVERRIDE: Fix breaking ticker position for mobile */
@media (max-width: 768px) {

    .stock-ticker+.breaking-ticker,
    .breaking-ticker {
        top: 117px !important;
        /* Mobile: navbar(81) + stock(36) */
        z-index: 995 !important;
    }

    body.has-notification .breaking-ticker {
        top: 152px !important;
        /* Mobile: navbar(81) + notification(35) + stock(36) */
        z-index: 995 !important;
    }

    body:not(.has-notification) .breaking-ticker {
        top: 117px !important;
        /* Mobile: navbar(81) + stock(36) */
        z-index: 995 !important;
    }
}

.no-quote-spacing {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ==================== FINAL OVERRIDE: MOBILE LOGIN BUTTON AT BOTTOM ==================== */
/* nav-auth is NOW OUTSIDE nav-menu for proper fixed positioning */
@media (max-width: 768px) {

    /* Login button - FIXED at absolute bottom of screen */
    .nav-auth,
    #navAuth,
    div.nav-auth {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: auto !important;
        right: -100% !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        z-index: 100001 !important;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-sizing: border-box !important;
        display: block !important;
        transform: none !important;
    }

    /* Show Login when sidebar is open - using JS-added 'visible' class */
    .nav-auth.visible,
    #navAuth.visible {
        right: 0 !important;
        left: auto !important;
        width: 100% !important;
        max-width: 320px !important;
        transform: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* Style the login button inside */
    .nav-auth .nav-login-btn,
    #navAuth .nav-login-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        padding: 18px 20px !important;
        margin: 0 !important;
        background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%) !important;
        color: #ffffff !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        border-radius: 0 !important;
        border: none !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }

    .nav-auth .nav-login-btn i {
        color: #ffffff !important;
    }

    /* ==================== MOBILE LOGOUT BUTTON ==================== */
    /* Same positioning as Login button but with red color */
    .nav-logout,
    #navLogout {
        display: none;
        /* Hidden by default, JS will show when logged in */
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
        box-sizing: border-box !important;
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        right: -100% !important;
        left: auto !important;
        z-index: 100000 !important;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        transform: none !important;
    }

    /* Show Logout when sidebar is open */
    .nav-logout.visible,
    #navLogout.visible {
        right: 0 !important;
        left: auto !important;
        width: 100% !important;
        max-width: 320px !important;
        transform: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* Style the logout button */
    .nav-logout .nav-logout-btn,
    #navLogout .nav-logout-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        padding: 18px 20px !important;
        margin: 0 !important;
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
        color: #ffffff !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        border-radius: 0 !important;
        border: none !important;
        cursor: pointer !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }

    .nav-logout .nav-logout-btn i {
        color: #ffffff !important;
    }

    /* ==================== SIDEBAR INTERNAL LOGIN/LOGOUT BUTTONS ==================== */
    /* These are INSIDE the nav-menu for perfect alignment */
    .sidebar-login-item,
    .sidebar-logout-item {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: auto !important;
        width: 101% !important;
        /* Slightly wider to cover gaps */
        margin-left: -0.5% !important;
        /* Center the overflow */
        padding: 0 !important;
        list-style: none !important;
        z-index: 100 !important;
        display: none;
        overflow: hidden !important;
        /* No !important so JS can override display */
    }

    .sidebar-login-btn,
    .sidebar-logout-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        padding: 18px 20px !important;
        margin: 0 !important;
        font-family: 'Poppins', sans-serif !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        border-radius: 0 !important;
        border: none !important;
        cursor: pointer !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }

    .sidebar-login-btn {
        background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%) !important;
        color: #ffffff !important;
    }

    .sidebar-logout-btn {
        background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
        color: #ffffff !important;
    }

    .sidebar-login-btn i,
    .sidebar-logout-btn i {
        color: #ffffff !important;
    }

    /* FORCE HIDE external nav-auth and nav-logout on mobile - use sidebar buttons instead */
    .nav-auth,
    #navAuth,
    div.nav-auth,
    .nav-logout,
    #navLogout,
    div.nav-logout {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* Mobile profile links styling - HIDDEN by default, shown via JS when logged in */
.mobile-profile-link {
    display: none !important;
    /* Hidden by default - JS will override with inline style */
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Show mobile profile links when logged in */
.mobile-profile-link.visible {
    display: block !important;
}

.mobile-profile-link a {
    display: flex !important;
    align-items: center !important;
    padding: 16px 20px !important;
    color: #333333 !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    gap: 15px !important;
}

.mobile-profile-link a i {
    color: #1e3a5f !important;
    font-size: 1.1rem !important;
    width: 24px !important;
}

.mobile-profile-link a:hover {
    background: rgba(30, 58, 95, 0.05) !important;
}

/* ==================== MOBILE USER HEADER ==================== */
/* Shown at top of sidebar when logged in */
.mobile-user-header {
    display: none !important;
    /* Hidden by default */
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%) !important;
    padding: 15px 15px 12px 50px !important;
    /* Space for close button on left */
    margin: 0 !important;
    border-bottom: none !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    position: relative !important;
    width: 100% !important;
}

/* DESKTOP: Force hide mobile user header - it should NEVER show on desktop */
@media (min-width: 769px) {

    .mobile-user-header,
    #mobileUserHeader,
    #mobileUserHeader.visible {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Remove top padding from nav-menu when user header is visible */
.nav-menu.has-user-header {
    padding-top: 0 !important;
}

#mobileUserHeader {
    display: none !important;
    /* Hidden by default */
}

#mobileUserHeader.visible {
    display: flex !important;
}

/* Close button inside user header - top left corner */
.nav-close-in-header {
    position: absolute !important;
    left: 8px !important;
    top: 8px !important;
    transform: none !important;
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.7) !important;
    color: #ffffff !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
    z-index: 10 !important;
}

.nav-close-in-header:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: #ffffff !important;
}

/* Hide standalone close button when user header is visible */
#mobileUserHeader.visible~.nav-close-standalone {
    display: none !important;
}

.mobile-user-avatar {
    flex-shrink: 0;
}

.mobile-user-avatar i {
    font-size: 2rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.mobile-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mobile-user-name {
    font-weight: 600 !important;
    font-size: 1rem !important;
    color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-user-email {
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.7) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-user-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.mobile-action-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.mobile-action-icon:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: #ffffff !important;
}

.mobile-action-icon i {
    font-size: 0.95rem !important;
    color: #ffffff !important;
}

/* Force all mobile action icon elements to be white */
.mobile-action-icon i.fas,
.mobile-action-icon i.fa,
.mobile-action-icon i.far,
.mobile-user-actions .mobile-action-icon i {
    color: #ffffff !important;
    fill: #ffffff !important;
}


/* ==================== AUTH PAGE (Login/Signup/Forgot Password) ==================== */
/* Hide footer and prevent scroll on mobile for auth pages */
body.auth-page {
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !important;
    position: fixed !important;
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
    touch-action: none !important;
    -webkit-overflow-scrolling: auto !important;
}

body.auth-page footer,
body.auth-page .footer,
body.auth-page .site-footer {
    display: none !important;
}

@media (max-width: 768px) {
    body.auth-page {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        touch-action: none !important;
    }

    body.auth-page #app {
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        top: 0 !important;
        left: 0 !important;
    }
}



/* Show ads and banner sections when authenticated */
body.user-authenticated #ads,
body.user-authenticated #homepage-banner {
    display: flex !important;
}

/* Also show ads and banner sections for guest users who have selected a branch */
body.has-guest-selection #ads,
body.has-guest-selection #homepage-banner {
    display: flex !important;
}

/* ShowToGuest ads/banners are now served via API - no need to hide for guests */
/* The API returns only items with ShowToGuest=1 for unauthenticated users */
/* ==================== MOBILE SIDEBAR CLOSE, LOGIN & LOGOUT BUTTONS ==================== */

/* Close Button - Standalone (when not logged in) */
@media (max-width: 768px) {
    .nav-close-btn.nav-close-standalone {
        display: block !important;
        position: absolute;
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        background: #f1f5f9;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        z-index: 10;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .nav-close-btn.nav-close-standalone i {
        font-size: 1.2rem;
        color: #64748b;
    }

    .nav-close-btn.nav-close-standalone:hover {
        background: #e2e8f0;
    }

    /* Close Button - In Header (when logged in) */
    .nav-close-btn.nav-close-in-header {
        display: flex !important;
        position: absolute;
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        z-index: 10;
        align-items: center;
        justify-content: center;
    }

    .nav-close-btn.nav-close-in-header i {
        font-size: 1.2rem;
        color: #fff;
    }

    /* Sidebar Login Button - Green Style */
    .sidebar-login-item {
        display: block !important;
        width: 100%;
        padding: 0 15px;
        margin-top: auto;
        padding-bottom: 10px;
    }

    .sidebar-login-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 14px 20px;
        background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
        color: #fff;
        font-size: 1rem;
        font-weight: 600;
        border: none;
        border-radius: 12px;
        cursor: pointer;
        text-decoration: none;
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
        transition: all 0.3s ease;
    }

    .sidebar-login-btn:hover {
        background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
    }

    .sidebar-login-btn i {
        font-size: 1.1rem;
    }

    /* When logged in, hide sidebar login */
    body.user-authenticated .sidebar-login-item {
        display: none !important;
    }

    /* Sidebar Logout Button - Red Style */
    .sidebar-logout-item {
        width: 100%;
        padding: 0 15px;
        margin-top: auto;
        padding-bottom: 10px;
    }

    body.user-authenticated .sidebar-logout-item {
        display: block !important;
    }

    .sidebar-logout-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 14px 20px;
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        color: #fff;
        font-size: 1rem;
        font-weight: 600;
        border: none;
        border-radius: 12px;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
    }

    .sidebar-logout-btn:hover {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    }

    .sidebar-logout-btn i {
        font-size: 1.1rem;
    }
}

/* ==================== MOBILE SIDEBAR USER HEADER ==================== */
@media (max-width: 768px) {

    /* User Header - Shows when logged in */
    /* User Header - Shows when logged in */
    /* User Header - Shows when logged in */
    .mobile-user-header {
        display: none;
        width: 100%;
        padding: 5px 12px;
        /* Standard compact padding */
        background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
        margin: 0;
        margin-bottom: 0;
        position: relative;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        /* Items flow naturally */
        gap: 12px;
        /* Space between Button, Info, and Icons */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-sizing: border-box;
        border-radius: 0 !important;
        overflow: visible !important;
        min-height: 60px;
        max-height: 70px;
    }

    .mobile-user-header.visible {
        display: flex !important;
        visibility: visible !important;
    }

    /* Close Button in Header - Static Flex Item */
    .nav-close-btn.nav-close-in-header {
        display: flex !important;
        position: static !important;
        /* No longer absolute */
        top: auto;
        left: auto;
        transform: none;
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        z-index: 20;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
        flex-shrink: 0;
        /* Don't shrink */
        order: -1;
        /* Ensure it stays first */
        margin: 0;
        /* Gap handled by parent */
    }

    .nav-close-btn.nav-close-in-header:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    .nav-close-btn.nav-close-in-header i {
        font-size: 1.2rem;
        color: #fff;
    }

    /* User Info Container */
    .mobile-user-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding-right: 0;
        flex: 1;
        /* Take remaining space */
        max-width: calc(100% - 80px);
        /* Leave space for icons */
        box-sizing: border-box;
    }

    .mobile-user-name {
        font-size: 0.9rem;
        font-weight: 600;
        color: #fff;
        line-height: 1.1;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        max-width: 100%;
    }

    .mobile-user-email {
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.85);
        line-height: 1.1;
        margin-top: 1px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        max-width: 100%;
    }

    /* Action Icons Row - Now positioned on right */
    .mobile-user-actions {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        margin: 0;
    }

    /* Unified Icon Style */
    .mobile-action-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        color: #fff;
        font-size: 0.7rem;
        transition: all 0.3s ease;
        border: 1px solid rgba(255, 255, 255, 0.15);
        text-decoration: none;
        flex-shrink: 0;
    }

    .mobile-action-icon:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    /* Hide standalone close button when user header is visible */
    .nav-menu.has-user-header .nav-close-standalone {
        display: none !important;
    }

    /* Show standalone close button when NOT logged in */
    .nav-menu:not(.has-user-header) .nav-close-standalone {
        display: flex !important;
    }
}

/* ==================== WELCOME SECTION - NO GAP FIX ==================== */
/* Welcome section should be flush with notification bar */







/* Mobile adjustments */
@media (max-width: 768px) {}

@media (max-width: 480px) {}

/* ==================== NEWS & EVENTS - PROFESSIONAL MODAL ==================== */
/* Premium modal design like Dainik Bhaskar / professional news sites */

/* News/Event Card - NO Hover Effects */
.news-item,
.event-item {
    cursor: pointer;
    transition: none !important;
    position: relative;
    overflow: hidden;
}

/* Shine effect disabled */
.news-item::before,
.event-item::before {
    display: none !important;
}

/* HOVER EFFECTS DISABLED */
.news-item:hover,
.event-item:hover {
    transform: none !important;
    box-shadow: none !important;
}

.news-item:hover::before,
.event-item:hover::before {
    left: -100% !important;
    /* Keep hidden */
}

.news-item:active,
.event-item:active {
    transform: none !important;
    box-shadow: none !important;
}

/* Click indicator hidden */
.news-item::after,
.event-item::after {
    display: none !important;
}

.news-item:hover::after,
.event-item:hover::after {
    opacity: 0 !important;
    display: none !important;
}

/* Modal Overlay */
.news-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Modal Container */
.news-modal {
    background: #ffffff;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    transform: scale(0.9) translateY(30px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.news-modal-overlay.active .news-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.news-modal-header {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.news-modal-header .modal-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(10px);
}

.news-modal-header .modal-type-badge i {
    font-size: 0.9rem;
}

.news-modal-header .modal-type-badge.event-badge {
    background: rgba(255, 193, 7, 0.3);
}

/* Close Button */
.news-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.news-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

/* Modal Image */
.news-modal-image {
    width: 100%;
    max-height: 350px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
}

.news-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-modal-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), transparent);
    pointer-events: none;
}

/* No image placeholder */
.news-modal-image.no-image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.news-modal-image.no-image i {
    font-size: 3rem;
    color: #cbd5e1;
}

/* Modal Body */
.news-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.news-modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-modal-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.news-modal-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #64748b;
}

.news-modal-meta-item i {
    color: #667eea;
    font-size: 1rem;
}

.news-modal-meta-item.event-date {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 6px 14px;
    border-radius: 50px;
    color: #92400e;
    font-weight: 600;
}

.news-modal-meta-item.event-date i {
    color: #d97706;
}

/* Modal Description */
.news-modal-description {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #475569;
    text-align: justify;
}

.news-modal-description p {
    margin-bottom: 15px;
}

/* Divider */
.news-modal-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    margin-bottom: 20px;
}

/* Modal Footer */
.news-modal-footer {
    padding: 20px 30px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.news-modal-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-modal-share span {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

/* Mobile responsive for event article share buttons */
@media (max-width: 768px) {
    .event-article .share-buttons {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 8px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 20px !important;
    }

    .event-article .share-btn {
        width: 48px !important;
        height: 48px !important;
        flex-shrink: 0 !important;
    }

    /* Fix for footer share buttons (different class names) */
    .footer-share-btns {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 8px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 20px !important;
    }

    .share-icon-btn {
        width: 48px !important;
        height: 48px !important;
        flex-shrink: 0 !important;
    }

    /* SAME LAYOUT FOR NEWS ARTICLES */
    .news-article .share-buttons {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 8px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 20px !important;
    }

    .news-article .share-btn {
        width: 48px !important;
        height: 48px !important;
        flex-shrink: 0 !important;
        border-radius: 50% !important;
        padding: 0 !important;
        min-width: auto !important;
    }

    .news-article .share-btn span {
        display: none !important;
    }

    .news-article .footer-share-btns {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 8px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 20px !important;
    }

    .news-article .share-icon-btn {
        width: 48px !important;
        height: 48px !important;
        flex-shrink: 0 !important;
    }

    /* ALSO FIX THE NEWS PORTAL SHARE BUTTONS */
    .share-buttons {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 8px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 20px !important;
    }

    .share-btn {
        width: 48px !important;
        height: 48px !important;
        flex-shrink: 0 !important;
        border-radius: 50% !important;
        padding: 0 !important;
        min-width: auto !important;
    }

    .share-btn span {
        display: none !important;
    }

    /* Reduce footer spacing on mobile */
    .event-article .article-footer {
        margin-top: 15px !important;
        padding-top: 15px !important;
    }

    .event-article .footer-source {
        margin-bottom: 15px !important;
    }

    .event-article .footer-share {
        padding: 15px !important;
    }

    /* SAME FOOTER SPACING FOR NEWS ARTICLES */
    .news-article .article-footer {
        margin-top: 15px !important;
        padding-top: 15px !important;
    }

    .news-article .footer-source {
        margin-bottom: 15px !important;
    }

    .news-article .footer-share {
        padding: 15px !important;
    }

    /* Move related news section closer on mobile */
    .related-news-section {
        margin-top: 0 !important;
        padding: 12px 20px !important;
    }

    .related-news-title {
        margin-bottom: 20px !important;
        font-size: 1.4rem !important;
    }

    .related-news-grid {
        gap: 18px !important;
    }
}

@media (max-width: 480px) {
    .event-article .share-buttons {
        gap: 6px !important;
        padding: 0 15px !important;
    }

    .event-article .share-btn {
        width: 44px !important;
        height: 44px !important;
    }

    /* Fix for footer share buttons */
    .footer-share-btns {
        gap: 6px !important;
        padding: 0 15px !important;
    }

    .share-icon-btn {
        width: 44px !important;
        height: 44px !important;
    }

    /* SAME FOR NEWS ARTICLES */
    .news-article .share-buttons {
        gap: 6px !important;
        padding: 0 15px !important;
    }

    .news-article .share-btn {
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        min-width: auto !important;
    }

    .news-article .share-btn span {
        display: none !important;
    }

    .news-article .footer-share-btns {
        gap: 6px !important;
        padding: 0 15px !important;
    }

    .news-article .share-icon-btn {
        width: 44px !important;
        height: 44px !important;
    }

    /* ALSO FIX THE NEWS PORTAL SHARE BUTTONS */
    .share-buttons {
        flex-direction: row !important;
        gap: 6px !important;
        padding: 0 15px !important;
    }

    .share-btn {
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        min-width: auto !important;
    }

    .share-btn span {
        display: none !important;
    }

    /* Further reduce footer spacing on smaller mobile */
    .event-article .article-footer {
        margin-top: 10px !important;
        padding-top: 10px !important;
    }

    .event-article .footer-source {
        margin-bottom: 10px !important;
    }

    .event-article .footer-share {
        padding: 10px !important;
    }

    /* SAME FOR NEWS ARTICLES */
    .news-article .article-footer {
        margin-top: 10px !important;
        padding-top: 10px !important;
    }

    .news-article .footer-source {
        margin-bottom: 10px !important;
    }

    .news-article .footer-share {
        padding: 10px !important;
    }

    /* Move related news section closer on smaller mobile */
    .related-news-section {
        margin-top: 0 !important;
        padding: 10px 15px !important;
    }

    .related-news-title {
        margin-bottom: 18px !important;
        font-size: 1.3rem !important;
    }

    .related-news-grid {
        gap: 15px !important;
    }
}

@media (max-width: 360px) {
    .event-article .share-buttons {
        gap: 4px !important;
        padding: 0 10px !important;
    }

    .event-article .share-btn {
        width: 40px !important;
        height: 40px !important;
    }

    /* Fix for footer share buttons */
    .footer-share-btns {
        gap: 4px !important;
        padding: 0 10px !important;
    }

    .share-icon-btn {
        width: 40px !important;
        height: 40px !important;
    }

    /* SAME FOR NEWS ARTICLES */
    .news-article .share-buttons {
        gap: 4px !important;
        padding: 0 10px !important;
    }

    .news-article .share-btn {
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        min-width: auto !important;
    }

    .news-article .share-btn span {
        display: none !important;
    }

    .news-article .footer-share-btns {
        gap: 4px !important;
        padding: 0 10px !important;
    }

    .news-article .share-icon-btn {
        width: 40px !important;
        height: 40px !important;
    }

    /* ALSO FIX THE NEWS PORTAL SHARE BUTTONS */
    .share-buttons {
        flex-direction: row !important;
        gap: 4px !important;
        padding: 0 10px !important;
    }

    .share-btn {
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        min-width: auto !important;
    }

    .share-btn span {
        display: none !important;
    }

    /* Minimal footer spacing on very small screens */
    .event-article .article-footer {
        margin-top: 8px !important;
        padding-top: 8px !important;
    }

    .event-article .footer-source {
        margin-bottom: 8px !important;
    }

    .event-article .footer-share {
        padding: 8px !important;
    }

    /* SAME FOR NEWS ARTICLES */
    .news-article .article-footer {
        margin-top: 8px !important;
        padding-top: 8px !important;
    }

    .news-article .footer-source {
        margin-bottom: 8px !important;
    }

    .news-article .footer-share {
        padding: 8px !important;
    }

    /* Move related news section closer to share buttons on mobile */
    .related-news-section {
        margin-top: 0 !important;
        padding: 8px 15px !important;
    }

    .related-news-title {
        margin-bottom: 15px !important;
        font-size: 1.2rem !important;
    }

    .related-news-grid {
        gap: 12px !important;
    }
}

.share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.share-btn.facebook {
    background: #1877F2;
    color: white;
}

.share-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.share-btn.copy-link {
    background: #64748b;
    color: white;
}

.share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.news-modal-close-btn {
    padding: 10px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.news-modal-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
    .news-modal-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .news-modal {
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
        margin-bottom: 0;
    }

    .news-modal-overlay.active .news-modal {
        transform: scale(1) translateY(0);
    }

    .news-modal-header {
        padding: 15px 20px;
    }

    .news-modal-image {
        max-height: 220px;
    }

    .news-modal-body {
        padding: 20px;
    }

    .news-modal-title {
        font-size: 1.3rem;
    }

    .news-modal-description {
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .news-modal-footer {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .news-modal-share {
        width: 100%;
        justify-content: center;
    }

    .news-modal-close-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .news-modal-header .modal-type-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .news-modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .news-modal-meta {
        gap: 12px;
    }

    .news-modal-meta-item {
        font-size: 0.8rem;
    }
}

/* Body overflow hidden when modal is open */
body.modal-open {
    overflow: hidden !important;
}

/* Animation keyframes */
@keyframes modalSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==================== HOME PAGE LAYOUT FIXES ==================== */
/* Fix overlap of first section with fixed navbar */
/* First visible section should NOT have margin - content wrapper handles it */
.first-visible-section {
    margin-top: 0 !important;
}

/* Adjust for notification bar - no additional margin needed */
body.has-notification .first-visible-section {
    margin-top: 0 !important;
}



/* ==================== MOBILE SIDEBAR - REDUCED TOP SPACE FIX ==================== */
/* Fix: Menu items should be closer to top when not logged in */
@media (max-width: 768px) {

    /* Ensure nav-menu has proper padding (reset) */
    .nav-menu {
        padding-top: 0 !important;
    }

    /* When user header is visible (logged in), hide the generic menu header */
    .nav-menu.has-user-header .mobile-menu-header {
        display: none !important;
    }

    /* NEW: Modern Mobile Menu Header (Brand + Close) */
    .mobile-menu-header {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 15px !important;
        /* Proper gap */
        padding: 20px 20px 15px 20px !important;
        margin-bottom: 10px !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
        background: #ffffff !important;
    }

    .mobile-brand {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        color: #1e3a5f !important;
        /* Brand Dark Blue */
        flex-grow: 0 !important;
        /* Do NOT grow, allow next item to be close */
        width: auto !important;
    }

    .mobile-brand i {
        color: #c9a227 !important;
        /* Brand Gold */
    }

    /* Close button - Styled nicely */
    .mobile-menu-header .nav-close-btn {
        background: rgba(0, 0, 0, 0.05) !important;
        color: #64748b !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
        border: none !important;
        margin: 0 !important;
        cursor: pointer !important;
    }

    .mobile-menu-header .nav-close-btn:hover {
        background: rgba(0, 0, 0, 0.08) !important;
        color: var(--primary) !important;
    }

    /* Legacy support - hide standalone id-based styles if any remain */
    #navCloseBtnStandalone.nav-close-standalone {
        position: static !important;
        /* Reset absolute positioning */
        background: rgba(0, 0, 0, 0.05) !important;
    }

    /* Home menu item and other items - remove extra top margin */
    .nav-menu>li:first-of-type:not(.mobile-user-header):not(.sidebar-login-item):not(.sidebar-logout-item) {
        margin-top: 0 !important;
    }

    /* Reduce padding on menu items */
    .nav-menu li a {
        padding: 12px 20px !important;
    }
}

/* ==================== NEWS & EVENT ITEM LINKS ==================== */
/* Ensure links wrap items properly without default link styling */
.news-item-link,
.event-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.news-item-link:hover,
.event-item-link:hover {
    text-decoration: none;
}

/* ==================== HOME PAGE GAP FIX - NON-AUTHENTICATED USERS ==================== */
/* Fix: Use same approach as authenticated users - blue gradient fills the gap */
/* No margin-top changes needed - wrapper handles positioning correctly */

/* Ads and banner sections - ensure no extra spacing */
body.home-page:not(.user-authenticated) .ads-section-contained,
body.home-page:not(.user-authenticated) .banner-section-contained {
    margin-top: 0 !important;
}

/* SPECIFIC FIX: Non-authenticated users - Move ads section higher up using ID SELECTOR */
body.home-page:not(.user-authenticated) #ads {
    position: relative !important;
    margin-top: -45px !important;
    /* Pull up to touch header */
    z-index: 10 !important;
    top: 0 !important;
}

/* When notification bar is present */
body.home-page:not(.user-authenticated).has-notification #ads {
    margin-top: -45px !important;
    /* Consistent pull up */
    top: 0 !important;
}

/* MOBILE FIX: Prevent ads from being hidden behind notification in mobile */
@media (max-width: 768px) {
    body.home-page:not(.user-authenticated) #ads {
        margin-top: 0 !important;
        /* Reset margin as padding is now correct */
    }

    body.home-page:not(.user-authenticated).has-notification #ads {
        margin-top: 0 !important;
    }
}

/* Also fix banner section to follow ads positioning using ID SELECTOR */
body.home-page:not(.user-authenticated) #homepage-banner {
    position: relative !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    top: 0 !important;
}

/* When notification bar is present */
body.home-page:not(.user-authenticated).has-notification #homepage-banner {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    top: 0 !important;
}

/* MOBILE FIX: Adjust banner positioning for mobile */
@media (max-width: 768px) {
    body.home-page:not(.user-authenticated) #homepage-banner {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    body.home-page:not(.user-authenticated).has-notification #homepage-banner {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
}

/* Fix News & Events section to eliminate blue gap below banner - DISABLED */
/* body.home-page:not(.user-authenticated).has-notification .news-events-section {
    position: relative !important;
    top: -50px !important;
    /* Move news section up to touch banner - DISABLED */
/* margin-top: 0 !important;
} */

/* CRITICAL FIX: News Detail Page Header Positioning */
body.has-notification .news-article .article-header,
body.has-notification .event-article .article-header {
    padding-top: calc(var(--navbar-height, 81px) + var(--notification-height, 35px) + 40px) !important;
    margin-top: calc(-1 * (var(--navbar-height, 81px) + var(--notification-height, 35px) - 100px)) !important;
}

/* Mobile responsive */
@media (max-width: 768px) {

    body.has-notification .news-article .article-header,
    body.has-notification .event-article .article-header {
        padding-top: calc(var(--navbar-height, 81px) + var(--notification-height, 35px) + 30px) !important;
    }
}

/* ==================== NAVBAR LAYOUT FIX - DESKTOP ==================== */
/* Fix spacing between Nav Menu and Choose City when not logged in */
/* Ensure User Dropdown stays on right when logged in */
@media (min-width: 769px) {

    /* 1. Ensure container packs items to the LEFT */
    .navbar .container {
        justify-content: flex-start !important;
        gap: 0 !important;
    }

    /* 2. Brand & Left Section - Allow full width */
    .nav-left-section {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        margin-right: 0 !important;
        /* Minimal space after brand */
    }

    .nav-brand {
        max-width: none !important;
        width: auto !important;
        flex-shrink: 0 !important;
    }

    .nav-brand span {
        max-width: none !important;
        overflow: visible !important;
        white-space: nowrap !important;
    }

    /* SPECIFIC OVERRIDE for logged-in users to prevent shrinking */
    body.user-authenticated .nav-brand,
    body.user-authenticated .nav-left-section {
        flex-shrink: 0 !important;
        max-width: none !important;
        width: auto !important;
    }

    body.user-authenticated .nav-brand span {
        max-width: none !important;
        overflow: visible !important;
    }

    @media (max-width: 400px) {
        .nav-brand span {
            max-width: 140px !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            white-space: nowrap !important;
        }
    }

    /* 3. Nav Menu - Natural layout */
    .nav-menu {
        margin: 0 !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }

    /* 4. City Selector - Push to RIGHT, separate from Menu */
    .nav-city-selector-desktop {
        margin-left: auto !important;
        /* Push everything to the right */
        margin-right: 20px !important;
        /* Gap between City and Profile */
        flex-shrink: 0 !important;
    }

    /* OVERRIDE for Guest Users: Keep City Selector close to menu/login link */
    body:not(.user-authenticated) .nav-city-selector-desktop {
        margin-left: 20px !important;
        /* Just a small gap, don't push right */
        margin-right: 0 !important;
    }

    /* 5. User Dropdown - Stays on right after City Selector */
    .user-dropdown {
        margin-left: 0 !important;
        flex-shrink: 0 !important;
    }
}

/* ==================== FIX: MOBILE DROPDOWN PUSHES CONTENT DOWN ==================== */
/* Ensure dropdowns push content down instead of overlapping */

@media (max-width: 768px) {

    /* 1. Ensure Nav Menu handles flow correctly in a column */
    .nav-menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        height: 100vh !important;
        overflow-y: auto !important;
        padding-bottom: 50px !important;
        /* Space at bottom for scrolling */
    }

    /* 2. Dropdown Container - Takes full width */
    .nav-dropdown {
        width: 100% !important;
        display: block !important;
    }

    /* Dropdown Toggle - Full width flex */
    .dropdown-toggle {
        width: 100% !important;
        justify-content: space-between !important;
        padding-right: 20px !important;
    }

    /* 3. Make Dropdown Menu STATIC so it takes space in flow */
    .dropdown-menu {
        position: static !important;
        /* Removes absolute positioning */
        float: none !important;
        width: 100% !important;
        box-shadow: none !important;
        background: rgba(0, 0, 0, 0.03) !important;
        /* Light grey background */
        border-radius: 8px !important;
        margin-top: 5px !important;
        padding: 5px 0 !important;
        /* Default state: COLLAPSED (display: none) */
        display: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        transition: none !important;
        /* Remove transition to avoid layout jumpiness */
    }

    /* Show dropdown when active - using display: block to PUSH content down */
    /* Remove hover trigger for mobile to ensure click-to-close works */
    .nav-dropdown.active .dropdown-menu {
        display: block !important;
    }

    /* Style for dropdown items - indented */
    .dropdown-menu a {
        padding: 10px 20px 10px 40px !important;
        /* Indent nested items */
        color: #555 !important;
        font-size: 0.9rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 4. Ensure Login/Logout items are regular block items that get pushed down */
    .sidebar-login-item,
    .sidebar-logout-item {
        margin-top: 15px !important;
        margin-bottom: 20px !important;
        width: 100% !important;
        display: block !important;
        position: static !important;
        /* Ensure not fixed/sticky */
    }

    /* Increased specificity to override .nav-menu li a padding */
    .nav-menu .sidebar-login-btn,
    .nav-menu .sidebar-logout-btn {
        width: 100% !important;
        display: flex !important;
        /* Ensure flex display for aligning items */
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 15px !important;
        /* Reduced padding */
        min-height: 36px !important;
        /* Reduced height */
        font-size: 0.9rem !important;
        /* Slightly smaller font if needed */
        margin: 0 !important;
        /* Reset margins */
    }

    /* 5. Hide the duplicate fixed/floating buttons outside the menu */
    #navAuth,
    #navLogout {
        display: none !important;
    }
}

/* ==================== FAMILY DIRECTORY STYLES ==================== */
.directory-page {
    background-color: #f8fafc;
    min-height: 100vh;
    padding-bottom: 40px;
}

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

.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 10px;
}

.page-header p {
    color: #64748b;
    font-size: 1rem;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.families {
    background-color: #eff6ff;
    color: #3b82f6;
}

.stat-icon.members {
    background-color: #f0fdf4;
    color: #22c55e;
}

.stat-icon.cities {
    background-color: #fff7ed;
    color: #f97316;
}

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #1e3a5f;
}

.stat-info p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

/* Search & Filter Section */
.search-filter {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    /* Added for better mobile responsiveness */
    gap: 15px;
    margin-bottom: 30px;
    position: sticky;
    top: 85px;
    /* Below navbar */
    z-index: 100;
    border: 1px solid #e2e8f0;
}

.search-box {
    flex: 2;
    min-width: 250px;
    /* Ensure logical min width */
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-box input {
    width: 100%;
    height: 48px;
    padding: 0 12px 0 45px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: #3b82f6;
}

.filter-select {
    flex: 1;
    min-width: 150px;
    height: 48px;
    padding: 0 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    background-color: #fff;
    color: #1e293b;
    line-height: 48px;
    /* Match height for vertical centering */
}

/* Families Grid - Responsive Grid with auto-fill */
.families-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    /* Responsive card width */
    gap: 25px;
}

/* Family Card */
.family-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 250px;
    /* Ensure uniform height look */
}

.family-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.family-card-header {
    padding: 20px;
    background: linear-gradient(to right, #f8fafc, #ffffff);
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 15px;
}

.family-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.family-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.family-photo i {
    font-size: 1.5rem;
    color: #94a3b8;
}

.family-header-info {
    flex: 1;
    overflow: hidden;
}

.family-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.family-location {
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.family-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.family-info .info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.family-info .info-row i {
    width: 20px;
    color: #94a3b8;
    text-align: center;
}

/* Members Preview */
.family-members-preview {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
}

.member-avatars {
    display: flex;
    padding-left: 10px;
}

.member-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid white;
    margin-left: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.member-avatar i {
    font-size: 0.7rem;
    color: #94a3b8;
}

.member-count {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.btn-view-profile {
    width: 100%;
    padding: 12px;
    background: #f8fafc;
    border: none;
    border-top: 1px solid #f1f5f9;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-view-profile:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.btn-view-profile i {
    font-size: 0.9rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    grid-column: 1 / -1;
    /* Stretch across grid */
}

.empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 15px;
    display: block;
}

/* Register CTA */
.register-cta {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.2);
}

.register-cta h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.register-cta .btn {
    background: #c9a227;
    color: #0f172a;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.register-cta .btn:hover {
    transform: translateY(-2px);
    background: #fbbf24;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

/* Loading */
.loading {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design for Directory */
@media (max-width: 768px) {
    .directory-container {
        padding: 15px;
        padding-top: 10px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    /* Stack stats */
    .stats-bar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    /* Stack search */
    .search-filter {
        flex-direction: column;
        padding: 15px;
        top: 81px;
        /* Match navbar height */
        /* Adjust sticky top */
        z-index: 994;
    }

    body.has-notification .search-filter {
        top: 116px;
        /* navbar(81) + notification(35) */
    }

    .search-box,
    .filter-select {
        flex: auto;
        width: 100%;
    }

    /* Stack CTA */
    .register-cta {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .register-cta .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== BUSINESS HUB FLOATING TAB ==================== */
.business-hub-float {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 58, 95, 0.85);
    /* Dark Navy Glass */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 15px 10px;
    border-radius: 12px 0 0 12px;
    z-index: 2000;
    text-decoration: none;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    writing-mode: vertical-lr;
    /* Vertical text */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #ff3b30;
    /* User's Red Line */
    border-right: none;
}

/* Hide by default on all pages */
.business-hub-float {
    display: none !important;
}

/* Show ONLY on Home Page */
body.home-page .business-hub-float {
    display: block !important;
}

.business-hub-float:hover {
    padding-right: 25px;
    background: var(--primary);
    color: var(--white);
}

.business-hub-float .float-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.business-hub-float i {
    font-size: 1.2rem;
    writing-mode: horizontal-tb;
    /* Keep icon horizontal */
    margin-bottom: 5px;
    color: var(--accent);
}

.business-hub-float span {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .business-hub-float {
        padding: 10px 4px;
    }

    .business-hub-float .float-content {
        gap: 8px;
    }

    .business-hub-float i {
        font-size: 1rem;
    }

    .business-hub-float span {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }
}



/* ==================== BUSINESS HUB PAGE STYLES ==================== */
.business-hub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.business-search-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.business-search-section .form-group {
    flex: 1;
    min-width: 250px;
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.business-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.business-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--gold-gradient);
}

.business-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.business-card h3 {
    color: var(--primary);
    margin-bottom: 6px;
    font-size: 1.2rem;
}

.business-info {
    margin-bottom: 15px;
}

.business-info p {
    margin: 4px 0;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.business-info i {
    color: var(--accent);
    width: 20px;
}

.business-info p a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.business-info p a:hover {
    color: var(--primary);
    transform: translateX(3px);
}

.business-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.business-actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 0.85rem;
}

/* Modal for Registration */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 95%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.5rem;
    cursor: pointer;
}