/* ==========================================
NAVBAR STYLES
========================================== */

:root {
    --header-height: 70px;
}

#navbar,
.navbar {
    /* Floats the logo over full-screen content without taking up vertical space */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between; /* Pushes logo left, navigation menu right */
    align-items: center;
    width: 100%;
    height: 90px;
    padding: 0 50px;
    padding-top: 50px; /* Adds breathing room from top */
    box-sizing: border-box; /* Prevents padding from causing horizontal scrollbars */
}

/* Supports both #navbar .logo and .navbar .logo selectors */
#navbar .logo,
.navbar .logo {
    max-height: 60px;
    width: auto;
}

/* Navigation Menu & Links Container */
.nav-menu {
    display: flex;
    align-items: center;
}

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

/* Serif font, capital letters, and white link styling */
.nav-link {
    font-family: 'Inria Serif', serif;
    font-style: italic;
    font-size: 0.95rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    color: #ffffff;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus {
    color: #ffffff;
    opacity: 0.75;
}

/* Dropdown Menu Container */
.nav-item-dropdown {
    position: relative;
    padding-bottom: 15px; /* Extends the hover zone downward */
    margin-bottom: -15px; /* Pulls layout back up */
}

.dropdown-trigger {
    display: flex;
    align-items: center;
}

/* Dropdown Styling */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; /* Sits flush right below the parent item with no dead zone */
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    min-width: 220px;
    padding: 15px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu {
    display: block;
    opacity: 1;
}

.dropdown-item {
    font-family: 'Inria Serif', serif;
    font-style: italic;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #2c2c2c;
    padding: 10px 25px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f7f5f0;
    color: #1a1a1a;
}

/* Special Outline Button Style for RSVP */
.nav-link.rsvp-btn {
    background-color: #ffffff;
    border: 2px solid #ffffff;
    color: #6587ab;
    padding: 10px 24px;
    transition: all 0.4s ease;
}

.nav-link.rsvp-btn:hover {
    border: 2px solid #ffffff;
    transform: scale(1.07);
    opacity: 1;
}

/* White Exit / Go Home Button */
.rsvp-home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #ffffff; /* White icon */
    font-size: 2rem;
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease;
}

.rsvp-home-btn:hover {
    color: #ffffff;
    transform: translateX(-3px); /* Subtle nudge left to echo going back */
}

/* Mobile Toggle Hamburger Menu */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
}

.hamburger-line {
    display: block;
    width: 28px;
    height: 2px;
    background-color: #ffffff;
    margin: 6px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Responsive Styles for Mobile Devices */
@media (max-width: 992px) {
    #navbar,
    .navbar {
        padding: 60px 25px;
        height: 80px;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: #9aacc4;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        overflow-y: auto; /* Allows scrolling if the list is tall */
        padding: 80px 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 22px;
        width: 100%;
        text-align: center;
    }

    .nav-link {
        font-size: 1.15rem;
    }

    /* Flatten Dropdowns into the Mobile List */
    .nav-item-dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    /* Turn the dropdown triggers into subtle category headers */
    .dropdown-trigger {
        display: none !important;
    }

    /* Keep the actual dropdown sub-links visible and nicely stacked */
    .dropdown-menu {
        display: flex !important;
        position: static !important;
        transform: none !important;
        background-color: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        opacity: 1 !important;
        flex-direction: column;
        align-items: center;
        gap: 22px; /* Matches your .nav-links gap */
        width: 100%;
    }

    .nav-item-dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 22px;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    /* Style sub-links to match regular mobile nav links perfectly */
    .dropdown-item {
        font-family: 'Inria Serif', serif;
        font-style: italic;
        font-size: 1.15rem;
        font-weight: 400;
        text-transform: uppercase;
        letter-spacing: 0.2rem;
        color: #ffffff;
        background: transparent;
        padding: 0;
        text-align: center;
        width: auto;
        box-shadow: none;
    }

    .dropdown-item:hover {
        background-color: transparent;
        color: #ffffff;
        opacity: 0.75;
    }

    /* Prevents background page scrolling when mobile menu is open */
    body.menu-open {
        overflow: hidden;
        height: 100vh;
    }
}