
/* --- RESET E CONFIGURAÇÃO BASE DA NAVBAR --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    height: 75px;
}

.nav-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
}

/* --- BLOCO DIREITO (Links + Idioma) --- */
.nav-right {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
    line-height: 1;          /* remove herança de line-height estranha */
    transition: color 0.2s;
}

.nav-link:hover {
    color: #e31e24;
}

.lang-switcher {
    display: flex;
    align-items: center;
    margin-top: 10px;
    gap: 6px;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid #eaeaea;
}

.lang-switcher a {
    display: flex;
    align-items: center;
    line-height: 0;
}

.lang-switcher img {
    display: block;
}

/* AQUI está o ajuste principal — bandeira do tamanho do texto ao lado, não maior */
.portugal, .inglaterra {
    height: 14px;      /* era maior — agora bate com a altura visual de um texto de 15px */
    width: 21px;
    padding: 0;
    margin: 0;
}

.lang-switcher span {
    display: flex;
    align-items: center;
    line-height: 1;
    font-size: 15px;
    color: #ccc;
}

/* Remoção definitiva de contornos ou bordas indesejadas nas bandeiras */
.lang-switcher a,
.lang-switcher img {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.lang-switcher a:focus,
.lang-switcher a:active {
    outline: none !important;
    border: none !important;
}

/* Botão Hambúrguer (Oculto no Desktop) */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* --- RESPONSIVIDADE PARA TABLETS E TELEMÓVEIS (Abaixo de 1500px) --- */
@media (max-width: 1500px) {
    .hamburger {
        display: flex;
    }

    .nav-right {
        position: fixed;
        top: 75px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 75px);
        background-color: #ffffff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        gap: 35px;
        transition: left 0.3s ease-in-out;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        white-space: normal;
    }

    .nav-right.active {
        left: 0;
    }

    .nav-menu {
        flex-direction: column;
        gap: 25px;
        align-items: center;
    }

    .nav-link {
        font-size: 18px;
    }

    .lang-switcher {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 10px;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
    }
}


    /* --- NOVO GRUPO MOBILE (hambúrguer + bandeiras) --- */
    .lang-switcher--mobile {
        display: none;   /* escondido no desktop, igual antes */
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 0;
    }

@media (max-width: 1500px) {
    .nav-container {
        display: grid;
        grid-template-columns: auto 1fr auto 1fr auto;  /* 5 colunas em vez de 4 */
        align-items: center;
        column-gap: 16px;
    }

    .nav-right {
        grid-column: 3;   /* fixed position, não ocupa espaço visual — só precisa estar numa coluna válida */
    }

    .hamburger {
        display: flex;
        grid-column: 3;       /* agora fica na coluna do meio, ladeada por 2 espaços 1fr */
        justify-self: center;
    }

    .lang-switcher--mobile {
        display: flex;
        grid-column: 5;
        justify-self: end;
        margin-top: 10px;
    }

    .nav-menu .lang-switcher {
        display: none;
    }
}