/* ====================================================== */
/* --- NAVIGATION BAR (FINAL POLISHED VERSION) --- */
/* ====================================================== */

.navbar {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;

    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);

    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* --- MAIN NAV LIST --- */
.nav-main {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 1.2rem clamp(1rem, 5vw, 4rem);
    margin: 0 auto;
    max-width: 1400px;    /* Keeps the bar from getting too wide on huge screens */
    position: relative;   
    
}

/* --- LEFT / RIGHT GROUP WRAPPERS --- */
.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    flex: 1;
}

.nav-left {
    justify-content: flex-end; /* Pushes left links toward the logo */
}

.nav-right {
    justify-content: flex-start; /* Pushes right links toward the logo */
}

/* --- LEFT / RIGHT LINK GROUPS --- */
.nav-left-links,
.nav-right-links {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;

    gap: clamp(1.8rem, 4vw, 4rem);
}

/* --- LOGO --- */
.navbar li.A-And-K-logo {
    margin: 0 3rem; /* Reduced from 8rem to keep it tight and centered */
    flex: 0 0 auto; /* Ensures the logo doesn't shrink or grow */
}

.navbar li.A-And-K-logo img {
    height: 70px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.navbar li.A-And-K-logo a:hover img {
    transform: scale(1.05);
}

/* --- LINKS --- */
.navbar li {
    list-style: none;
}

.navbar a {
    position: relative;
    text-decoration: none;
    color: #426A8D;

    font-family: 'DM Sans', sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;

    transition: color 0.3s ease;
}

/* --- PREMIUM UNDERLINE HOVER --- */
.navbar a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;

    width: 0;
    height: 2px;
    background-color: #95B8D6;

    transform: translateX(-50%);
    transition: width 0.3s ease;
}

/* Hover only on devices that support it */
@media (hover: hover) {
    .navbar a:hover {
        color: #95B8D6;
    }

    .navbar a:hover::after {
        width: 60%;
    }
}

/* --- ACCESSIBILITY FOCUS --- */
.navbar a:focus-visible {
    outline: 3px solid rgba(149, 184, 214, 0.6);
    outline-offset: 4px;
}

/* --- RSVP BUTTON --- */
.navbar li.rsvp a {
    border: 2px solid #95B8D6;
    border-radius: 50px;
    padding: 0.5em 1.5em;

    color: #95B8D6;
    font-weight: 700;
    letter-spacing: 0.1em;

    transition: all 0.3s ease;
}

/* Remove underline from RSVP */
.navbar li.rsvp a::after {
    display: none;
}

@media (hover: hover) {
    .navbar li.rsvp a:hover {
        background-color: #95B8D6;
        color: white;
        cursor: pointer;
    }
}

/* ====================================================== */
/* --- MOBILE LAYOUT --- */
/* ====================================================== */

.language-switcher {
    position: absolute;
    right: 20px; /* Distance from the right edge of the nav-main */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    z-index: 1010;
}
/* 2. ADD THIS INTERMEDIATE FIX for "middle" sized windows */
@media (max-width: 1200px) and (min-width: 951px) {
    .nav-main {
        /* Gives more room so links don't hit the language switcher */
        padding-right: 80px; 
    }
}


@media (max-width: 950px) {
    /* 1. Reset the switcher from absolute to relative on mobile */
    language-switcher {
        /* FORCE reset of absolute positioning */
        position: relative !important; 
        right: auto !important;
        top: auto !important;
        transform: none !important;
        
        margin: 1.5rem auto 0.5rem; /* Space above and below */
        justify-content: center;
        width: 100%;
    }

    .language-switcher select {
        padding: 0.5rem;
        margin: 0 auto;
        text-align: center;
    }

    .nav-main {
        flex-direction: column;
        padding: 1rem;
        height: auto; /* Let it grow with the content */
        position: relative;
    }

    .navbar li.A-And-K-logo {
        margin: 1rem 0;
    }

    .navbar li.A-And-K-logo img {
        height: 55px;
    }

    .nav-left-links,
    .nav-right-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .navbar li.rsvp a {
        padding: 0.5em 1em;
        font-size: 1rem;
    }

    .nav-right-links {
        margin-bottom: 0.5rem;
    }
    .nav-left, .nav-right {
        justify-content: center;
        width: 100%;
        flex: none;
    }

    .nav-left-links, .nav-right-links {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }
}



.language-switcher select {
    background: transparent;
    border: 1px solid rgba(66, 106, 141, 0.2);
    border: none;
    color: #426A8D;

    font-family: 'DM Sans', sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;

    cursor: pointer;
    padding: 0.3em, 0.2em;
    margin-left: auto;
    padding-left: 2rem;
}


/* Remove default focus outline */
.language-switcher select:focus {
    outline: none;
}

/* Hover color (matches links) */
@media (hover: hover) {
    .language-switcher select:hover {
        color: #95B8D6;
    }
}
/* Hide Google Translate top banner */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

/* Prevent page from being pushed down */
body {
    top: 0 !important;
}