/* Controle de idioma discreto no canto inferior, sem ocupar o cabeçalho. */
.language-switcher {
    position: fixed;
    z-index: 990;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    width: 142px;
    height: 44px;
    border: 1px solid rgba(201, 106, 61, .26);
    border-radius: 14px;
    background: rgba(255, 252, 248, .96);
    box-shadow: 0 8px 28px rgba(44, 62, 80, .16), 0 2px 6px rgba(44, 62, 80, .07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.language-switcher:hover {
    border-color: rgba(201, 106, 61, .6);
    box-shadow: 0 10px 32px rgba(44, 62, 80, .19);
}
.language-switcher:focus-within {
    outline: 2px solid #C96A3D;
    outline-offset: 3px;
}
.language-switcher .language-icon {
    position: absolute;
    left: 13px;
    color: #C96A3D;
    pointer-events: none;
}
.language-switcher select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 100%;
    padding: 0 27px 0 39px;
    border: 0;
    border-radius: inherit;
    outline: 0;
    background: transparent;
    color: #39404a;
    font: 600 12px/1.2 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
}
.language-switcher::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 13px;
    width: 6px;
    height: 6px;
    border-right: 1.8px solid #8e6c59;
    border-bottom: 1.8px solid #8e6c59;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.menu-list a[aria-current="page"] {
    background: #C96A3D;
    color: white;
    font-weight: 700;
}
/* Marca legível mesmo antes de adicionar a mídia original. */
.header .logo img[hidden], .header .logo-wordmark[hidden] { display: none; }
.header .logo-wordmark {
    color: #8f492d;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: 1;
    white-space: nowrap;
}
.header .logo-wordmark strong { color: #c96a3d; }

/* Menu desktop/notebook sempre em uma única linha.
   Abaixo do ponto em que os links deixariam de caber, usamos o menu móvel
   em vez de quebrar o cabeçalho em duas linhas. */
@media (min-width: 1180px) {
    .header .container {
        max-width: 1760px;
        gap: clamp(8px, .8vw, 16px);
        padding-left: clamp(14px, 1.2vw, 22px);
        padding-right: clamp(14px, 1.2vw, 22px);
    }

    .header .logo {
        flex: 0 0 clamp(108px, 9.5vw, 150px);
        min-width: 0;
    }

    .header .logo img {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 72px;
        object-fit: contain;
    }

    .header .menu {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: center;
    }

    .header .menu-list {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: clamp(0px, .14vw, 3px);
        width: 100%;
        min-width: 0;
    }

    .header .menu-list li {
        flex: 0 0 auto;
    }

    .header .menu-list li a {
        padding: 8px clamp(5px, .42vw, 9px);
        font-size: clamp(11px, .82vw, 13px);
        line-height: 1.2;
        white-space: nowrap;
    }

    .header .menu-list .btn-matricula {
        padding: 9px clamp(7px, .62vw, 12px) !important;
    }
}

/* Notebook menor/tablet: troca para hambúrguer antes de qualquer quebra de linha. */
@media (max-width: 1179px) {
    .header .menu-mobile { display: flex; }
    .header .menu-list {
        position: fixed;
        top: 100px;
        left: -100%;
        display: flex;
        flex-direction: column;
        background: #F3E6D8;
        width: 100%;
        height: calc(100vh - 100px);
        padding: 20px;
        transition: left .3s ease;
        overflow-y: auto;
        gap: 0;
    }
    .header .menu-list.active { left: 0; }
    .header .menu-list li { width: 100%; }
    .header .menu-list li a {
        padding: 15px;
        border-bottom: 1px solid rgba(201, 106, 61, .2);
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    .header .menu-list {
        top: 80px;
        height: calc(100vh - 80px);
    }
}
@media (max-width: 480px) {
    .language-switcher {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        width: 128px;
        height: 40px;
        border-radius: 12px;
    }
    .language-switcher .language-icon { left: 11px; width: 16px; height: 16px; }
    .language-switcher select { padding-left: 34px; padding-right: 21px; font-size: 11px; }
    .language-switcher::after { right: 10px; }
    .footer-bottom { padding-bottom: 70px; }
}
