/**
 * Correções CSS - Souza e Müller Advogados
 * Data: 2025-11-26
 * Problemas corrigidos:
 * 1. Título do site aparecendo ao lado do logo
 * 2. Espaçamento e alinhamento do header
 * 3. Menu mobile com estilo melhorado
 * 4. Responsividade geral do cabeçalho
 */

/* ========================================
   1. OCULTAR TÍTULO DO SITE (JÁ TEM LOGO)
   ======================================== */
.ast-site-title-wrap,
.site-title {
    display: none !important;
}

/* ========================================
   2. CORREÇÕES DO HEADER PRINCIPAL
   ======================================== */

/* Ajustar padding do header */
.ast-primary-header-bar {
    padding: 0.5em 0;
}

/* Garantir alinhamento vertical correto */
.site-header-primary-section-left,
.site-header-primary-section-right {
    display: flex;
    align-items: center;
}

/* Logo com tamanho consistente */
.site-branding .custom-logo-link img {
    max-height: 70px;
    width: auto;
}

/* ========================================
   3. CORREÇÕES DO MENU DESKTOP
   ======================================== */

/* Espaçamento entre itens do menu */
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link {
    padding: 0 15px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hover suave no menu */
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* ========================================
   4. CORREÇÕES DO MENU MOBILE
   ======================================== */

/* Container do menu mobile */
.ast-mobile-header-content {
    padding: 0;
    background-color: #ffffff;
}

/* Links do menu mobile */
.ast-mobile-header-content .menu-link {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0, 109, 136, 0.1);
    font-size: 15px;
    color: #3a3a3a;
}

/* Hover no menu mobile */
.ast-mobile-header-content .menu-link:hover {
    background-color: rgba(0, 109, 136, 0.05);
    color: #006d88;
}

/* Último item sem borda */
.ast-mobile-header-content .menu-item:last-child .menu-link {
    border-bottom: none;
}

/* Botão do menu mobile (hamburguer) */
[data-section="section-header-mobile-trigger"] .ast-button-wrap .ast-mobile-menu-trigger-fill {
    padding: 8px 12px;
    border-radius: 4px;
}

/* ========================================
   5. RESPONSIVIDADE
   ======================================== */

