/* === LANGUAGE SWITCHER === */

/* Adjust nav-content to handle the language switcher */
.nav-content {
    gap: 24px;
}

.lang-switcher {
    position: relative;
    margin-left: 0;
    margin-right: 0;
    z-index: 1001;
    flex-shrink: 0;
    display: none;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.lang-current:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.2);
}

.lang-arrow {
    transition: transform 0.2s ease;
}

.lang-current[aria-expanded="true"] .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 140px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    list-style: none;
    padding: 6px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown li {
    margin: 0;
}

.lang-dropdown a {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.lang-dropdown a:hover {
    background: rgba(0, 0, 0, 0.04);
}

.lang-dropdown a.active {
    background: var(--accent-color);
    color: var(--bg-dark-1);
    font-weight: 600;
}

/* Dark mode / Hero section */
.nav.scrolled .lang-current,
.hero .lang-current {
    color: var(--text-dark);
}

/* Mobile adjustments */
@media (max-width: 900px) {
    .nav-content {
        gap: 12px;
    }

    .lang-switcher {
        position: relative;
        margin: 0;
        order: 2;
    }

    .nav-toggle {
        order: 3;
    }

    .lang-current {
        padding: 6px 10px;
        font-size: 12px;
    }

    .lang-dropdown {
        right: 0;
        min-width: 130px;
    }
}

@media (max-width: 768px) {
    .lang-switcher {
        position: absolute;
        top: 50%;
        right: 60px;
        transform: translateY(-50%);
    }
}

/* === RTL SUPPORT (future-proofing) === */
[dir="rtl"] .lang-switcher {
    margin-left: 16px;
    margin-right: auto;
}

[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

/* === LOCALIZED CONTENT VISIBILITY === */
/* Show content only for specific locales */
[data-show-locale="en"] { display: none; }
[data-show-locale="de"] { display: none; }
[data-show-locale="nl"] { display: none; }

html[lang="en"] [data-show-locale="en"] { display: block; }
html[lang="de"] [data-show-locale="de"] { display: block; }
html[lang="nl"] [data-show-locale="nl"] { display: block; }

/* Hide content for specific locales */
html[lang="en"] [data-hide-locale="en"] { display: none; }
html[lang="de"] [data-hide-locale="de"] { display: none; }
html[lang="nl"] [data-hide-locale="nl"] { display: none; }

/* === DUTCH HERITAGE BADGE === */
.heritage-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FF6B00;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.heritage-badge::before {
    content: "🇳🇱";
    font-size: 14px;
}

/* Show heritage badge prominently for Dutch users */
html[lang="nl"] .heritage-badge {
    display: inline-flex;
}

html:not([lang="nl"]) .heritage-badge {
    display: none;
}

/* === TRANSLATION LOADING STATE === */
[data-i18n]:empty::before {
    content: "";
    display: inline-block;
    width: 60px;
    height: 1em;
    background: #e0e0e0;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
