@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700;800&display=swap");

/* CSS Optimization: Reduce paint and composite layers */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 999;
    background: rgba(0,0,0,0.42);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.navbar-inner {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 10px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
    min-width: 0;
    margin-left: -6px;
}

.brand-logo {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(216,179,106,0.18));
}

.brand-text { min-width: 0; }

.brand-text h1 {
    font-size: 22px;
    letter-spacing: 1px;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 4px;
    white-space: nowrap;
}

.brand-text span {
    display: block;
    color: rgba(255,255,255,0.72);
    font-family: Arial, sans-serif;
    font-size: 12px;
    margin-top: 2px;
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 8px;
}

.menu-toggle { display: none; }

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    font-family: "Cormorant Garamond", "Times New Roman", serif;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0.45px;
    flex-wrap: nowrap;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
    transition: color .25s ease;
}

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

.btn {
    display: inline-block;
    padding: 13px 24px;
    border-radius: 999px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    transition: .3s ease;
    white-space: nowrap;
}

.btn-gold { background: var(--gold); color: #111; }
.btn-gold:hover { background: var(--gold-hover); }
.btn-outline { border: 1px solid rgba(255,255,255,0.28); color: #fff; }
.btn-outline:hover { background: #fff; color: #111; }

@media (max-width: 1180px) {
    .brand-logo { width: 60px; height: 60px; flex: 0 0 60px; }
    .brand-text h1 { font-size: 20px; }
    .nav-links { gap: 14px; font-size: 21px; }
    .header-right { gap: 14px; margin-right: 2px; }
    .btn { padding: 12px 22px; }
}

@media (max-width: 768px) {
    .navbar { overflow: visible; }

    .navbar-inner {
        min-height: var(--header-height);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: relative;
        padding: 10px 0;
    }

    .brand {
        margin-left: 0;
        gap: 10px;
        min-width: 0;
        flex: 1 1 auto;
        max-width: calc(100% - 52px);
    }

    .brand-logo { width: 42px; height: 42px; flex: 0 0 42px; }
    .brand-text h1 { font-size: 16px; white-space: nowrap; margin-bottom: 1px; }
    .brand-text span { white-space: nowrap; font-size: 9px; margin-top: 0; }

    .menu-toggle {
        display: inline-flex;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.12);
        background: rgba(255,255,255,0.05);
        color: #fff;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        cursor: pointer;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        position: relative;
        z-index: 1003;
        flex: 0 0 40px;
    }

    .menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        background: currentColor;
        border-radius: 999px;
        margin: 2px 0;
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    .navbar.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .navbar.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
    .navbar.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    .header-right {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
        margin-right: 0;
        border-radius: 18px;
        background: rgba(10,10,10,0.96);
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 18px 40px rgba(0,0,0,0.30);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
        z-index: 1002;
    }

    .navbar.menu-open .header-right {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links {
        justify-content: flex-start;
        align-items: stretch;
        gap: 8px;
        flex-wrap: nowrap;
        flex-direction: column;
    }

    .nav-links a {
        display: block;
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.08);
        font-family: "Cormorant Garamond", "Times New Roman", serif;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 0.35px;
        line-height: 1.1;
    }

    .header-action { margin-left: 0; }
    .header-action .btn {
        width: 100%;
        text-align: center;
        padding: 11px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .brand-logo { width: 38px; height: 38px; flex: 0 0 38px; }
    .brand-text h1 { font-size: 15px; }
    .brand-text span { font-size: 9px; }
    .menu-toggle { width: 38px; height: 38px; }

    /* Improved touch targets */
    .nav-links a {
        padding: 12px 14px;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }
}


.navbar .header-action .btn {
    padding: 13px 24px !important;
    font-size: 14px !important;
    line-height: 1.2;
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }

    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    img, video {
        max-width: 100%;
        height: auto;
    }

    .container {
        will-change: auto;
    }

    /* Reduce complex animations on mobile */
    .navbar {
        transition: background-color 0.3s ease;
    }

    /* Optimize scrolling performance */
    html {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

@media (max-width: 768px) {
    .navbar .header-action .btn {
        width: 100%;
        padding: 12px 18px !important;
        font-size: 14px !important;
        text-align: center;
    }
}

/* Venue dropdown navigation */
.nav-links .nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-links .nav-dropdown::before {
    content: "";
    position: absolute;
    top: 100%;
    left: -16px;
    right: -16px;
    height: 14px;
}

.nav-links .nav-dropdown-toggle {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.9);
    font: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    padding: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: color .25s ease;
}

.nav-links .nav-dropdown-toggle::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
    transition: transform .25s ease;
}

.nav-links .nav-dropdown:hover .nav-dropdown-toggle,
.nav-links .nav-dropdown:focus-within .nav-dropdown-toggle,
.nav-links .nav-dropdown.active .nav-dropdown-toggle {
    color: var(--gold);
}

.nav-links .nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-links .nav-dropdown:focus-within .nav-dropdown-toggle::after {
    transform: translateY(1px) rotate(225deg);
}

.nav-links .nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    min-width: 220px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(10,10,10,0.96);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 18px 42px rgba(0,0,0,0.34);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -8px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
    z-index: 1004;
}

.nav-links .nav-dropdown:hover .nav-dropdown-menu,
.nav-links .nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.nav-links .nav-dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.9);
    font-size: 18px;
    line-height: 1.15;
    background: transparent;
    border: 0;
}

