/* =========================================================================
   COMPONENT: LANG SWITCHER
   Selector d'idioma ES | CA al header.
   ========================================================================= */

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 100px;
    overflow: hidden;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Quan el header és transparent (sobre hero fosc) */
.header--transparent .lang-switcher {
    border-color: rgba(255, 255, 255, 0.3);
}

/* Quan el header és solid (scroll) */
.header--solid .lang-switcher {
    border-color: rgba(0, 0, 0, 0.15);
}

.lang-switcher__btn {
    padding: 0.3rem 0.7rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    font-family: var(--font-heading, 'Montserrat', sans-serif);
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.15s ease, color 0.15s ease;
    line-height: 1;
}

.lang-switcher__btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.lang-switcher__btn--active {
    background: var(--color-accent, #e87d52);
    color: var(--color-white, #fff) !important;
    pointer-events: none;
}

.lang-switcher__divider {
    width: 1px;
    height: 14px;
    background: currentColor;
    opacity: 0.25;
    flex-shrink: 0;
}

/* Quan el header és solid (dark) — adaptar colors */
.header--solid .lang-switcher__btn {
    color: var(--color-black-soft, #1a1a1a);
}

.header--solid .lang-switcher__btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* Mobile: lleugerament més gran per facilitar el toc */
@media (max-width: 768px) {
    .lang-switcher {
        display: none;
        /* Al mòbil apareix al drawer */
    }
}

/* Selector d'idioma al drawer mòbil */
.header__drawer-lang {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
}

.header__drawer-lang a {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.header__drawer-lang a.active,
.header__drawer-lang a:hover {
    color: var(--color-accent, #e87d52);
    background: rgba(232, 125, 82, 0.1);
}