/**
 * AH Show Blog - Header Styles
 * 
 * CSS para o header flutuante personalizado
 */

/* ==========================================================================
   HEADER PRINCIPAL
   ========================================================================== */

.ahshow-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1200px;
    background: rgba(242, 242, 247, 0.85);
    backdrop-filter: blur(7px);
    border-radius: 100px;
    z-index: 999999;
    transition: all 0.3s ease;
    /* Garantir que o header esteja centralizado e com animação suave */
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    /* Garantir que não interfira com o Elementor */
    pointer-events: all;
}

.ahshow-header.scrolled {
    top: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateX(-50%);
}

.ahshow-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    height: 100px;
}

/* ==========================================================================
   LOGO
   ========================================================================== */

.ahshow-header-logo {
    flex-shrink: 0;
}

.ahshow-header-logo .custom-logo {
    max-height: 40px;
    width: auto;
}

.ahshow-logo-svg {
    text-decoration: none;
    display: inline-block;
    line-height: 1;
    transition: opacity 0.3s ease;
}

.ahshow-logo-svg svg {
    width: 117px;
    height: 32px;
    display: block;
}

.ahshow-logo-svg:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* ==========================================================================
   NAVEGAÇÃO PRINCIPAL
   ========================================================================== */

.ahshow-header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 20px;
}

.ahshow-main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 35px;
}

.ahshow-main-menu li {
    position: relative;
}

.ahshow-main-menu li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 0;
    transition: color 0.3s ease;
    position: relative;
}

.ahshow-main-menu li a:hover,
.ahshow-main-menu li.current-menu-item a {
    color: #F205B3;
}

.ahshow-main-menu li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #F205B3;
    transition: width 0.3s ease;
}

.ahshow-main-menu li a:hover::after,
.ahshow-main-menu li.current-menu-item a::after {
    width: 100%;
}

/* Submenu */
.ahshow-main-menu li .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 200px;
    margin-top: 15px;
    padding: 15px 0;
    list-style: none;
}

.ahshow-main-menu li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    margin-top: 10px;
}

.ahshow-main-menu li .sub-menu li {
    margin: 0;
    padding: 0;
}

.ahshow-main-menu li .sub-menu li a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    color: #666;
    border-radius: 0;
}

.ahshow-main-menu li .sub-menu li a:hover {
    background: #f8f9fa;
    color: #F205B3;
}

.ahshow-main-menu li .sub-menu li a::after {
    display: none;
}

/* ==========================================================================
   AÇÕES DO HEADER
   ========================================================================== */

.ahshow-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* Botão de Busca */
.ahshow-search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    color: #F205B3;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ahshow-search-toggle:hover {
    background: #e4e4eb;
    color: #F205B3;
    transform: scale(1.1);
}