.nav-links .nav-dropdown-menu a:hover,
.nav-links .nav-dropdown-menu a:focus {
    color: var(--gold);
    background: rgba(255,255,255,0.06);
}

@media (max-width: 768px) {
    .nav-links .nav-dropdown {
        display: block;
        width: 100%;
    }

    .nav-links .nav-dropdown::before {
        display: none;
    }

    .nav-links .nav-dropdown-toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.08);
        font-size: 16px;
        line-height: 1.1;
    }

    .nav-links .nav-dropdown-toggle::after {
        transform: rotate(45deg);
        transition: transform 0.25s ease;
    }

    .nav-links .nav-dropdown.active .nav-dropdown-toggle::after {
        transform: translateY(1px) rotate(225deg);
    }

    .nav-links .nav-dropdown-menu {
        position: static;
        min-width: 0;
        margin-top: 8px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease, max-height 0.25s ease;
    }

    .nav-links .nav-dropdown.active .nav-dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        max-height: 500px;
    }

    .nav-links .nav-dropdown:hover .nav-dropdown-menu,
    .nav-links .nav-dropdown:focus-within .nav-dropdown-menu {
        transform: none;
    }

    .nav-links .nav-dropdown-menu a {
        font-size: 15px;
        padding: 10px 12px;
        margin: 6px 0 0 0;
        background: rgba(255,255,255,0.03);
        border: 1px solid rgba(255,255,255,0.07);
    }
}

@media (max-width: 480px) {
    .nav-links .nav-dropdown-toggle {
        min-height: 48px;
        padding: 12px 14px;
    }
}

/* Elegant subpage entrance animations. Enabled only when body has .subpage-animate. */
@media (prefers-reduced-motion: no-preference) {
    body.subpage-animate > .section:first-of-type {
        animation: subpageSectionEnter 0.78s cubic-bezier(0.22, 1, 0.36, 1) 0.06s backwards;
    }

    body.subpage-animate .section:not(:first-of-type) > .container,
    body.subpage-animate .footer > .container {
        animation: subpageSoftEnter 0.82s cubic-bezier(0.22, 1, 0.36, 1) 0.12s backwards;
    }

    body.subpage-animate .detail-card,
    body.subpage-animate .detail-image,
    body.subpage-animate .about-detail-card,
    body.subpage-animate .about-image-large,
    body.subpage-animate .facility-card,
    body.subpage-animate .venue-card,
    body.subpage-animate .contact-card,
    body.subpage-animate .pricing-card,
    body.subpage-animate .promo-card,
    body.subpage-animate .benefit-band,
    body.subpage-animate .download-card,
    body.subpage-animate .notes-panel,
    body.subpage-animate .gallery-shell {
        animation: subpageCardEnter 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.16s backwards;
    }

    body.subpage-animate .detail-card:nth-child(2),
    body.subpage-animate .pricing-card:nth-child(2),
    body.subpage-animate .promo-card:nth-child(2),
    body.subpage-animate .venue-card:nth-child(2),
    body.subpage-animate .facility-card:nth-child(2),
    body.subpage-animate .contact-card:nth-child(2) {
        animation-delay: 0.24s;
    }

    body.subpage-animate .promo-card:nth-child(3),
    body.subpage-animate .facility-card:nth-child(3) {
        animation-delay: 0.30s;
    }

    body.subpage-animate .promo-card:nth-child(4),
    body.subpage-animate .facility-card:nth-child(4) {
        animation-delay: 0.36s;
    }

    body.subpage-animate .promo-card:nth-child(5),
    body.subpage-animate .facility-card:nth-child(5) {
        animation-delay: 0.42s;
    }

    body.subpage-animate .facility-card:nth-child(6) {
        animation-delay: 0.48s;
    }

    body.subpage-animate .gallery-card {
        animation: subpageGalleryEnter 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.18s backwards;
    }

    body.subpage-animate .gallery-card:nth-child(2n) {
        animation-delay: 0.24s;
    }

    body.subpage-animate .gallery-card:nth-child(3n) {
        animation-delay: 0.30s;
    }

    body.subpage-animate .gallery-card:nth-child(4n) {
        animation-delay: 0.36s;
    }

    @keyframes subpageSectionEnter {
        from {
            opacity: 0;
            transform: translateY(24px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes subpageSoftEnter {
        from {
            opacity: 0;
            transform: translateY(16px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes subpageCardEnter {
        from {
            opacity: 0;
            transform: translateY(18px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes subpageGalleryEnter {
        from {
            opacity: 0;
            transform: translateY(14px) scale(0.985);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}
