/* Header Pro Widget Styles */

/* Força o widget do Header Pro a não herdar fundos/padding do tema/Elementor */
.elementor-widget-nexcore-header-pro > .elementor-widget-container {
    background: transparent !important;
    padding: 0 !important;
}

.nex-header {
    position: relative;
    width: 100%;
    z-index: 999;
    /* Transições mais suaves apenas para as propriedades relevantes */
    transition:
        background-color 0.45s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 0.45s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nex-header.nex-header--sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.nex-header__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nex-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Layout Variations */
.nex-header__layout--center .nex-header__logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nex-header__layout--split .nex-header__inner {
    justify-content: center;
    gap: 60px;
}

/* Logo */
.nex-header__logo {
    position: relative;
    z-index: 10;
}

.nex-header__logo a {
    display: block;
    line-height: 0;
}

.nex-header__logo-img {
    display: block;
    height: auto;
    max-height: none; /* tamanho controlado pelo inline style gerado no PHP */
    transition: opacity 0.3s ease;
}

.nex-header__logo-sticky {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
}

.nex-header.nex-header--sticky .nex-header__logo-normal {
    opacity: 0;
    pointer-events: none;
}

.nex-header.nex-header--sticky .nex-header__logo-sticky {
    opacity: 1;
    pointer-events: auto;
}

/* Navigation */
.nex-header__nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nex-header__nav-panel {
    display: flex;
    align-items: center;
}

/* Logo específico do menu mobile: oculto em desktop */
.nex-header__menu-mobile-brand {
    display: none;
}

.nex-header__cta {
    margin-left: 20px;
}

.nex-header__menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nex-header__menu>li {
    position: relative;
}

.nex-header__menu a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nex-header__menu a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

/* Ícone de submenu (seta) para itens com filhos */
.nex-header__menu > li.menu-item-has-children > a {
    padding-right: 20px;
}

.nex-header__menu > li.menu-item-has-children > a::before {
    content: '\f107';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    opacity: 0.75;
}

.nex-header__menu a:hover::after,
.nex-header__menu .current-menu-item>a::after {
    width: 100%;
}

/* Dropdown Menus */
.nex-header__menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    list-style: none;
    margin: 0;
}

.nex-header__menu li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nex-header__menu .sub-menu li {
    margin: 0;
}

.nex-header__menu .sub-menu a {
    padding: 10px 20px;
    color: #333;
}

.nex-header__menu .sub-menu a::after {
    display: none;
}

.nex-header__menu .sub-menu a:hover {
    background: #f5f5f5;
}

/* Mobile Toggle */
.nex-header__toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

/* Barras do hambúrguer (apenas spans que NÃO são ícones) */
.nex-header__toggle > span:not(.nex-header__toggle-icon) {
    display: block;
    width: 100%;
    height: 3px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Variante com ícones personalizados */
.nex-header__toggle-icon {
    display: none; /* por padrão escondido; controlamos via modifiers abaixo */
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.nex-header__toggle-icon--open {
    display: inline-flex;
}

.nex-header__toggle-icon--close {
    display: none;
}

.nex-header__toggle.active .nex-header__toggle-icon--open {
    display: none;
}

.nex-header__toggle.active .nex-header__toggle-icon--close {
    display: inline-flex;
}

.nex-header__toggle.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.nex-header__toggle.active span:nth-child(2) {
    opacity: 0;
}

.nex-header__toggle.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Fullscreen Menu */
.nex-header__fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Efeito glassmorphism (liquid glass) */
    background: radial-gradient(circle at top left, rgba(102, 126, 234, 0.32), transparent 55%),
                radial-gradient(circle at bottom right, rgba(118, 75, 162, 0.32), transparent 55%),
                rgba(11, 15, 25, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    /* acima do header principal para não ficar atrás do logo */
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.nex-header__fullscreen.active {
    opacity: 1;
    visibility: visible;
}

.nex-header__fullscreen-inner {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.nex-header__fullscreen-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nex-header__fullscreen-menu li {
    margin: 20px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.nex-header__fullscreen.active .nex-header__fullscreen-menu li {
    opacity: 1;
    transform: translateY(0);
}

.nex-header__fullscreen-menu li:nth-child(1) {
    transition-delay: 0.1s;
}

.nex-header__fullscreen-menu li:nth-child(2) {
    transition-delay: 0.15s;
}

.nex-header__fullscreen-menu li:nth-child(3) {
    transition-delay: 0.2s;
}

.nex-header__fullscreen-menu li:nth-child(4) {
    transition-delay: 0.25s;
}

.nex-header__fullscreen-menu li:nth-child(5) {
    transition-delay: 0.3s;
}

.nex-header__fullscreen-menu a {
    display: block;
    color: #ffffff;
    font-size: 32px;
    font-weight: 600;
    text-decoration: none;
    padding: 15px 30px;
    transition: all 0.3s ease;
}

.nex-header__fullscreen-menu a:hover {
    color: #667eea;
    transform: scale(1.1);
}

/* Brand dentro do menu fullscreen */
.nex-header__fullscreen-brand {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nex-header__fullscreen-brand-logo img {
    max-height: 60px;
    width: auto;
    height: auto;
    display: block;
}

.nex-header__fullscreen-brand-title {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.85;
}

.nex-header__fullscreen-brand-subtitle {
    margin-top: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* Impedir scroll do body quando menu mobile / fullscreen está aberto */
body.menu-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 992px) {
    .nex-header__toggle {
        display: flex;
    }

    .nex-header__nav-panel {
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        height: 100vh;
        background: var(--nex-mobile-menu-bg, #ffffff);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px 30px;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        /* acima do header e do logo, mas abaixo do overlay fullscreen */
        z-index: 1000;
    }

    .nex-header__nav-panel.active {
        transform: translateX(0);
    }

    .nex-header__menu-mobile-brand {
        margin-bottom: 24px;
        display: block;
    }

    .nex-header__menu-mobile-brand img {
        max-height: 40px;
        width: auto;
        height: auto;
        display: block;
    }

    .nex-header__menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .nex-header__menu>li {
        width: 100%;
        margin: 0 !important;
        border-bottom: 1px solid #f0f0f0;
    }

    .nex-header__menu a {
        padding: 15px 0;
        /* permite cor diferente em mobile, mesmo que o estilo de desktop esteja definido no Elementor */
        color: var(--nex-mobile-menu-link-color, inherit) !important;
    }

    .nex-header__menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        background: transparent;
    }

    .nex-header__menu a:hover {
        color: var(--nex-mobile-menu-link-hover-color, inherit) !important;
    }
}

@media (max-width: 768px) {
    .nex-header__fullscreen {
        align-items: flex-start;
        padding-top: 60px;
    }

    .nex-header__fullscreen-inner {
        max-width: 100%;
        padding: 32px 20px 40px;
    }

    .nex-header__fullscreen-menu a {
        font-size: 22px;
        padding: 12px 0;
    }

    .nex-header__fullscreen-brand {
        margin-bottom: 24px;
    }
}