/* Logo desktop como texto, igual ao TDM mobile */
.logo-tudodamona-desktop {
    display: block;
    font-family: 'Montserrat', 'Poppins', Arial, sans-serif;
    font-weight: 900;
    font-size: 2.8rem;
    letter-spacing: -2px;
    color: var(--primary);
    text-shadow: 0 2px 8px #fde7ef, 0 1px 0 #fff;
    margin-bottom: 0.2rem;
    line-height: 1;
}
/* SEARCH DESKTOP EXCLUSIVA */
.search-container-desktop {
    display: flex;
    flex: 1;
    max-width: 900px;
    min-width: 350px;
    width: 100%;
    position: relative;
    z-index: 200001;
}
.search-form-desktop {
    display: flex;
    flex: 1 1 auto;
    align-items: stretch;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    position: relative;
    z-index: 200002;
    min-width: 200px;
    max-width: 100%;
}
.search-form-desktop:focus-within {
    border-color: var(--primary);
}
.search-input-desktop {
    flex: 1;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    outline: none;
}
.search-input-desktop::placeholder {
    color: var(--gray-400);
}
.search-btn-desktop {
    background: var(--primary);
    border: none;
    padding: 0 1.5rem;
    color: var(--white);
    cursor: pointer;
    transition: background 0.2s ease;
}
.search-btn-desktop:hover {
    background: var(--primary-dark);
}
.search-btn-desktop svg {
    width: 20px;
    height: 20px;
}
@media (max-width: 768px) {
    .search-container-desktop {
        display: none !important;
    }
}
/* Utilitário: só aparece no desktop */
.desktop-only {
    display: flex !important;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}
/* Agrupamento TDM + redes sociais mobile ao lado da busca */
.header-flex-mobile {
    display: none;
}

@media (max-width: 768px) {
    .header-flex-mobile {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        width: 100%;
        gap: 1.2rem;
        margin-bottom: 0.5rem;
    }
    .logo {
        display: none;
    }
    .header-social:not(.header-social-mobile) {
        display: none !important;
    }
    .logo-social-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 70px;
    }
    .logo-tdm-mobile {
        display: block;
        font-family: 'Montserrat', 'Poppins', Arial, sans-serif;
        font-weight: 900;
        font-size: 2.2rem;
        letter-spacing: -2px;
        color: var(--primary);
        text-shadow: 0 2px 8px #fde7ef, 0 1px 0 #fff;
        margin-bottom: 0.2rem;
    }
    .header-social-mobile {
        display: flex;
        flex-direction: row;
        gap: 0.3rem;
        justify-content: center;
        align-items: center;
    }
    .search-container {
        flex: 1;
        max-width: 100%;
        margin: 0;
    }
}

@media (min-width: 769px) {
    .header-flex-mobile {
        display: none !important;
    }
    .logo {
        display: flex !important;
    }
    .header-social {
        display: flex !important;
    }
    .logo-social-mobile {
        display: none !important;
    }
}
/* Agrupamento TDM + redes sociais mobile */
.logo-social-mobile {
    display: none;
}

@media (max-width: 768px) {
    .logo-img-full {
        display: none;
    }
    .logo-social-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-right: 0.7rem;
        min-width: 70px;
    }
    .logo-tdm-mobile {
        display: block;
        font-family: 'Montserrat', 'Poppins', Arial, sans-serif;
        font-weight: 900;
        font-size: 2.2rem;
        letter-spacing: -2px;
        color: var(--primary);
        text-shadow: 0 2px 8px #fde7ef, 0 1px 0 #fff;
        margin-bottom: 0.2rem;
    }
    .header-social-mobile {
        display: flex;
        flex-direction: row;
        gap: 0.3rem;
        justify-content: center;
        align-items: center;
    }
    .header-container {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .logo {
        display: none;
    }
    .search-container {
        flex: 1;
        max-width: 100%;
        margin: 0;
    }
}
.logo-tdm-mobile {
    display: none;
    font-family: 'Montserrat', 'Poppins', Arial, sans-serif;
    font-weight: 900;
    font-size: 2.2rem;
    letter-spacing: -2px;
    color: var(--primary);
    text-shadow: 0 2px 8px #fde7ef, 0 1px 0 #fff;
}
.logo-img-full {
    display: block;
}

@media (max-width: 768px) {
    .logo-img-full {
        display: none;
    }
    .logo-tdm-mobile {
        display: inline-block;
    }
    .header-social .social-icon.whatsapp,
    .header-social .social-icon.telegram {
        display: none !important;
    }
}
/* ==== HEADER MODERNO - TUDO DA MONA ==== */

.header {
    background: linear-gradient(135deg, var(--surface) 0%, var(--primary-light) 100%);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    /* Garantir que o header fique acima da navegação e dos dropdowns */
    /* Aumentado para garantir prioridade absoluta sobre a navegação */
    z-index: 1000000;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.logo img {
    height: 100px;
    width: auto;
}

/* Busca */
.search-container {
    flex: 1;
    max-width: 600px;
    /* Elevar a busca acima de qualquer dropdown do menu */
    position: relative;
    z-index: 200001;
}

.search-form {
    display: flex;
    align-items: stretch;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    /* Reforço de stacking para o input e botão */
    position: relative;
    z-index: 200002;
}

.search-form:focus-within {
    border-color: var(--primary);
}


.search-input {
    flex: 1;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    outline: none;
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-btn {
    background: var(--primary);
    border: none;
    padding: 0 1.5rem;
    color: var(--white);
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

/* Redes Sociais do Header */
.header-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #ffffff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-icon i {
    font-size: 16px;
    z-index: 2;
    position: relative;
}

.social-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon.tiktok {
    background: linear-gradient(45deg, #000000 0%, #ff0050 50%, #00f2ea 100%);
}

.social-icon.youtube {
    background: linear-gradient(45deg, #ff0000 0%, #cc0000 100%);
}

.social-icon.whatsapp {
    background: linear-gradient(45deg, #25d366 0%, #128c7e 100%);
}

.social-icon.telegram {
    background: linear-gradient(45deg, #0088cc 0%, #006699 100%);
}

.social-icon:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-icon:hover::before {
    opacity: 1;
}

/* Responsivo */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    
    .header-social {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem;
    }
    
    .social-icon {
        width: 32px;
        height: 32px;
    }
    
    .social-icon i {
        font-size: 14px;
    }
}