/* Tablet */
@media (max-width: 992px) {
    .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link {
        padding: 0 10px;
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Ajustar logo no mobile */
    .site-branding .custom-logo-link img {
        max-height: 50px;
        max-width: 130px;
    }

    /* Header mobile com padding adequado */
    .ast-primary-header-bar {
        padding: 10px 0;
    }

    /* Menu mobile ocupar largura total */
    .ast-mobile-header-content .main-header-menu {
        width: 100%;
    }

    /* Garantir que o menu mobile seja visível quando aberto */
    .ast-main-header-nav-open .ast-mobile-header-content {
        display: block !important;
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* Mobile pequeno */
@media (max-width: 544px) {
    .site-branding .custom-logo-link img {
        max-height: 45px;
        max-width: 110px;
    }

    .ast-mobile-header-content .menu-link {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* ========================================
   6. HEADER TRANSPARENTE (CORREÇÕES)
   ======================================== */

/* Garantir legibilidade do menu no header transparente */
.ast-theme-transparent-header .main-header-menu .menu-link {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Fundo do header transparente no scroll (se houver sticky) */
.ast-theme-transparent-header.ast-header-sticky-active .ast-primary-header-bar {
    background-color: rgba(0, 109, 136, 0.95) !important;
}

/* ========================================
   7. CORREÇÃO Z-INDEX (SOBREPOSIÇÃO)
   ======================================== */

#masthead {
    z-index: 999;
}

.ast-mobile-header-content {
    z-index: 998;
}

/* ========================================
   8. ANIMAÇÕES SUAVES
   ======================================== */

.menu-link,
.ast-mobile-menu-trigger-fill,
.custom-logo-link img {
    transition: all 0.3s ease;
}

/* ========================================
   9. COMPATIBILIDADE ELEMENTOR 2.7.6
   Correções para estrutura antiga do Elementor
   ======================================== */

/* Estrutura de colunas do Elementor 2.x */
.elementor-row {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.elementor-column {
    position: relative;
    min-height: 1px;
    display: flex;
}

.elementor-column-wrap {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.elementor-widget-wrap {
    position: relative;
    width: 100%;
    flex-wrap: wrap;
    align-content: flex-start;
}

/* Correção de larguras das colunas */
.elementor-col-100 {
    width: 100%;
}

.elementor-col-50 {
    width: 50%;
}

.elementor-col-33 {
    width: 33.333%;
}

.elementor-col-25 {
    width: 25%;
}

.elementor-col-20 {
    width: 20%;
}

.elementor-col-16 {
    width: 16.666%;
}

/* Container do Elementor */
.elementor-container {
    display: flex;
    margin-right: auto;
    margin-left: auto;
    position: relative;
}

.elementor-section-boxed .elementor-container {
    max-width: 1140px;
}

.elementor-section-full_width .elementor-container {
    max-width: none;
    width: 100%;
}

/* Gaps entre colunas */
.elementor-column-gap-default > .elementor-row > .elementor-column > .elementor-element-populated {
    padding: 10px;
}

.elementor-column-gap-wide > .elementor-row > .elementor-column > .elementor-element-populated {
    padding: 20px;
}

.elementor-column-gap-narrow > .elementor-row > .elementor-column > .elementor-element-populated {
    padding: 5px;
}

.elementor-column-gap-no > .elementor-row > .elementor-column > .elementor-element-populated {
    padding: 0;
}

/* ========================================
   10. CORREÇÕES DO FORMULÁRIO DE CONTATO
   ======================================== */

/* Formulário Elementor */
.elementor-form .elementor-field-group {
    margin-bottom: 15px;
}

.elementor-form .elementor-field {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.elementor-form .elementor-field:focus {
    border-color: #006d88;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 109, 136, 0.2);
}

.elementor-form textarea.elementor-field {
    min-height: 120px;
    resize: vertical;
}

.elementor-form .elementor-button {
    width: 100%;
    padding: 15px 30px;
    background-color: #006d88;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.elementor-form .elementor-button:hover {
    background-color: #005570;
}

/* Labels do formulário - cor branca */
.elementor-form .elementor-field-label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #ffffff !important;
}

/* ========================================
   11. CORREÇÕES DE SEÇÕES E BACKGROUNDS
   ======================================== */

.elementor-section {
    position: relative;
    width: 100%;
}

.elementor-section-wrap {
    width: 100%;
}

.elementor-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.elementor-section > .elementor-container {
    position: relative;
    z-index: 1;
}

/* ========================================
   12. CORREÇÕES DE WIDGETS ESPECÍFICOS
   ======================================== */

/* Widget de Ícone */
.elementor-icon-wrapper {
    display: inline-block;
}

.elementor-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Widget de Espaçador */
.elementor-spacer {
    width: 100%;
}

/* Widget de Divisor */
.elementor-divider {
    width: 100%;
}

.elementor-divider-separator {
    display: block;
    border-top-style: solid;
}

/* Widget de Heading */
.elementor-heading-title {
    margin: 0;
    padding: 0;
}

/* Widget de Imagem */
.elementor-image img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   13. ANIMATED HEADLINE (HERO)
   ======================================== */

.elementor-widget-animated-headline .elementor-headline {
    text-align: center;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1.5;
    margin-bottom: 30px;
}

.elementor-widget-animated-headline .elementor-headline b {
    font-weight: 700;
}

.elementor-headline-dynamic-wrapper {
    display: inline-block;
}

/* Estilo highlight */
.elementor-headline--style-highlight .elementor-headline-dynamic-wrapper {
    position: relative;
}

.elementor-headline--style-highlight .elementor-headline-dynamic-text {
    position: relative;
    z-index: 1;
}

/* ========================================
   14. RESPONSIVIDADE ELEMENTOR 2.7.6
   ======================================== */

@media (max-width: 1024px) {
    .elementor-section-boxed .elementor-container {
        max-width: 1024px;
    }
}

@media (max-width: 768px) {
    /* NÃO forçar colunas para 100% - mantém layout original do Elementor */
    /* Apenas inner-sections (áreas de atuação) ficam em coluna */
    .elementor-inner-section .elementor-row {
        flex-direction: column;
    }

    .elementor-inner-section .elementor-column {
        width: 100% !important;
    }

    .elementor-section-boxed .elementor-container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .elementor-widget-animated-headline .elementor-headline {
        font-size: 1.3rem;
        padding: 0 15px;
    }
}

/* Seção de contato - manter duas colunas lado a lado */
.elementor-element-e10aa50 .elementor-row {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center; /* Centralizar verticalmente */
}

.elementor-element-e10aa50 .elementor-col-50 {
    width: 50% !important;
    min-width: 300px;
    flex: 1;
}

/* Mobile: seção de contato em coluna */
@media (max-width: 767px) {
    .elementor-element-e10aa50 .elementor-row {
        flex-direction: column !important;
    }

    .elementor-element-e10aa50 .elementor-col-50 {
        width: 100% !important;
        min-width: 100% !important;
        flex: none !important;
    }

    .elementor-element-e10aa50 .elementor-column {
        width: 100% !important;
        margin-bottom: 20px;
    }
}

/* Mobile: Forçar TODAS as colunas a empilhar verticalmente */
@media (max-width: 767px) {
    /* Reset completo para layout mobile */
    .elementor-section > .elementor-container > .elementor-row {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }

    /* Todas as colunas ocupam 100% */
    .elementor-column {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        flex-basis: 100% !important;
    }

    .elementor-col-50,
    .elementor-col-33,
    .elementor-col-25,
    .elementor-col-66 {
        width: 100% !important;
    }

    /* Espaçamento entre colunas */
    .elementor-row > .elementor-column {
        margin-bottom: 20px !important;
    }

    .elementor-row > .elementor-column:last-child {
        margin-bottom: 0 !important;
    }

    /* Typeform e iframes responsivos */
    .elementor-widget-html iframe {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Mapa Google responsivo */
    .elementor-widget-google_maps iframe,
    .elementor-widget-html iframe[src*="google.com/maps"] {
        width: 100% !important;
        height: 300px !important;
    }
}

@media (max-width: 544px) {
    .elementor-widget-animated-headline .elementor-headline {
        font-size: 1.1rem;
    }

    .elementor-form .elementor-field {
        padding: 10px 12px;
    }

    .elementor-form .elementor-button {
        padding: 12px 20px;
    }
}

/* ========================================
   15. CORREÇÕES EXTRAS PARA INNER SECTIONS
   ======================================== */

.elementor-inner-section {
    width: 100%;
}

.elementor-inner-section > .elementor-container {
    width: 100%;
}

/* Cards de áreas de atuação */
.elementor-inner-column {
    display: flex;
    flex-direction: column;
}

.elementor-inner-column .elementor-column-wrap {
    height: 100%;
    background-color: transparent;
}

/* Lista de ícones */
.elementor-icon-list-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.elementor-icon-list-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.elementor-icon-list-icon {
    margin-right: 10px;
    flex-shrink: 0;
}

.elementor-icon-list-text {
    line-height: 1.4;
}

/* ========================================
   16. CENTRALIZAÇÃO DE ÍCONES E WIDGETS
   ======================================== */

/* Centralizar widget de ícone na coluna */
.elementor-widget-icon {
    text-align: center;
    width: 100%;
}

.elementor-widget-icon .elementor-icon-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Centralizar ícone individual */
.elementor-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Seta para baixo no hero - centralizar */
.elementor-element-f853caf,
.elementor-widget-icon[data-element_type="widget"] {
    text-align: center;
}

.elementor-element-f853caf .elementor-icon-wrapper {
    display: flex;
    justify-content: center;
}

/* Ícones das áreas de atuação - centralizar */
.elementor-inner-column .elementor-widget-icon {
    text-align: center;
}

.elementor-inner-column .elementor-widget-icon .elementor-icon-wrapper {
    justify-content: center;
}

/* Títulos centralizados nas colunas */
.elementor-inner-column .elementor-widget-heading {
    text-align: center;
}

/* ========================================
   17. CORREÇÃO DO MAPA (IFRAME)
   ======================================== */

/* Container do mapa */
.elementor-widget-html {
    width: 100%;
}

.elementor-widget-html .elementor-widget-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Iframe do Google Maps responsivo e centralizado */
.elementor-widget-html iframe {
    max-width: 100%;
    width: 100%;
    height: 450px;
    border: none;
    border-radius: 8px;
}

/* Container centralizado para o mapa */
.elementor-element-50543c1 {
    display: flex;
    justify-content: center;
    width: 100%;
}

.elementor-element-50543c1 .elementor-widget-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   18. SETAS DE NAVEGAÇÃO (CIMA/BAIXO)
   ======================================== */

/* Seta para baixo - centralizada e clicável */
.elementor-widget-icon .elementor-icon {
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.elementor-widget-icon .elementor-icon:hover {
    transform: translateY(5px);
    opacity: 0.8;
}

/* Garantir que setas fiquem centralizadas */
.elementor-element-f853caf,
.elementor-element[data-widget_type="icon.default"] {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ========================================
   19. ALINHAMENTO DE WIDGET-WRAP
   ======================================== */

/* Centralizar conteúdo dentro do widget-wrap */
.elementor-widget-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Manter widgets em largura total mas conteúdo centralizado */
.elementor-widget-wrap > .elementor-element {
    width: 100%;
}

/* Específico para colunas com ícones (áreas de atuação) */
.elementor-inner-section .elementor-widget-wrap {
    align-items: center;
    text-align: center;
}

/* Listas de ícones - alinhar à esquerda */
.elementor-widget-icon-list {
    text-align: left;
}

.elementor-widget-icon-list .elementor-widget-container {
    display: inline-block;
}

/* ========================================
   20. RESPONSIVIDADE DO MAPA E ÍCONES
   ======================================== */

@media (max-width: 768px) {
    /* Mapa responsivo */
    .elementor-widget-html iframe {
        height: 350px;
    }

    .elementor-element-50543c1 .elementor-widget-container {
        padding: 0 15px;
    }

    /* Ícones mantêm centralização no mobile */
    .elementor-inner-column .elementor-widget-icon .elementor-icon-wrapper {
        justify-content: center;
    }
}

@media (max-width: 544px) {
    .elementor-widget-html iframe {
        height: 280px;
    }
}
