/* Ajuste nas propriedades do header */
header {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    background: white;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: auto;
    min-height: 80px;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: all 0.3s ease;
    will-change: transform, top;
}

/* Ajuste para quando a top bar estiver oculta */
header.top-bar-hidden {
    top: 0;
}

/* Header compacto */
header.compact {
    min-height: 50px;
    top: 0 !important;
    /* Força a posição top quando compacto */
}

header.compact.top-bar-hidden {
    top: 0;
}

header.compact .logo img {
    max-height: 50px;
}

/* Container do header */
header .container {
    padding: 0.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    background: white;
    transition: all 0.3s ease;
}

/* Logo */
header .logo img {
    max-height: 90px;
    width: auto;
    display: block;
    transition: all 0.3s ease;
    object-fit: contain;
}

/* Ajuste no body para compensar o header fixo */
body {
    padding-top: 110px;
    margin: 0;
    transition: padding-top 0.3s ease;
}

body.top-bar-hidden {
    padding-top: 90px;
}

body.header-compact {
    padding-top: 70px;
}

body.header-compact.top-bar-hidden {
    padding-top: 50px;
}

/* Ajustes específicos para o menu */
nav {
    height: 100%;
    display: flex;
    align-items: center;
    background: white;
    margin-left: auto;
}

#primary-menu {
    height: 100%;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    background: white;
    gap: 2.5rem;
}

/* Garantir que o header tenha altura suficiente */
.site-header {
    min-height: 60px;
    height: auto;
    background: white;
}

/* Ajuste do container principal */
.container {
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
}

/* Reset e configurações base */
.menu-item {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Menu principal */
#primary-menu>li>a {
    color: #1a5b95;
    font-weight: 500;
    font-size: 16px;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

/* Submenus - Configuração geral */
.sub-menu {
    display: none;
    position: absolute;
    background-color: #ffffff !important;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px 0;
    z-index: 1000;
}

/* Primeiro nível do submenu */
#primary-menu>.menu-item-has-children>.sub-menu {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 20px;
}

/* Segundo e terceiro níveis */
.sub-menu .sub-menu {
    top: 0;
    left: calc(100% + 10px);
    margin-top: 0;
    z-index: 10002;
}

/* Items do submenu */
.sub-menu li {
    position: relative;
}

.sub-menu li a {
    padding: 10px 15px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    color: #374151;
    font-size: 14px;
    font-weight: normal;
    transition: all 0.2s;
    line-height: 1.4;
    white-space: normal;
    gap: 6px;
}

.sub-menu li a:hover {
    background: #f3f4f6;
    color: #1a5b95;
}

/* Indicadores de submenu */
.menu-item-has-children>a::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
}

.sub-menu .menu-item-has-children>a::after {
    transform: rotate(-45deg);
    margin-left: auto;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Exibição dos submenus */
.menu-item-has-children:hover>.sub-menu {
    display: block;
}

/* Área de hover para evitar que o menu feche */
.menu-item-has-children::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 20px;
    bottom: -20px;
    left: 0;
}

.sub-menu .menu-item-has-children::after {
    width: 20px;
    height: 100%;
    left: 100%;
    top: 0;
}

/* Animação suave */
.sub-menu {
    opacity: 0;
    transform-origin: top center;
    animation: menuAppear 0.2s ease forwards;
}

@keyframes menuAppear {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Removendo SVGs padrão do WordPress */
.menu-item-has-children>a svg {
    display: none !important;
}

/* Garantindo que o submenu fique sobre outros elementos */
.menu-item-has-children {
    position: relative;
    z-index: 10000;
}

/* Remover margens do hero */
.hero-section {
    margin-top: 0;
}

/* Estilos do Menu Mobile */
.mobile-menu {
    margin-top: 2rem;
}

.mobile-menu li {
    position: relative;
}

.mobile-menu a {
    display: block;
    padding: 12px 0;
    color: #374151;
    font-size: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu>li>a {
    color: #1a5b95;
    font-weight: 500;
}

/* Submenu Mobile */
.mobile-menu .sub-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    background: #f8fafc !important;
    padding: 0;
    margin: 0;
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    opacity: 1;
    transform: none;
    animation: none;
    display: block;
}

.mobile-menu .sub-menu a {
    padding-left: 1rem;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu .sub-menu .sub-menu {
    background: #f1f5f9 !important;
}

.mobile-menu .sub-menu .sub-menu a {
    padding-left: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

/* Ajuste para o terceiro nível */
.mobile-menu .sub-menu .sub-menu .sub-menu {
    background: #e2e8f0 !important;
}

.mobile-menu .sub-menu .sub-menu .sub-menu a {
    padding-left: 3rem;
    font-size: 13px;
    border-bottom: 1px solid #cbd5e1;
}

/* Toggle para submenus no mobile */
.mobile-menu .menu-item-has-children>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 1rem;
}

.mobile-menu .menu-item-has-children>a::after {
    content: '+';
    border: none;
    transform: none;
    margin-left: auto;
    font-size: 20px;
    font-weight: 300;
    width: auto;
    height: auto;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mobile-menu .menu-item-has-children.active>a::after {
    content: '-';
    transform: none;
}

/* Ajuste para garantir que o menu mobile tenha scroll quando necessário */
#mobile-menu .fixed {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

#mobile-menu .fixed>div {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 2rem;
}

/* Ajuste para o container do menu mobile */
#mobile-menu .fixed {
    width: 300px;
    max-width: 90vw;
}

/* Animação do overlay */
#mobile-menu.active {
    display: block;
}

#mobile-menu.active .fixed {
    transform: translateX(0);
}

/* Removendo a seta do menu desktop apenas no mobile */
@media (max-width: 768px) {
    body.menu-open {
        overflow: hidden;
    }

    .menu-item-has-children>a svg {
        display: none !important;
    }
}

html,
body {
    overflow-x: hidden;
    width: 100vw;
}

.depoimentos-section {
    overflow-x: hidden;
    width: 100vw;
    max-width: 100vw;
}

/* Ajuste específico para o logo do customizer */
.custom-logo-link img {
    max-height: 98px !important;
    width: auto !important;
    height: auto !important;
}

header.compact .custom-logo-link img {
    max-height: 60px !important;
}

/* Add critical path CSS here */