@media (max-width: 768px) {

    .menu-toggle {
        display: block;
        color: #212529;
    }

    body.dark-mode .menu-toggle {
        color: #ffffff;
    }

    /* Esconde links inicialmente */
    .menu-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 10px;
        right: auto;
        background: #ffffff;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        flex-direction: column;
        padding: 10px;
        z-index: 15;
        min-width: 220px;
    }

    body.dark-mode .menu-links {
        background: #1e1e1e;
    }

    .menu-links a {
        width: 100%;
        text-align: left;
        padding: 8px 10px;
        color: #212529 !important;
        text-shadow: none;
    }

    body.dark-mode .menu-links a {
        color: #ffffff !important;
    }

    /* Quando aberto */
    .menu-links.open {
        display: flex;
    }
}

/* MOBILE PADRÃO (até 768px) */
@media (max-width: 768px) {

    /* Brasão colorido */
    body:not(.dark-mode) .header-top .brasao {
        content: url('/image/BRASAO_PREF_SERRA_HORIZONTAL_COLORIDA.png');
        width: 180px;
    }

    /* Textos escuros */
    body:not(.dark-mode) .header-top .botao-links a {
        color: #212529 !important; /* text-dark */
        text-shadow: none;
    }
}


/* MOBILE + CONTRASTE / DARK MODE */
@media (max-width: 768px) {

    body.dark-mode .header-top .brasao {
        content: url('/image/BRASAO_PREF_SERRA_HORIZONTAL_NEGATIVA.png');
    }

    body.dark-mode .header-top .botao-links a {
        color: #ffffff !important;
        text-shadow: 0px 2px 4px rgba(0,0,0,0.8);
    }
}

/* Display Mobile */
@media screen and (max-width: 1015px) and (min-width: 769px) {
    /* Ajuste para centralizar os botões acima do brasão */
    .botao-links {
        display: flex;
        flex-direction: column; 
        align-items: center; 
        gap: 5px; 
        margin-bottom: 0px; 
    }

    /* Ajuste para o brasão ficar abaixo dos links */
    .brasao {
        display: flex;
        width: 150px; 
    }

    /* Garante que os botões não fiquem muito colados no brasão */
    .container-custom {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.header-top .botao-links a.btn {
    font-size: 14px !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2.4rem;
    cursor: pointer;
    z-index: 20;
    margin-right: auto;
}

.container-custom {
    width: 100% !important;
    margin: 0 auto !important; 
    /* padding-left: 35px !important;  */
    padding-right: 15px !important;
    display: block !important;
}

.brasao {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center; 
}

/* Display Desktop */

.navContatos {
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2; 
    display: flex;
    justify-content: center;
    color: white; 
}

.botao-links {
    display: flex;
    justify-content: flex-end; 
    gap: 5px;
    position: relative;
}

.botao-links a,
#brasaoDesktop {
    display: flex;
    align-items: center; 
}

#brasaoDesktop {
    order: 0; 
}

header {
    position: relative;
    z-index: 10;
}

header nav a {
    margin-left: 20px;
    color: #333;
    text-decoration: none;
}

.menu-toggle {
    font-size: 2.4rem;   /* ← AUMENTE AQUI (2.2 / 2.5 / 3rem se quiser) */
    padding: 6px 10px;
    line-height: 1;
}

/* Ajuste fino do ícone */
.menu-toggle i {
    font-size: inherit;
}

/* Base dos links */
.menu-links a,
.botao-links a {
    position: relative;
    text-decoration: none;
}

/* Linha invisível */
.menu-links a::after,
.botao-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.25s ease-in-out;
}

/* Hover */
.menu-links a:hover::after,
.botao-links a:hover::after {
    width: 100%;
}

.menu-links a:focus-visible::after {
    width: 100%;
}

/* MOBILE REAL (até 768px) */
@media (max-width: 768px) {

    /* Mostra o botão hamburguer */
    .menu-toggle {
        display: block;
    }

    /* Esconde os links */
    .menu-links {
        display: none !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 10px;
        background: #ffffff;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        min-width: 220px;
        z-index: 999;
    }

    /* Quando aberto */
    .menu-links.open {
        display: flex !important;
    }

    .menu-links.open a.d-none {
        display: none !important;
    }
}

/* DESKTOP */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    .menu-links {
        display: flex !important;
        position: static;
        flex-direction: row;
        background: transparent;
        box-shadow: none;
    }
}