/* Botão Portal */
.ahshow-portal-btn {
    background: #F205B3;
    color: white;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.ahshow-portal-btn:hover {
    background: #D0069A;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Menu Mobile Toggle (oculto no desktop) */
.ahshow-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}

.ahshow-mobile-toggle:focus,
.ahshow-mobile-toggle:active {
    outline: none;
    background: none !important;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ==========================================================================
   BUSCA FULL SCREEN
   ========================================================================== */

.ahshow-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.ahshow-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ahshow-search-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.ahshow-search-close {
    position: absolute;
    top: 40px;
    right: 40px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.ahshow-search-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.ahshow-search-form-wrapper {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.ahshow-search-title {
    color: white;
    font-size: 32px;
    margin-bottom: 40px;
    font-weight: 300;
}

.ahshow-search-form {
    position: relative;
    margin-bottom: 40px;
}

.ahshow-search-field {
    width: 100%;
    padding: 20px 60px 20px 20px;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 100px !important;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
    transition: all 0.3s ease;
    height: 50px;
}

.ahshow-search-field::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.ahshow-search-field:focus {
    border-color: #F205B3;
    background: rgba(255, 255, 255, 0.15);
}

.ahshow-search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #F205B3 !important;
    border: none !important;
    border-radius: 100px !important;
    width: 40px;
    height: 40px;
    color: white !important;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 10px !important;
}

.ahshow-search-submit:hover {
    background: #e6005f;
    transform: translateY(-50%) scale(1.1);
}

/* Sugestões de Busca */
.ahshow-search-suggestions {
    opacity: 0.8;
}

.suggestions-title {
    color: white;
    margin-bottom: 15px;
    font-size: 16px;
}

.suggestions-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.suggestion-tag {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.suggestion-tag:hover {
    background: #F205B3;
    border-color: #F205B3;
    text-decoration: none;
    color: white;
}

/* ==========================================================================
   MENU MOBILE FULL SCREEN
   ========================================================================== */

.ahshow-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.90);
    z-index: 9999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.ahshow-mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.ahshow-mobile-menu-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: #F4F4F8;
    border-top-right-radius: 40px;
    border-bottom-right-radius: 40px;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
}

.ahshow-mobile-menu.active .ahshow-mobile-menu-container {
    transform: translateX(0);
}

.ahshow-mobile-menu-header {
    padding: 40px 30px 30px;
    border-bottom: 1px solid rgba(18, 18, 18, 0.1);
}

.ahshow-mobile-menu-logo {
    display: block;
}

.ahshow-mobile-menu-logo svg {
    width: 117px;
    height: 32px;
}

.ahshow-mobile-menu-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: #F205B3;
    transition: all 0.3s ease;
}

.ahshow-mobile-menu-close:hover {
    background: rgba(242, 5, 179, 0.1);
    transform: rotate(90deg);
}

.ahshow-mobile-menu-nav {
    flex: 1;
    padding: 20px 0;
}

.ahshow-mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ahshow-mobile-menu-list li {
    margin: 0;
}

.ahshow-mobile-menu-list li a {
    display: block;
    padding: 20px 30px;
    color: #121212;
    text-decoration: none;
    font-weight: 500;
    font-size: 18px;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(18, 18, 18, 0.05);
    position: relative;
}

.ahshow-mobile-menu-list li a:hover,
.ahshow-mobile-menu-list li.current-menu-item a {
    color: #F205B3;
    background: rgba(242, 5, 179, 0.05);
}

/* Links com submenu */
.ahshow-mobile-menu-list li.menu-item-has-children > a {
    padding-right: 60px;
}

.ahshow-mobile-menu-list li.menu-item-has-children > a::after {
    content: '';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #666;
    transition: all 0.3s ease;
}

.ahshow-mobile-menu-list li.menu-item-has-children.open > a::after {
    transform: translateY(-50%) rotate(180deg);
    border-top-color: #F205B3;
}

.ahshow-mobile-menu-list li.menu-item-has-children.open > a {
    color: #F205B3;
}

/* Submenu mobile */
.ahshow-mobile-menu-list li .sub-menu {
    background: rgba(18, 18, 18, 0.02);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.ahshow-mobile-menu-list li.menu-item-has-children.open .sub-menu {
    max-height: 500px;
}

.ahshow-mobile-menu-list li .sub-menu li a {
    font-size: 16px;
    padding: 15px 30px 15px 50px;
    color: #666;
    font-weight: 400;
}

.ahshow-mobile-menu-list li .sub-menu li a:hover {
    color: #F205B3;
    background: rgba(242, 5, 179, 0.03);
}

.ahshow-mobile-menu-footer {
    padding: 30px;
    border-top: 1px solid rgba(18, 18, 18, 0.1);
}

.ahshow-mobile-portal-btn {
    display: block;
    background: #F205B3;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
}

.ahshow-mobile-portal-btn:hover {
    background: #D0069A;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* ==========================================================================
   ANIMAÇÕES
   ========================================================================== */

@keyframes slideInDown {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.ahshow-header {
    animation: slideInDown 0.8s ease-out forwards;
}

.ahshow-header.loaded {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   BODY PADDING (para compensar header fixo)
   ========================================================================== */

body {
    padding-top: 100px;
}

/* ==========================================================================
   ESTADOS ESPECIAIS
   ========================================================================== */

/* Header em páginas admin */
.admin-bar .ahshow-header {
    top: 52px;
}

.admin-bar .ahshow-header.scrolled {
    top: 42px;
    transform: translateX(-50%);
}

.admin-bar body {
    padding-top: 132px;
}

/* ==========================================================================
   MEDIA QUERIES - RESPONSIVO
   ========================================================================== */

/* Tablets e Smartphones - abaixo de 1000px */
@media (max-width: 999px) {
    
    /* Mostrar hamburger menu */
    .ahshow-mobile-toggle {
        display: flex !important;
    }
    
    /* Ocultar menu desktop */
    .ahshow-header-nav {
        display: none !important;
    }
    
    /* Manter botão de busca visível em todas as resoluções */
    .ahshow-search-toggle {
        display: flex !important;
    }
    
    /* Ajustar container do header */
    .ahshow-header-container {
        padding: 0 20px;
        height: 80px;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        position: relative !important;
    }
    
    /* Hambúrguer fixo à esquerda */
    .ahshow-mobile-toggle {
        position: absolute !important;
        left: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 10 !important;
    }
    
    /* Logo alinhado à esquerda no mobile */
    .ahshow-header-logo {
        position: absolute !important;
        left: 70px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }
    
    /* Actions fixas à direita */
    .ahshow-header-actions {
        position: absolute !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
    }
    
    /* Ajustar header */
    .ahshow-header {
        width: calc(100% - 20px);
        top: 10px;
        height: 80px;
    }
    
    .ahshow-header.scrolled {
        top: 5px;
    }
    
    /* Ajustar logo */
    .ahshow-logo-svg {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
    }
    
    .ahshow-logo-svg svg {
        width: 100px;
        height: 27px;
        display: block;
        vertical-align: middle;
    }
    
    /* Ajustar botão portal */
    .ahshow-portal-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    /* Ajustar body padding */
    body {
        padding-top: 90px;
    }
    
    .admin-bar .ahshow-header {
        top: 42px;
    }
    
    .admin-bar .ahshow-header.scrolled {
        top: 37px;
    }
    
    .admin-bar body {
        padding-top: 122px;
    }
}

/* Smartphones pequenos - abaixo de 480px */
@media (max-width: 479px) {
    
    .ahshow-header {
        width: calc(100% - 10px);
        top: 5px;
        height: 70px;
    }
    
    .ahshow-header.scrolled {
        top: 2px;
    }
    
    .ahshow-header-container {
        padding: 0 15px;
        height: 70px;
    }
    
    /* Ajustar posições para telas pequenas */
    .ahshow-mobile-toggle {
        left: 15px !important;
    }
    
    .ahshow-header-logo {
        left: 60px !important;
    }
    
    .ahshow-header-actions {
        right: 15px !important;
    }
    
    .ahshow-logo-svg svg {
        width: 90px;
        height: 24px;
    }
    
    .ahshow-portal-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    body {
        padding-top: 75px;
    }
    
    .admin-bar body {
        padding-top: 107px;
    }
}

/* ==========================================================================
   CORREÇÕES PARA ELEMENTOR
   ========================================================================== */

/* Header sempre visível, mas sem interferir na edição */
.elementor-editor-active .ahshow-header {
    pointer-events: none !important;
    opacity: 1 !important;
    z-index: 999999 !important;
}

/* Garantir que o header tenha prioridade sobre elementos do Elementor */
.ahshow-header {
    isolation: isolate;
}

/* Corrigir conflitos de z-index com widgets do Elementor */
.elementor-widget {
    z-index: auto !important;
}

.elementor-element:not(.elementor-element-edit-mode) {
    z-index: auto !important;
}

/* Garantir que dropdowns e popups do Elementor funcionem */
.elementor-popup-modal {
    z-index: 10000000 !important;
}

.elementor-location-header {
    z-index: 999998 !important;
}

/* Header visível no preview mas sem interferir */
.elementor-editor-preview .ahshow-header {
    pointer-events: none;
    opacity: 1;
    z-index: 999999;
}

/* Ajustar para quando há admin bar + elementor */
.admin-bar.elementor-editor-active body {
    padding-top: 132px !important;
}

/* Manter padding no preview para visualizar corretamente */
.admin-bar.elementor-editor-preview body {
    padding-top: 132px !important;
}

/* Garantir que o header não quebre layouts em colunas do Elementor */
.elementor-container,
.elementor-row {
    position: relative;
    z-index: 1;
}

/* Corrigir sobreposição com seções sticky do Elementor */
.elementor-sticky {
    z-index: 999997 !important;
}

.elementor-sticky--active {
    z-index: 999997 !important;
}

/* Garantir que modais e overlays do Elementor funcionem */
.dialog-widget-content,
.elementor-popup-modal,
.elementor-lightbox {
    z-index: 10000000 !important;
}

/* Corrigir conflitos com navegação mobile do Elementor */
.elementor-nav-menu--mobile .elementor-nav-menu {
    z-index: 999996 !important;
}

/* Garantir que tooltips e dropdowns do Elementor funcionem */
.tippy-box,
.elementor-tooltip,
.select2-dropdown {
    z-index: 10000001 !important;
}

/* Manter padding do body sempre para visualizar layout correto */
.elementor-editor-active body {
    padding-top: 100px !important;
}

/* Manter padding no preview para visualizar layout correto */
.elementor-editor-preview body {
    padding-top: 100px !important;
}

/* Garantir que breakpoints responsivos do Elementor funcionem */
@media (max-width: 1024px) {
    .elementor-kit-6 .ahshow-header {
        z-index: 999999 !important;
    }
}

/* Corrigir conflitos com seções fullwidth do Elementor */
.elementor-section.elementor-section-stretched {
    z-index: auto !important;
}

/* Garantir que widgets flutuantes do Elementor funcionem */
.elementor-widget-button.elementor-absolute,
.elementor-widget-image.elementor-absolute {
    z-index: 999998 !important;
}