:root {
    --warm-white: #FFFFFF;
    --cream-2: #F4EFE6;
    --maroon: #5B1A18;
    --text-secondary: #4A3A2A;
}

/* ════════════ TOP BAR ════════════ */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background-color: #FAF4E6;
    /* Warm soft cream/gold tint */
    border-bottom: 1px solid rgba(191, 161, 74, 0.15);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(40px, calc((100% - 1200px) / 2));
    font-size: 0.85rem;
    color: #4A3A2A;
    /* Warm dark brown/secondary text */
    transition: opacity 0.4s ease, visibility 0.4s, background-color 0.3s ease;
}

body.scrolled .top-bar {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.scrolled .top-bar-contact {
    transform: translateX(-150px);
    opacity: 0;
}

body.scrolled .top-bar-weather {
    transform: translateX(150px);
    opacity: 0;
}

body.scrolled .top-bar-status {
    transform: translateX(150px);
    opacity: 0;
}

body.scrolled .top-bar-socials {
    transform: translateX(150px);
    opacity: 0;
}

body.scrolled .top-bar-time {
    transform: translateY(-50%) translateX(150px);
    opacity: 0;
}

/* Contact Info */
.top-bar-contact {
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    transform: translateX(0);
    opacity: 1;
}

.top-bar-contact a {
    color: #4A3A2A;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.top-bar-contact a:hover {
    color: var(--maroon);
}

.top-bar-contact i {
    font-size: 1.15rem;
    width: 22px;
    /* Fixed container size for perfect size matching */
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Individual Contact Icon Sizing overrides */
.top-bar-contact a i.bi-envelope {
    font-size: 1.28rem;
}
.top-bar-contact a i.bi-whatsapp {
    font-size: 1.15rem;
}

/* Darshan Status Pill */
/* Weather Pill */
.top-bar-weather {
    margin-left: auto; /* Push weather and status to the right */
    margin-right: 12px;
    display: flex;
    align-items: center;
    background: #FFFFFF;
    color: #4A3A2A;
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(191, 161, 74, 0.2);
    box-shadow: 0 2px 8px rgba(74, 58, 42, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    line-height: 1;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: default;
    transform: translateX(0);
    opacity: 1;
}

/* Location tooltip on hover */
.top-bar-weather::after {
    content: attr(data-location);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #3A2518;
    color: #FAF4E6;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1002;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.02em;
}

/* Tooltip arrow */
.top-bar-weather::before {
    content: '';
    position: absolute;
    top: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border: 5px solid transparent;
    border-bottom-color: #3A2518;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1002;
}

.top-bar-weather:hover::after,
.top-bar-weather:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.top-bar-weather .weather-icon-3d {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    object-fit: contain;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Time Clock Pill */
.top-bar-time {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) translateX(0);
    display: flex;
    align-items: center;
    background: #FFFFFF;
    color: #4A3A2A;
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(191, 161, 74, 0.2);
    box-shadow: 0 2px 8px rgba(74, 58, 42, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    line-height: 1;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    opacity: 1;
}

.top-bar-time .time-icon-3d {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    object-fit: contain;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Blinking colon for real-time clock simulation */
.time-colon {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.time-colon-off {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.top-bar-status {
    margin-right: 28px; /* Original gap before socials container */
    display: flex;
    align-items: center;
    background: #FFFFFF;
    color: #4A3A2A;
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(191, 161, 74, 0.2);
    box-shadow: 0 2px 8px rgba(74, 58, 42, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    transform: translateX(0);
    opacity: 1;

    /* Dynamic status colors */
    --status-color: #EF4444;
    /* Default: Red */
    --status-color-light: rgba(239, 68, 68, 0.18);
}

.top-bar-status.status-open {
    --status-color: #22C55E;
    /* Green */
    --status-color-light: rgba(34, 197, 94, 0.18);
}

.top-bar-status.status-warning {
    --status-color: #F59E0B;
    /* Orange */
    --status-color-light: rgba(245, 158, 11, 0.18);
}

.top-bar-status.status-closed-day {
    --status-color: #EF4444;
    /* Red */
    --status-color-light: rgba(239, 68, 68, 0.18);
}

.top-bar-status.status-closed-night {
    --status-color: #9CA3AF;
    /* Grey */
    --status-color-light: rgba(156, 163, 175, 0.18);
}

.top-bar-status.status-opening-soon {
    --status-color: #3B82F6;
    /* Blue — opening countdown */
    --status-color-light: rgba(59, 130, 246, 0.18);
}

.top-bar-status .status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--status-color);
    border-radius: 50%;
    display: block; /* Flex item in pill */
    margin-right: 10px;
    position: relative;
    box-shadow: 0 0 0 4px var(--status-color-light); /* Soft outer ring */
    flex-shrink: 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Pulse Animation */
.top-bar-status .status-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 1px solid var(--status-color);
    animation: pulse-dot 2s infinite ease-out;
    opacity: 0;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

@keyframes pulse-dot {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

/* Social Media Links */
.top-bar-socials {
    display: flex;
    align-items: center;
    gap: 26px;
    /* Spaced out exactly like the screenshot */
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    transform: translateX(0);
    opacity: 1;
}

.top-bar-socials a {
    color: #4A3A2A;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    width: 18px;
    /* Fixed container size for perfect size matching */
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-bar-socials a:hover {
    color: var(--maroon);
    transform: scale(1.1);
}

/* Individual Icon Sizing to Compensate for Shape and Weight Differences */
.top-bar-socials a i.bi-youtube {
    font-size: 1.08rem;
}
.top-bar-socials a i.bi-instagram {
    font-size: 0.95rem;
}

/* Body and Navbar Adjustments for Top Bar */
body.has-top-bar {
    padding-top: 118px !important; /* 48px top bar + 70px navbar */
}

body.has-top-bar .navbar {
    position: fixed;
    top: 48px; /* Sits below top bar on desktop */
}

body.has-top-bar.scrolled .navbar {
    top: 0; /* Moves to the top when scrolled */
}

/* ════════════ RESPONSIVE TOP BAR ════════════ */
@media (max-width: 991px) {
    .top-bar {
        padding: 0 20px;
        height: 40px;
        font-size: 0.8rem;
    }

    body.scrolled .top-bar {
        transform: translateY(-40px); /* Move top bar out of viewport */
    }

    body.has-top-bar {
        padding-top: 110px !important; /* 40px top bar + 70px navbar */
    }

    body.has-top-bar .navbar {
        position: fixed;
        top: 40px; /* Sits below mobile top bar */
    }

    body.has-top-bar.scrolled .navbar {
        top: 0;
    }

    .top-bar-weather,
    .top-bar-time {
        display: none !important;
    }

    .top-bar-status {
        margin-left: auto; /* Push status to the right edge when weather/clock are hidden */
        margin-right: 0;
        /* Align directly to the right edge on mobile */
        padding: 4px 12px;
        font-size: 0.75rem;
    }

    .top-bar-socials {
        display: none;
        /* Hide socials in the top bar on tablet/mobile */
    }
}

@media (max-width: 576px) {
    .top-bar-contact span.contact-text {
        display: none;
        /* Hide text, keep icons only for email/phone */
    }

    .top-bar-contact {
        gap: 12px;
    }

    .top-bar-status {
        font-size: 0.75rem;
    }
}

/* ════════════ NAV BAR ════════════ */
html {
    scrollbar-gutter: stable;
}

body {
    padding-top: 70px !important;
    overflow-x: clip;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    box-sizing: border-box;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--gold);
    padding: 10px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scrolled (Sticky) Navbar Morph State */
body.scrolled .navbar {
    height: 60px;
    padding: 5px 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(74, 58, 42, 0.08);
    border-bottom: 1.5px solid rgba(191, 161, 74, 0.3);
}

body.scrolled .nav-logo {
    width: 38px;
    height: 38px;
}

body.scrolled .nav-title {
    font-size: 1.15rem;
}

body.scrolled .nav-title span {
    font-size: 0.7rem;
    letter-spacing: 1px;
}

@media (max-width: 991px) {
    body.scrolled .navbar {
        height: 56px;
        padding: 5px 20px;
    }
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    z-index: 1001;
}

.nav-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 50%;
    border: 1.5px solid var(--gold);
    transition: transform 0.3s ease;
}

.nav-brand:hover .nav-logo {
    transform: scale(1.05);
}

.nav-title {
    font-family: 'Jost', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--maroon);
    line-height: 1.1;
}

.nav-title span {
    display: block;
    font-size: 0.75rem;
    color: var(--saffron);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--maroon);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--maroon);
}

.nav-links a:focus {
    outline: none;
}

.btn-nav-book {
    background: linear-gradient(135deg, var(--saffron), var(--maroon));
    color: white !important;
    padding: 9px 23px;
    border-radius: 25px;
    font-weight: 700 !important;
    position: relative;
    overflow: hidden;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.35);
    /* Glass border highlight */
    box-shadow: 0 4px 15px rgba(91, 26, 24, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-nav-book:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(91, 26, 24, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.55);
}

/* Glass Shine Reflection Sweep Animation */
.btn-nav-book::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 50%;
    height: 200%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.4) 30%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0.4) 70%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(25deg);
    pointer-events: none;
    animation: glass-shine-sweep 5s infinite ease-in-out;
}

@keyframes glass-shine-sweep {
    0% {
        left: -100%;
    }

    20% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--maroon);
    cursor: pointer;
    z-index: 10002;
    transition: transform 0.3s ease;
}

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

.dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.dropdown-content {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #fff;
    min-width: 240px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    padding: 12px 0;
    z-index: 1100;
    border: 1px solid rgba(191, 161, 74, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-content a {
    color: var(--text-secondary);
    padding: 12px 24px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: left;
    border-bottom: none !important;
}

.dropdown-content a::after {
    display: none !important;
}

.dropdown-content a:hover {
    background-color: var(--cream);
    color: var(--maroon) !important;
    padding-left: 30px;
}

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

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

@media (max-width: 991px) {
    .navbar {
        padding: 10px 20px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        /* move fully out of viewport horizontally to avoid accidental overlap */
        right: -100vw;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--warm-white, #FFFFFF);
        flex-direction: column;
        justify-content: flex-start;
        padding: 100px 40px 40px;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 10000;
        pointer-events: none;
        /* prevent offscreen menu from blocking touches */
        display: flex;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
        pointer-events: auto;
    }

    .nav-links a {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        padding: 15px 0;
        border-bottom: 1px solid var(--cream-2);
    }

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

    .btn-nav-book {
        margin-top: 20px;
        width: 100%;
        text-align: center;
    }

    .nav-dropdown {
        width: 100%;
        text-align: center;
    }

    .dropdown-trigger {
        justify-content: center;
        padding: 15px 0;
        font-size: 1.2rem;
        border-bottom: 1px solid var(--cream-2);
        color: var(--text-secondary);
        transition: background 0.3s;
    }

    .dropdown-trigger:active,
    .dropdown-trigger:focus {
        background: var(--cream);
        outline: none;
    }

    .dropdown-content {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: block;
        max-height: 0;
        overflow: hidden;
        box-shadow: none;
        border: none;
        background: var(--cream-2);
        width: 100%;
        padding: 0;
        pointer-events: auto;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-dropdown.active .dropdown-content {
        max-height: 500px;
        transform: none;
    }

    .nav-dropdown.active .dropdown-trigger i {
        transform: rotate(180deg);
    }

    .dropdown-content a {
        padding: 12px 20px;
        text-align: center;
        font-size: 1.05rem;
    }
}

/* ════════════ 90HZ ULTRA-SMOOTH PREMIUM ANIMATIONS ════════════ */
[data-aos] {
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
    transition-duration: 900ms !important;
}

/* Smooth Snappy transitions for interactive elements (Expo curve) */
.btn-primary,
.btn-secondary,
.btn-nav-book,
.top-bar-contact a,
.top-bar-socials a,
.nav-links a,
.dropdown-content a,
.dropdown-trigger,
.card,
.seva-card,
.event-card,
.deity-card,
.feature-card,
.info-card,
.puja-card,
.status-card,
.faq-item,
.faq-question,
.nav-logo,
.nav-brand {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* ════════════ PREMIUM CUSTOM SCROLLBAR ════════════ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #FAF4E6;
    /* Light Cream background */
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 5px;
    border: 2px solid #FAF4E6;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--maroon);
}

/* ════════════ MOBILE & DESKTOP PREMIUM DROPDOWN INPUT UI ════════════ */
select,
select.form-input,
select.f-inp,
select.f-sel {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #FFFFFF !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235B1A18' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 14px 14px !important;
    padding-right: 42px !important;
    min-height: 48px !important;
    font-size: 1rem !important;
    border-radius: 12px !important;
    border: 1.5px solid var(--border-warm, #E0D3B8) !important;
    color: var(--text-primary, #1C1C1C) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
}

select:focus,
select.form-input:focus,
select.f-inp:focus,
select.f-sel:focus {
    border-color: #BFA14A !important;
    box-shadow: 0 0 0 4px rgba(191, 161, 74, 0.18) !important;
    outline: none !important;
}

.area-suggestion-item:hover {
    background-color: #FAF4E6 !important;
}