/* Top Navigation Bar Styles */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(250, 250, 250, 0.90) 30%,
            rgba(255, 255, 255, 0.75) 60%,
            rgba(250, 250, 250, 0.50) 85%,
            rgba(255, 255, 255, 0.25) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(255, 171, 64, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.4s ease,
        box-shadow 0.4s ease,
        border-bottom 0.4s ease;
}

/* Navbar hide on scroll down - smooth shutter effect */
.top-navbar.hidden {
    transform: translateY(-110%);
}

/* Navbar solid background when scrolled */
.top-navbar.scrolled {
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
    border-bottom: 2px solid #ffab40;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.top-navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 90px;
}

.top-navbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d84315;
    font-family: "Forum", serif;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    /* Removed transition and transform for static logo */
}

.top-navbar .logo:hover {
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
    background: none !important;
    opacity: 1 !important;
    cursor: default !important;
    /* Optional: if they want it to feel completely static */
}

.top-navbar .logo img {
    height: 40px !important;
    width: auto !important;
    object-fit: contain;
    transition: none !important;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
}

.top-navbar .logo img:hover {
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
}

.top-navbar .logo-icon {
    font-size: 32px;
    color: #d84315;
}

.top-navbar .logo-text {
    font-size: 22px;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    max-width: 800px;
}

.nav-link {
    position: relative;
    padding: 8px 20px;
    text-decoration: none;
    color: #3e2723;
    font-size: 15px;
    font-weight: 500;
    border-radius: 9px;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    background: transparent;
    color: #3e2723;
    border-bottom: 2px solid #ffab40;
}

.nav-link.active {
    background: #ffab40;
    color: #fafafa;
    font-weight: 600;
    box-shadow: none;
    border-bottom: 2px solid transparent;
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 10px 20px;
    height: auto;
    border-radius: 9px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.dropdown-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 171, 64, 0.1);
    padding: 16px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    border: 1px solid rgba(255, 171, 64, 0.15);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-section {
    margin-bottom: 16px;
}

.dropdown-section:last-child {
    margin-bottom: 0;
}

.dropdown-section:not(:last-child) {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 171, 64, 0.1);
}

.dropdown-title {
    font-size: 11px;
    font-weight: 600;
    color: #ff8f00;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    padding-bottom: 0;
    border-bottom: none;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #3e2723;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin-bottom: 4px;
    position: relative;
}

.dropdown-item:last-child {
    margin-bottom: 0;
}

.dropdown-item .material-icons {
    font-size: 20px;
    color: #ff8f00;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255, 171, 64, 0.08);
    border-color: rgba(255, 171, 64, 0.2);
    transform: translateX(2px);
}

.dropdown-item:hover .material-icons {
    color: #ff8f00;
    transform: scale(1.1);
}

.dropdown-item:active {
    background: rgba(255, 171, 64, 0.15);
    transform: translateX(0);
}

.dropdown-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: all 0.2s ease;
}

.dropdown-item:hover .dropdown-icon-img {
    transform: scale(1.1);
}

.dropdown-game-item {
    align-items: center;
    cursor: pointer;
}

.game-icon-dropdown-canvas {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    pointer-events: none;
    transition: all 0.2s ease;
}

.dropdown-item:hover .game-icon-dropdown-canvas {
    transform: scale(1.1);
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Forum", serif;
    font-size: 14px;
    background: linear-gradient(135deg, #d84315 0%, #ff5722 50%, #ffab40 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(216, 67, 21, 0.3);
    white-space: nowrap;
}

.nav-add-btn:hover {
    box-shadow: 0 4px 12px rgba(216, 67, 21, 0.4);
    transform: translateY(-2px);
}

.nav-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Forum", serif;
    font-size: 14px;
    background: none;
    color: #3e2723;
    border: 2px solid #ffab40;
    border-radius: 9px;
    padding: 8px 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: none;
    white-space: nowrap;
}

.nav-login-btn:hover {
    background: #ffab40;
    border-color: #ffab40;
    color: #fafafa;
    transform: none;
    box-shadow: none;
}

.nav-profile {
    display: flex;
    align-items: center;
}

.nav-profile .profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8f00 0%, #ffab40 55%, #ffd180 100%);
    border: 2px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 4px 12px rgba(255, 143, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-profile .profile-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 143, 0, 0.4);
}

/* Adjust main container to account for fixed navbar */
body {
    padding-top: 0;
    /* Remove padding since promo banner will overlap */
}

/* Add padding for pages that need it (only all-temples and request-access pages) */
body.all-temples-page .main-content,
body.request-access-page .main-content {
    padding-top: 80px;
}

.main-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Remove sidebar from layout */
.sidebar {
    display: none !important;
}

/* Make main content full width */
.main-content {
    flex: 1;
    width: 100%;
    padding: 0;
    margin: 0;
    overflow-y: auto;
}

/* AI Chat Link - Simple Design */
.ai-chat-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px !important;
    background: linear-gradient(90deg, #d84315 0%, #ff5722 50%, #ffab40 100%) !important;
    color: white !important;
    border-radius: 20px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    box-shadow: 0 4px 12px rgba(216, 67, 21, 0.35);
    border-bottom: none !important;
    white-space: nowrap;
    height: auto;
    line-height: 1;
}

