
:root {
    --nav-bg: rgba(255, 255, 255, 0.85);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.98);
    --nav-blur: blur(15px);
    --nav-border: rgba(128, 0, 0, 0.1);
    --nav-text: #222222;
    --nav-text-hover: #800000;
    --nav-accent: #800000;
    --nav-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --dropdown-bg: rgba(255, 255, 255, 0.95);
    --radius-full: 50px;
    --radius-lg: 16px;
}

.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 98%;
    max-width: 1600px;
    background: var(--nav-bg);
    backdrop-filter: var(--nav-blur);
    -webkit-backdrop-filter: var(--nav-blur);
    border: 1px solid var(--nav-border);
    border-radius: var(--radius-full);
    padding: 10px 30px;
    z-index: 9999;
    transition: var(--nav-transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.glass-nav.scrolled {
    top: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    padding: 8px 30px;
    background: var(--nav-bg-scrolled);
    box-shadow: 0 4px 20px rgba(128, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.nav-logo {
    height: 45px;
    width: auto;
    transition: var(--nav-transition);
}

.glass-nav.scrolled .nav-logo {
    height: 40px;
}

.nav-brand-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--nav-accent);
    line-height: 1.1;
    display: flex;
    flex-direction: column;
}

.nav-brand-text span {
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link {
    color: var(--nav-text);
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: var(--nav-transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    white-space: nowrap;
}

.nav-link i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: #888;
}

.nav-link:hover {
    color: var(--nav-text-hover);
    background: rgba(128, 0, 0, 0.05);
    transform: translateY(-1px);
}

.nav-item.active > .nav-link {
    color: var(--nav-accent) !important;
    background: rgba(128, 0, 0, 0.08);
    box-shadow: inset 0 0 15px rgba(128, 0, 0, 0.1);
}

.nav-item.active > .nav-link i {
    color: var(--nav-accent);
}

.nav-item.active > .nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--nav-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--nav-accent);
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--dropdown-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    min-width: 240px;
    padding: 1rem 0;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(128, 0, 0, 0.1);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

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

.nav-item:hover .nav-link i {
    transform: rotate(180deg);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: #444;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover,
.dropdown-item.active {
    background: rgba(128, 0, 0, 0.05);
    color: var(--nav-accent);
    padding-left: 2rem;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 10002;
    align-items: center;
    justify-content: center;
}

.mobile-toggle span {
    display: block !important; 
    width: 28px !important;
    height: 4px !important; 
    background: #800000 !important; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 5px;
    transform-origin: center;
}

.mobile-toggle.active span {
    background: #ffffff;
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10001;
    display: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-drawer {
    position: absolute;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    height: 100dvh;
    max-height: 100dvh;
    background: #ffffff;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    /* Keep the header/footer from moving by letting only the middle menu scroll */
    overflow-y: hidden;
}

.mobile-menu-drawer::-webkit-scrollbar { display: none; }

.mobile-overlay.active .mobile-menu-drawer {
    transform: translateX(0);
}

.mobile-menu-header {
    background: linear-gradient(135deg, var(--nav-accent) 0%, #a00000 100%);
    padding: 60px 20px 30px; 
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    /* Stays at the top while the list below scrolls */
    position: relative;
    flex: 0 0 auto;
}

.mobile-menu-logo {
    width: 50px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.mobile-menu-brand h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.mobile-menu-brand span {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-nav-menu {
    list-style: none;
    padding: 15px 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-nav-menu::-webkit-scrollbar { width: 0; height: 0; }

.mobile-nav-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease;
}

.mobile-nav-link:active {
    background: rgba(128, 0, 0, 0.05);
}

.mobile-nav-link i:first-child {
    font-size: 1.4rem;
    color: var(--nav-accent);
    width: 30px;
    text-align: center;
}

.mobile-nav-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-nav-text strong {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
}

.mobile-nav-text span {
    font-size: 0.8rem;
    color: #777;
}

.mobile-nav-link .bi-chevron-down,
.mobile-nav-link .fa-chevron-down {
    font-size: 0.8rem;
    color: #aaa;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.ms-auto {
    margin-left: auto;
}

.mobile-nav-item.open .bi-chevron-down,
.mobile-nav-item.open .fa-chevron-down {
    transform: rotate(180deg);
}

.mobile-nav-dropdown {
    list-style: none;
    padding: 0;
    background: #f9f9f9;
    display: none;
}

.mobile-nav-item.open .mobile-nav-dropdown {
    display: block;
}

.mobile-dropdown-item {
    display: block;
    padding: 12px 20px 12px 68px;
    text-decoration: none;
    color: #555;
    font-size: 0.95rem;
    font-weight: 500;
}

.mobile-menu-footer {
    padding: 25px 20px;
    background: #fdfdfd;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--nav-accent);
    color: white;
    text-decoration: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(128, 0, 0, 0.2);
    margin-bottom: 20px;
}

.mobile-legal {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.mobile-legal a {
    font-size: 0.8rem;
    color: #aaa;
    text-decoration: none;
}

@media (max-width: 1100px) {
    .nav-menu { display: none; }
    .mobile-toggle { 
        display: flex !important;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        order: -1;
        flex-shrink: 0;
        visibility: visible !important;
        opacity: 1 !important;
        background: none !important; 
    }

    .nav-container {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-brand {
        order: 1;
        display: flex;
        align-items: center;
        text-decoration: none;
    }

    .nav-brand-text {
        position: absolute;
        left: 0;
        right: 0;
        margin: 0 auto;
        text-align: center;
        width: 100%;
        z-index: 1;
    }

    .nav-logo {
        position: relative;
        z-index: 2; 
    }
}

@media (min-width: 1101px) {
    .mobile-overlay {
        display: none !important;
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 576px) {
    .glass-nav {
        width: 96%;
        padding: 8px 15px;
        top: 15px;
    }
    .nav-brand-text { font-size: 1rem; }
    .nav-logo { height: 35px; }
    .glass-nav.scrolled .nav-logo { height: 32px; }
    .nav-brand-text span { display: none; }

    /* Mobile drawer responsiveness */
    .mobile-menu-drawer {
        width: 88%;
        max-width: 340px;
    }
    .mobile-menu-header {
        padding: 46px 16px 18px;
        gap: 12px;
    }
    .mobile-menu-logo {
        width: 44px;
    }
    .mobile-menu-brand h4 {
        font-size: 1rem;
    }
    .mobile-nav-link {
        padding: 16px 16px;
        gap: 14px;
    }
    .mobile-nav-text strong { font-size: 0.98rem; }
    .mobile-nav-text span { font-size: 0.76rem; }
    .mobile-menu-footer { padding: 18px 16px; }
}

@media (min-width: 577px) and (max-width: 900px) {
    /* Tablet drawer responsiveness */
    .mobile-menu-drawer {
        width: 78%;
        max-width: 380px;
    }
    .mobile-menu-header {
        padding: 52px 18px 22px;
        gap: 14px;
    }
    .mobile-menu-logo {
        width: 52px;
    }
    .mobile-menu-brand h4 {
        font-size: 1.1rem;
    }
    .mobile-nav-link {
        padding: 18px 18px;
        gap: 16px;
    }
}

@media (max-width: 360px) {
    /* Very small phones: keep header smaller so the menu list is readable */
    .mobile-menu-header {
        padding: 38px 14px 14px;
        gap: 10px;
    }
    .mobile-menu-logo { width: 40px; }
    .mobile-menu-brand h4 { font-size: 0.95rem; }
    .mobile-nav-link { padding: 14px 14px; gap: 12px; }
    .mobile-nav-link i:first-child { width: 26px; }
    .mobile-nav-text strong { font-size: 0.95rem; }
    .mobile-nav-text span { font-size: 0.72rem; }
    .mobile-menu-footer { padding: 16px 14px; }
}

@media (max-height: 720px) {
    /* Short-screen phones: compress paddings */
    .mobile-menu-header { padding-top: 44px; padding-bottom: 18px; }
    .mobile-nav-link { padding-top: 15px; padding-bottom: 15px; }
    .mobile-menu-footer { padding-top: 16px; padding-bottom: 16px; }
}

@media (max-width: 400px) {
    .nav-brand-text { font-size: 0.9rem; }
    .nav-logo { height: 30px; }
}

.crawlable-nav,
.sr-only {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    visibility: hidden !important;
}

.crawlable-nav a:focus,
.crawlable-nav a:focus-visible {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
}

.crawlable-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.skip-to-content {
    position: fixed;
    top: -100%;
    left: 1rem;
    z-index: 1000000;
    padding: 0.75rem 1.25rem;
    background: #800000;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0 0 10px 10px;
    text-decoration: none;
}

.skip-to-content:focus,
.skip-to-content:focus-visible {
    top: 0;
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}
