.header{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    height: 5rem;

    background-color: rgba(249, 249, 249, 0.9);
    backdrop-filter: blur(5px);
    
    /* Header fixo */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    
    /* Sombra sutil para destacar do conteúdo */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    
    /* Transição suave */
    transition: all 0.3s ease;
}

/* Header compacto quando rolar para baixo */
.header.header-scrolled {
    padding-top: 1rem;
    height: 4rem;
    background-color: rgba(249, 249, 249, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Header escondido quando rolar para baixo */
.header.header-hidden {
    transform: translateY(-100%);
}

/* Ajuste do título quando header está compacto */
.header.header-scrolled .title__header {
    font-size: 1.8rem;
    padding: 0.3rem 0;
}

.title__header{
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--cor-da-marca);
    letter-spacing: -0.02em;
    line-height: 1.1;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.title__header::before {
    content: "";
    position: absolute;
    left: -0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: linear-gradient(180deg, var(--cor-da-marca), #FF6100);
    border-radius: 2px;
    opacity: 0.8;
}

.title__header:hover {
    transform: translateY(-2px);
    text-shadow: 0 4px 8px rgba(0,0,0,0.15);
    color: #FF6100;
}

.title__header:hover::before {
    opacity: 1;
}

.nav__header{
    text-align: center;
}

.nav__header ul{
    display: flex;
}

.links__header{
    font-size: 1.4rem;
    display: inline-block;
    margin-right: .2rem;
    margin-left: .2rem;
    text-decoration: none;
    padding: 20px 10px 5px 10px;
    color: var(--preto-texto);
    position: relative;
    transition: color 0.3s cubic-bezier(.4,0,.2,1);
    /* Removido background-color e border-radius do hover para um efeito mais moderno */
}

.links__header::after {
    content: "";
    display: block;
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;
    height: 2px;
    background: linear-gradient(90deg, var(--cor-da-marca), #FF6100);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
}

.links__header:hover,
.links__header:focus {
    color: var(--cor-da-marca);
}

.links__header:hover::after,
.links__header:focus::after {
    transform: scaleX(1);
}

/* Estilo para navegação ativa */
.links__header.nav-active {
    color: var(--cor-da-marca);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
}

.links__header.nav-active::after {
    transform: scaleX(1);
    background: linear-gradient(90deg, var(--cor-da-marca), #FF6100);
    opacity: 1;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
}

/* text-decoration: underline 2px;
text-underline-offset: 4px; */

/* animação de piscar o underline no título - FEATURE DESCONTINUADA */
@keyframes underline_pisca {
     0% { opacity: 0; }
     50% { opacity: 0.5; }
     100% { opacity: 1; }
}

@media screen and (min-width: 769px) {
    #id-link-contato span{
        display: none;
    }
}

/* Botão do menu mobile */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--cor-da-marca);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
    margin: 2px 0;
}

/* Animação do hamburger para X */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@media screen and (max-width: 1023px) {
    .header {
        padding: 1.5rem 1.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav__header {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: rgba(249, 249, 249, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        padding-top: 5rem;
    }
    
    .nav__header.active {
        right: 0;
    }
    
    .nav__header ul {
        flex-direction: column;
        padding: 2rem 0;
    }
    
    .nav__header li {
        margin: 0;
        width: 100%;
    }
    
    .links__header {
        display: block;
        width: 100%;
        padding: 1.5rem 2rem;
        margin: 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        text-align: left;
    }
    
    .links__header::after {
        display: none;
    }
    
    .links__header:hover,
    .links__header:focus {
        background-color: rgba(255, 97, 0, 0.1);
        color: var(--cor-da-marca);
    }
    
    .links__header.nav-active {
        background-color: rgba(255, 97, 0, 0.15);
        color: var(--cor-da-marca);
        font-weight: 600;
        border-left: 4px solid var(--cor-da-marca);
    }
    
    /* Overlay para fechar o menu */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

@media screen and (max-width: 768px) {
    .header {
        padding: 1rem 1.5rem;
        height: 4rem;
        align-items: center;
    }
    
    .title__header {
        font-size: 1.6rem;
    }
    
    .nav__header {
        width: 100%;
        right: -100%;
    }
    
    .mobile-menu-toggle {
        align-self: center;
    }
}

@media screen and (max-width: 430px) {
    .header {
        padding: 0.8rem 1rem;
        height: 3.5rem;
        align-items: center;
    }
    
    .title__header {
        font-size: 1.4rem;
    }
    
    .mobile-menu-toggle {
        width: 25px;
        height: 25px;
        align-self: center;
    }
    
    .mobile-menu-toggle span {
        height: 2px;
        margin: 1.5px 0;
    }
    
    .nav__header {
        width: 100%;
        padding-top: 3.5rem;
    }
    
    .links__header {
        padding: 1.2rem 1.5rem;
        font-size: 1rem;
    }
}