.ai-chat-icon {
    font-size: 18px;
    display: inline-block;
    flex-shrink: 0;
}

.ai-chat-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline;
}

/* Responsive Design */
/* Small Tablet Responsive (768px - 920px) */
@media screen and (min-width: 768px) and (max-width: 920px) {

    /* Reduce padding */
    .top-navbar-container {
        padding: 0 20px;
    }

    /* Hide Live Darshan, Events, Granthalaya, Volunteer, Donations from main navbar */
    .nav-links>.nav-link[data-page="live-darshan"],
    .nav-links>.nav-link[data-page="events"],
    .nav-links>.nav-link[data-page="granthalaya"],
    .nav-links>.nav-link[data-page="volunteer"],
    .nav-links>.nav-link[data-page="donations"] {
        display: none;
    }

    /* Adjust nav links spacing */
    .nav-links {
        gap: 4px;
    }

    .nav-link {
        padding: 8px 14px;
        font-size: 14px;
    }

    /* Show small-tablet-only links (Live Darshan, Events) in Explore dropdown */
    .small-tablet-only-links {
        display: block;
    }

    /* Show tablet-only links (Granthalaya, Volunteer, Donations) in Explore dropdown */
    .tablet-only-links {
        display: block;
    }
}

/* Medium Tablet Responsive (921px - 1023px) */
@media screen and (min-width: 921px) and (max-width: 1023px) {

    /* Reduce padding from 90px to 30px */
    .top-navbar-container {
        padding: 0 30px;
    }

    /* Hide Granthalaya, Volunteer, Donations from main navbar only (not dropdown) */
    .nav-links>.nav-link[data-page="granthalaya"],
    .nav-links>.nav-link[data-page="volunteer"],
    .nav-links>.nav-link[data-page="donations"] {
        display: none;
    }

    /* Adjust nav links spacing */
    .nav-links {
        gap: 6px;
    }

    .nav-link {
        padding: 8px 16px;
        font-size: 14px;
    }

    /* Keep visible: Logo, Mandapam, Live, Events, Explore, Profile */
    /* These will remain visible by default */

    /* Hide small-tablet-only links on medium tablets */
    .small-tablet-only-links {
        display: none;
    }

    /* Show tablet-only links in Explore dropdown */
    .tablet-only-links {
        display: block;
    }
}

/* Large Tablet / Small Desktop Responsive (1020px - 1300px) */
@media screen and (min-width: 1020px) and (max-width: 1300px) {

    /* Standard padding */
    .top-navbar-container {
        padding: 0 40px;
    }

    /* Hide Volunteer and Donations from main navbar */
    .nav-links>.nav-link[data-page="volunteer"],
    .nav-links>.nav-link[data-page="donations"] {
        display: none;
    }

    /* Adjust nav links spacing */
    .nav-links {
        gap: 6px;
    }

    .nav-link {
        padding: 8px 16px;
        font-size: 14px;
    }

    /* Keep visible: Logo, Mandapam, Live Darshan, Events, Granthalaya, Om AI, Explore, Profile */

    /* Hide small-tablet-only links */
    .small-tablet-only-links {
        display: none;
    }

    /* Show tablet-only links (Volunteer, Donations) in Explore dropdown */
    .tablet-only-links {
        display: block;
    }
}

/* Hide tablet-only links on large desktop */
@media screen and (min-width: 1301px) {
    .small-tablet-only-links {
        display: none;
    }

    .tablet-only-links {
        display: none;
    }
}

@media screen and (max-width: 1024px) {
    .nav-links {
        gap: 4px;
    }

    .nav-link {
        padding: 8px 16px;
        font-size: 14px;
    }

    .nav-add-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
}


/* Mobile Responsive (320px - 767px) */
@media screen and (max-width: 767px) {

    /* Simplified navbar - show only logo and profile */
    .top-navbar {
        padding: 0 1.2rem;
        /* 20px side margins */
        display: flex;
    }

    .top-navbar-container {
        padding: 0;
        justify-content: space-between;
        /* Push logo and profile to opposite ends */
        width: 100%;
    }

    /* Hide all navigation links */
    .nav-links {
        display: none;
    }

    /* Hide add button if exists */
    .nav-add-btn {
        display: none;
    }

    .top-navbar .logo-text {
        display: none;
    }

    /* Keep logo visible and adjust size */
    .logo {
        display: flex;
    }

    .logo img {
        height: 40px;
    }

    /* Keep profile/login visible */
    .nav-actions {
        display: flex;
    }

    /* Profile avatar adjustments */
    .nav-profile .profile-avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    /* Login button adjustments */
    .nav-login-btn {
        padding: 6px 16px;
        font-size: 13px;
    }

    /* Hide mobile navigation components if they exist */
    .mobile-top-nav,
    .mobile-bottom-nav {
        display: none !important;
    }

    /* AI Chat on mobile - hidden */
    .ai-chat-link {
        display: none;
    }

    /* Ensure content starts after navbar */
    body {
        padding-top: 60px;
        /* Navbar height + small margin */
    }
}

/* For All Temples Page specific adjustments */
.all-temples-page .main-content {
    padding: 0;
}

.all-temples-content {
    width: 100%;
    max-width: 100%;
}