/**
 * Header Styles - Poços Já
 * Versão: 19.2 - AJUSTES DE FONTES
 * 
 * ✅ Categorias Drilldown: 13px → 15px
 * ✅ Subcategorias Drilldown: 13px → 15px
 * ✅ Menu Horizontal: 11px → 13px
 * ✅ Header Institucional: 13px → 12px
 */

/* ===================================================================
   VARIÁVEIS GLOBAIS
   =================================================================== */

:root {
    --pj-blue: #003482;
    --pj-red: #c8102e;
    --pj-header-h-portrait: 70px;
    --pj-header-h-landscape: 56px;
    --pj-logo-h-portrait: 42px;
    --pj-logo-h-landscape: 28px;
    --hamburger-width: 24px;
    --hamburger-height: 2.5px;
    --hamburger-gap: 5px;
}

/* ===================================================================
   PROTEÇÃO ANTI-ADSENSE NO HEADER
   =================================================================== */

.site-header ~ ins,
.site-header ~ .adsbygoogle,
body > ins:first-of-type,
body > .adsbygoogle:first-of-type {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
}

/* ===================================================================
   Z-INDEX HIERARCHY - CORRIGIDO
   =================================================================== */

.site-header { z-index: 400 !important; }
.header-model-1 .main-nav-list .sub-menu { z-index: 5500 !important; }
.menu-overlay { z-index: 6000 !important; }
.menu-offcanvas { z-index: 6001 !important; }
.search-overlay-desktop,
.search-overlay-mobile { z-index: 6500 !important; }

/* ===================================================================
   RESET CRÍTICO
   =================================================================== */

.site-header { position: relative; }

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

/* ===================================================================
   HAMBÚRGUER UNIVERSAL - RESET AGRESSIVO
   =================================================================== */

.menu-toggle,
.menu-toggle-desktop-1,
.menu-toggle-desktop-2,
.menu-toggle-mobile,
.search-toggle,
.search-toggle-desktop-1,
.search-toggle-desktop-2,
.search-toggle-mobile {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 8px !important;
    margin: 0 !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: var(--hamburger-gap) !important;
    flex-shrink: 0 !important;
    color: inherit !important;
}

.menu-toggle:hover,
.menu-toggle:focus,
.menu-toggle:active,
.menu-toggle-desktop-1:hover,
.menu-toggle-desktop-1:focus,
.menu-toggle-desktop-1:active,
.menu-toggle-desktop-2:hover,
.menu-toggle-desktop-2:focus,
.menu-toggle-desktop-2:active,
.menu-toggle-mobile:hover,
.menu-toggle-mobile:focus,
.menu-toggle-mobile:active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.hamburger-icon {
    display: block !important;
    width: var(--hamburger-width) !important;
    height: var(--hamburger-height) !important;
    min-height: var(--hamburger-height) !important;
    max-height: var(--hamburger-height) !important;
    background: currentColor !important;
    border-radius: 2px !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    border: none !important;
    outline: none !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

/* ===================================================================
   HEADER DESKTOP 1 - HOME (>1024px)
   =================================================================== */

@media (min-width: 1025px) {
    
    /* Barra Institucional */
    .header-model-1 .header-institutional {
        background: var(--pj-blue);
        color: white;
        height: 40px;
        display: flex;
        align-items: center;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08);
        position: relative;
        z-index: 3;
    }
    
    .header-model-1 .header-institutional .container,
    .header-model-2 .header-institutional .container {
        display: flex;
        align-items: center;
        width: 100%;
    }
    
    .institutional-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .header-model-1 .institutional-menu,
    .header-model-2 .institutional-menu {
        display: flex;
        gap: 24px;
        align-items: center;
        margin: 0;
    }
    
    .header-model-1 .institutional-menu a {
        color: white;
        text-decoration: none;
        font-size: 12px;
        font-weight: 600;
        transition: all 0.2s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        position: relative;
    }
    
    .header-model-1 .institutional-menu a::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background: white;
        transition: width 0.3s ease;
    }
    
    .header-model-1 .institutional-menu a:hover::after {
        width: 100%;
    }
    
    .header-model-1 .header-meta {
        display: flex;
        gap: 10px;
        align-items: center;
        margin-left: auto;
    }
    
    .header-model-1 .header-meta a {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.12);
        color: white;
        transition: all 0.3s ease;
    }
    
    .header-model-1 .header-meta a:hover {
        background: rgba(255,255,255,0.25);
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    
    .header-model-1 .header-meta svg {
        width: 17px;
        height: 17px;
    }
    
    /* Barra da Logo */
    .header-model-1 .header-logo-bar {
        background: white;
        padding: 30px 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.06);
        position: relative;
        z-index: 2;
    }
    
    .header-model-1 .header-logo-bar-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 40px;
    }
    
    /* Menu Hambúrguer Desktop */
    .header-model-1 .menu-toggle-desktop-1 {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 14px 24px;
        cursor: pointer;
        color: var(--pj-blue);
        font-weight: 700;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        transition: all 0.3s ease;
        border-radius: 6px;
    }
    
    .header-model-1 .hamburger-wrapper {
        display: flex;
        flex-direction: column;
        gap: var(--hamburger-gap);
        width: var(--hamburger-width);
        align-items: center;
        justify-content: center;
    }
    
    .header-model-1 .hamburger-wrapper .hamburger-icon,
    .header-model-1 .menu-toggle-desktop-1 .hamburger-icon {
        background: #003482 !important;
        background-color: #003482 !important;
    }
    
    .header-model-1 .menu-toggle-desktop-1:hover .hamburger-icon {
        background: var(--pj-red) !important;
        background-color: var(--pj-red) !important;
    }
    
    .header-model-1 .menu-label {
        font-weight: 700;
        font-size: 12px;
        color: var(--pj-blue);
    }
    
    /* Logo Grande */
    .header-model-1 .site-logo-large {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: transform 0.3s ease;
    }
    
    .header-model-1 .site-logo-large:hover {
        transform: scale(1.02);
    }
    
    .header-model-1 .site-logo-large img {
        width: auto;
        height: 120px;
        max-height: 120px;
        display: block;
        object-fit: contain;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    }
    
    /* Busca Desktop 1 */
    .header-model-1 .search-toggle-desktop-1 {
        color: var(--pj-blue);
        padding: 14px 24px;
        border-radius: 6px;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        font-weight: 700;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        transition: all 0.3s ease;
    }
    
    .header-model-1 .search-toggle-desktop-1 svg {
        width: 24px;
        height: 24px;
        transition: all 0.3s ease;
        stroke: var(--pj-blue);
    }
    
    .header-model-1 .search-toggle-desktop-1:hover svg {
        stroke: var(--pj-red);
        transform: rotate(90deg) scale(1.1);
    }
    
    .header-model-1 .search-label {
        color: var(--pj-blue);
    }
    
    /* Linha Vermelha Decorativa */
    .header-model-1 .header-logo-bar::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(
            90deg,
            transparent 0%,
            transparent 10%,
            var(--pj-red) 15%,
            var(--pj-red) 85%,
            transparent 90%,
            transparent 100%
        );
        box-shadow: 0 2px 12px rgba(200, 16, 46, 0.4);
    }
    
    /* Menu Horizontal */
    .header-model-1 .header-menu-section {
        background: white;
        padding: 2px 0;
        box-shadow: 0 2px 6px rgba(0,0,0,0.04);
        border-top: 1px solid rgba(0,0,0,0.05);
        position: relative;
        z-index: 1;
    }
    
    .header-model-1 .primary-menu-desktop {
        display: flex;
        justify-content: center;
    }
    
    .header-model-1 .main-nav-list {
        display: flex;
        gap: 0;
        list-style: none;
        margin: 0;
        padding: 0;
        align-items: center;
    }
    
    .header-model-1 .main-nav-list > li {
        position: relative;
    }
    
    .header-model-1 .main-nav-list > li > a {
        text-decoration: none;
        color: #333;
        font-weight: 600;
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px 18px;
        position: relative;
    }
    
    .header-model-1 .main-nav-list > li > a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 3px;
        background: var(--pj-red);
        transition: width 0.3s ease;
    }
    
    .header-model-1 .main-nav-list > li > a:hover {
        color: var(--pj-blue);
    }
    
    .header-model-1 .main-nav-list > li > a:hover::after {
        width: 80%;
    }
    
    /* Dropdown do menu */
    .header-model-1 .main-nav-list .sub-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0;
        background: white;
        border: 1px solid #e0e0e0;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        min-width: 240px;
        padding: 8px 0;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(-15px);
        transition: all 0.3s ease;
        z-index: 5500;
        list-style: none !important;
        border-radius: 4px;
    }
    
    .header-model-1 .main-nav-list > li:hover > .sub-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0);
    }
    
    .header-model-1 .main-nav-list .sub-menu a {
        display: block;
        padding: 9px 20px;
        color: #555;
        text-decoration: none;
        font-weight: 500;
        font-size: 13px;
        text-transform: none;
        transition: all 0.2s ease;
    }
    
    .header-model-1 .main-nav-list .sub-menu a:hover {
        background: #f8f8f8;
        color: var(--pj-blue);
    }
}

/* ===================================================================
   HEADER DESKTOP 1 - MODO TABLET (769px-1024px)
   =================================================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    
    .header-model-1 .header-menu-section {
        display: none !important;
    }
    
    .header-model-1 .institutional-menu {
        gap: 16px;
    }
    
    .header-model-1 .institutional-menu a {
        font-size: 12px;
    }
    
    .header-model-1 .site-logo-large img {
        height: 90px;
        max-height: 90px;
    }
    
    .header-model-1 .header-logo-bar {
        padding: 20px 0;
    }
    
    .header-model-1 .menu-toggle-desktop-1,
    .header-model-1 .search-toggle-desktop-1 {
        padding: 10px 16px;
        font-size: 11px;
    }
}

/* ===================================================================
   HEADER DESKTOP 2 - SINGLE POST (>768px)
   =================================================================== */

@media (min-width: 769px) {
    
    .header-model-2 .header-institutional {
        background: #f5f5f5;
        color: #333;
        height: 40px;
        display: flex;
        align-items: center;
    }
    
    .header-model-2 .header-institutional .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .header-model-2 .institutional-menu {
        display: flex;
        gap: 24px;
        align-items: center;
        margin: 0;
    }
    
    .header-model-2 .institutional-menu a {
        color: #333;
        text-decoration: none;
        font-size: 12px;
        font-weight: 600;
        transition: all 0.2s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        position: relative;
    }
    
    .header-model-2 .institutional-menu a::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--pj-blue);
        transition: width 0.3s ease;
    }
    
    .header-model-2 .institutional-menu a:hover::after {
        width: 100%;
    }
    
    .header-model-2 .header-meta {
        display: flex;
        gap: 10px;
        align-items: center;
        margin-left: auto;
    }
    
    .header-model-2 .header-meta a {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0,0,0,0.06);
        color: #333;
        transition: all 0.3s ease;
    }
    
    .header-model-2 .header-meta a:hover {
        background: rgba(0,0,0,0.12);
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .header-model-2 .header-meta svg {
        width: 17px;
        height: 17px;
    }
    
    .header-model-2 .header-single-bar {
        display: flex;
        align-items: center;
        gap: 16px;
        height: 70px;
        padding: 0 20px;
    }
    
    .header-model-2 .menu-toggle-desktop-2 {
        display: flex;
        flex-direction: column;
        gap: var(--hamburger-gap);
        padding: 8px;
        cursor: pointer;
        color: inherit;
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
    }
    
    .header-model-2 .menu-toggle-desktop-2 .hamburger-icon {
        background: currentColor !important;
        background-color: currentColor !important;
    }
    
    .header-model-2 .site-logo-mini {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    .header-model-2 .site-logo-mini img {
        width: auto;
        height: 45px;
        max-height: 45px;
        object-fit: contain;
    }
    
    .header-model-2 .category-name-header {
        flex: 1 1 auto;
        text-align: center;
        min-width: 0;
        max-width: calc(100% - 200px);
        padding: 0 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
    }
    
    .header-model-2 .category-name-header a {
        font-family: "Open Sans", sans-serif;
        font-size: 32px;
        font-weight: 300;
        color: inherit;
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: -0.03em;
        transition: opacity 0.2s;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        line-height: 1.3;
    }
    
    .header-model-2 .category-name-header a:hover {
        opacity: 0.85;
    }
    
    .header-model-2 .search-toggle-desktop-2 {
        padding: 8px;
        cursor: pointer;
        color: inherit;
        display: flex;
        align-items: center;
        transition: opacity 0.2s;
        flex-shrink: 0;
    }
    
    .header-model-2 .search-toggle-desktop-2:hover {
        opacity: 0.7;
    }
}

/* ===================================================================
   HEADERS MOBILE - PORTRAIT (<= 768px)
   =================================================================== */

@media (max-width: 768px) and (orientation: portrait) {
    
    html,
    body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
        max-width: 100vw;
    }
    
    body.pj-header-mobile-active {
        padding-top: var(--pj-header-h-portrait) !important;
    }
    
    /* Header Home Mobile */
    .header-mobile-home {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: var(--pj-header-h-portrait);
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 16px;
        background: var(--category-color, var(--pj-blue));
        z-index: 5001;
        gap: 12px;
    }
    
    /* Header Single Mobile */
    .header-mobile-single {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: var(--pj-header-h-portrait);
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 16px;
        background: var(--category-color, var(--pj-blue));
        z-index: 5001;
        gap: 12px;
    }
    
    @supports (padding: max(0px)) {
        .header-mobile-home,
        .header-mobile-single {
            padding-top: max(0px, env(safe-area-inset-top));
            padding-left: max(16px, env(safe-area-inset-left));
            padding-right: max(16px, env(safe-area-inset-right));
            height: calc(var(--pj-header-h-portrait) + env(safe-area-inset-top, 0px));
        }
    }
    
    /* Hambúrguer Mobile */
    .menu-toggle-mobile,
    .header-mobile-home .menu-toggle-mobile,
    .header-mobile-single .menu-toggle-mobile {
        display: flex !important;
        flex-direction: column !important;
        gap: var(--hamburger-gap) !important;
        padding: 8px !important;
        flex-shrink: 0 !important;
        width: 40px !important;
        height: 40px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .header-mobile-home .menu-toggle-mobile .hamburger-icon,
    .header-mobile-single .menu-toggle-mobile .hamburger-icon {
        background: currentColor !important;
        background-color: currentColor !important;
        width: var(--hamburger-width) !important;
        height: var(--hamburger-height) !important;
        display: block !important;
    }
    
    /* Logo Home Mobile */
    .site-logo-mobile {
        flex-shrink: 0;
        flex-grow: 0;
        flex-basis: auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .site-logo-mobile img {
        height: var(--pj-logo-h-portrait);
        width: auto;
        max-width: 140px;
        display: block;
        object-fit: contain;
    }
    
    /* Logo Single Mobile */
    .site-logo-mini-mobile {
        flex-shrink: 0;
        flex-grow: 0;
        flex-basis: auto;
        display: flex;
        align-items: center;
    }
    
    .site-logo-mini-mobile img {
        height: calc(var(--pj-logo-h-portrait) * 0.81);
        width: auto;
        max-width: 90px;
        display: block;
        object-fit: contain;
    }
    
    /* Categoria Mobile */
    .category-name-mobile {
        flex: 1;
        text-align: center;
        font-family: "Open Sans", sans-serif;
        font-weight: 300;
        font-size: 24px;
        letter-spacing: -0.03em;
        text-transform: uppercase;
        margin: 0 8px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: inherit;
        text-decoration: none;
        display: block;
        line-height: 1.2;
        min-width: 0;
    }
    
    /* Botão Busca Mobile */
    .search-toggle-mobile,
    .header-mobile-home .search-toggle-mobile,
    .header-mobile-single .search-toggle-mobile {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px !important;
        flex-shrink: 0 !important;
        width: 40px !important;
        height: 40px !important;
    }
    
    .search-toggle-mobile svg {
        width: 20px;
        height: 20px;
    }
}

/* ===================================================================
   HEADERS MOBILE - LANDSCAPE (<= 1024px)
   =================================================================== */

@media (orientation: landscape) and (max-width: 1024px) {
    
    body.pj-header-mobile-active {
        padding-top: var(--pj-header-h-landscape) !important;
    }
    
    .header-mobile-home,
    .header-mobile-single {
        height: var(--pj-header-h-landscape);
        padding: 0 10px;
        gap: 8px;
    }
    
    .menu-toggle-mobile,
    .header-mobile-home .menu-toggle-mobile,
    .header-mobile-single .menu-toggle-mobile {
        width: 36px !important;
        height: 36px !important;
        padding: 6px !important;
    }
    
    .site-logo-mobile img {
        height: var(--pj-logo-h-landscape);
        max-width: 80px;
    }
    
    .site-logo-mini-mobile img {
        height: calc(var(--pj-logo-h-landscape) * 0.86);
        max-width: 60px;
    }
    
    .category-name-mobile {
        font-size: 18px;
        margin: 0 4px;
    }
    
    .search-toggle-mobile,
    .header-mobile-home .search-toggle-mobile,
    .header-mobile-single .search-toggle-mobile {
        width: 36px !important;
        height: 36px !important;
        padding: 6px !important;
    }
}

/* ===================================================================
   MENU OFF-CANVAS COM DRILLDOWN - ESTILO G1
   =================================================================== */

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 6001;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.menu-offcanvas {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 85vw;
    max-width: 380px;
    background: #fff;
    transform: translateX(-105%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    z-index: 6002;
}

.menu-offcanvas.active {
    transform: translateX(0);
}

/* Painéis do Drilldown */
.menu-panel {
    position: absolute;
    inset: 0;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}

.menu-panel-main {
    transform: translateX(0);
    position: relative;
}

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

.menu-panel.slide-left {
    transform: translateX(-100%);
}

.menu-panel.slide-right {
    transform: translateX(100%);
}

/* CABEÇALHO DO PAINEL PRINCIPAL - AZUL POÇOS JÁ */
.menu-panel-main .menu-panel-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 16px;
    background: #003482;
    border-bottom: none;
    z-index: 10;
    flex-shrink: 0;
}

.menu-panel-main .menu-close,
.menu-panel-main .menu-close-desktop,
.menu-panel-main .menu-close-mobile {
    color: white !important;
    font-size: 32px !important;
    background: none !important;
    border: 0 !important;
    line-height: 1 !important;
    padding: 4px 8px !important;
    cursor: pointer !important;
}

/* CABEÇALHO DOS PAINÉIS SECUNDÁRIOS - AZUL POÇOS JÁ */
.menu-panel:not(.menu-panel-main) .menu-panel-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #003482;
    border-bottom: none;
    z-index: 10;
    flex-shrink: 0;
}

.menu-panel:not(.menu-panel-main) .menu-panel-header::before {
    content: '‹ Menu Poços Já';
    font-size: 14px;
    font-weight: 400;
    color: white;
}

/* ESCONDE O H3 E O BOTÃO VOLTAR VISUAL */
.menu-panel-title {
    display: none !important;
}

.menu-back {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 140px;
    background: transparent !important;
    border: none !important;
    color: transparent !important;
    font-size: 0 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 20;
}

/* BOTÃO FECHAR */
.menu-close,
.menu-close-desktop,
.menu-close-mobile {
    background: none !important;
    border: 0 !important;
    font-size: 28px !important;
    line-height: 1 !important;
    padding: 4px 8px !important;
    color: #666 !important;
    cursor: pointer !important;
    transition: color 0.2s ease !important;
}

.menu-close:hover,
.menu-close-desktop:hover,
.menu-close-mobile:hover {
    color: #000 !important;
}

.menu-panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

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

.menu-list > li {
    border-bottom: 1px solid #f2f2f2;
}

/* LINKS DAS CATEGORIAS E SUBCATEGORIAS - 15PX */
.menu-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    color: #222;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
}

.menu-list a:hover {
    background: #f8f8f8;
    color: var(--pj-blue);
}

/* SETA DE NAVEGAÇÃO - ALINHADA À DIREITA */
.menu-arrow {
    margin-left: auto;
    font-size: 20px;
    color: #999;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.menu-list a:hover .menu-arrow {
    color: var(--pj-blue);
    transform: translateX(4px);
}

/* TÍTULO DA CATEGORIA NO PAINEL SECUNDÁRIO */
.category-title-header {
    padding: 14px 16px;
    background: #f8f8f8;
    border-bottom: 1px solid #e5e5e5;
    font-size: 15px;
    font-weight: 700;
    color: #003482;
    text-transform: uppercase;
}

/* REDES SOCIAIS NO MENU MOBILE - GRID 2 COLUNAS */
.menu-social-mobile {
    margin-top: auto;
    padding: 20px 16px;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
}

.menu-social-mobile h4 {
    margin: 0 0 16px 0;
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
}

.menu-social-mobile-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.menu-social-mobile-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #e8e8e8;
    border-radius: 6px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.menu-social-mobile-links a:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

.menu-social-mobile-links a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ===================================================================
   DRILLDOWN - OCULTAÇÃO FORÇADA DE SUBCATEGORIAS NO PAINEL PRINCIPAL
   =================================================================== */

/* Garante que NENHUM submenu apareça no painel principal */
.menu-panel-main ul ul,
.menu-panel-main .sub-menu,
.menu-panel-main li ul,
.menu-panel-main .menu-list ul,
.menu-panel-main .menu-categories ul,
.menu-panel-main .menu-categories > li > ul,
.menu-panel-main .menu-list > li > ul,
.menu-offcanvas-desktop .menu-panel-main ul ul,
.menu-offcanvas-mobile .menu-panel-main ul ul {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    pointer-events: none !important;
}

/* Garante visibilidade APENAS nos painéis secundários */
.menu-panel:not(.menu-panel-main) .menu-list,
.menu-panel:not(.menu-panel-main) .menu-list > li,
.menu-panel:not(.menu-panel-main) ul,
.menu-panel:not(.menu-panel-main) .sub-menu {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    left: auto !important;
    pointer-events: auto !important;
    height: auto !important;
    max-height: none !important;
}

/* Remove qualquer estilo de lista aninhada no painel principal */
.menu-panel-main .menu-list > li > ul > li,
.menu-panel-main .menu-categories > li > ul > li {
    display: none !important;
}

/* ===================================================================
   BUSCA OVERLAY
   =================================================================== */

.search-overlay-mobile,
.search-overlay-desktop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 6500;
    box-sizing: border-box;
}

.search-overlay-mobile.active,
.search-overlay-desktop.active {
    display: flex;
}

.search-overlay-content {
    background: #fff;
    width: 100%;
    max-width: 460px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.4);
    box-sizing: border-box;
    margin: 0 auto;
}

.search-close,
.search-close-desktop,
.search-close-mobile {
    background: transparent !important;
    border: none !important;
    color: #666 !important;
    font-size: 32px !important;
    cursor: pointer !important;
    display: block !important;
    margin-left: auto !important;
    margin-bottom: 15px !important;
    padding: 0 !important;
    line-height: 1 !important;
    transition: all 0.2s ease !important;
}

.search-close:hover,
.search-close-desktop:hover,
.search-close-mobile:hover {
    color: #000 !important;
    transform: rotate(90deg) !important;
}

.search-overlay-content form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-sizing: border-box;
}

.search-overlay-content input[type="search"] {
    width: 100%;
    height: 50px;
    padding: 0 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin: 0;
}

.search-overlay-content input[type="search"]:focus {
    outline: none;
    border-color: var(--pj-blue);
    box-shadow: 0 0 0 3px rgba(0, 52, 130, 0.1);
}

.search-overlay-content button[type="submit"] {
    width: 100%;
    height: 50px;
    background: var(--pj-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin: 0;
}

.search-overlay-content button[type="submit"]:hover {
    background: #00509e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 52, 130, 0.3);
}

/* ===================================================================
   CONTRASTE AUTOMÁTICO
   =================================================================== */

.contrast-light {
    color: #333;
}

.contrast-dark {
    color: #fff;
}

/* ===================================================================
   BODY STATES
   =================================================================== */

body.menu-open,
body.search-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100vh;
}

@media (min-width: 769px) {
    body:not(.menu-open):not(.search-open) {
        overflow: auto !important;
        position: static !important;
    }
}

/* ===================================================================
   PERFORMANCE
   =================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/**
 * PATCH RESPONSIVO V2 - SEM CONFLITOS
 * Versão: 19.3 FINAL
 * 
 * Cole este código NO FINAL do seu header-styles.css
 * 
 * ✅ Breakpoints ajustados para evitar sobreposição
 * ✅ Especificidade controlada
 * ✅ Headers 1/2 separados de 3/4
 * ✅ Mobile landscape otimizado
 * ✅ Proteção anti-esticamento de logos
 */

/* ===================================================================
   IMPORTANTE: DESKTOP APENAS (min-width: 769px)
   Headers 1 e 2 só existem em desktop/tablet
   =================================================================== */

/* ===================================================================
   BREAKPOINT 1: DESKTOP PADRÃO (1024px - 1279px)
   =================================================================== */

@media (min-width: 1024px) and (max-width: 1279px) {
    
    /* HEADER 1 - Redução moderada */
    .header-model-1 .site-logo-large img {
        height: 100px !important;
        max-height: 100px !important;
    }
    
    .header-model-1 .header-logo-bar {
        padding: 24px 0 !important;
    }
    
    .header-model-1 .main-nav-list > li > a {
        font-size: 12px !important;
        padding: 10px 16px !important;
    }
    
    /* HEADER 2 - Redução moderada */
    .header-model-2 .category-name-header a {
        font-size: 28px !important;
    }
    
    .header-model-2 .site-logo-mini img {
        height: 42px !important;
        max-height: 42px !important;
    }
}

/* ===================================================================
   BREAKPOINT 2: TABLET LANDSCAPE (769px - 1023px)
   =================================================================== */

@media (min-width: 769px) and (max-width: 1023px) {
    
    /* HEADER 1 - Compactação forte */
    .header-model-1 .header-institutional {
        height: 36px !important;
    }
    
    .header-model-1 .institutional-menu a {
        font-size: 11px !important;
    }
    
    .header-model-1 .header-logo-bar {
        padding: 16px 0 !important;
    }
    
    .header-model-1 .site-logo-large img {
        height: 80px !important;
        max-height: 80px !important;
    }
    
    .header-model-1 .menu-toggle-desktop-1,
    .header-model-1 .search-toggle-desktop-1 {
        padding: 10px 16px !important;
        font-size: 11px !important;
    }
    
    .header-model-1 .menu-toggle-desktop-1 .hamburger-icon {
        width: 22px !important;
        background: #003482 !important;
    }
    
    /* HEADER 2 - Compactação forte */
    .header-model-2 .header-institutional {
        height: 36px !important;
    }
    
    .header-model-2 .institutional-menu a {
        font-size: 11px !important;
    }
    
    .header-model-2 .header-single-bar {
        height: 60px !important;
        padding: 0 16px !important;
        gap: 12px !important;
    }
    
    .header-model-2 .site-logo-mini img {
        height: 38px !important;
        max-height: 38px !important;
    }
    
    .header-model-2 .category-name-header {
        max-width: calc(100% - 180px) !important;
        padding: 0 12px !important;
    }
    
    .header-model-2 .category-name-header a {
        font-size: 24px !important;
    }
    
    .header-model-2 .menu-toggle-desktop-2 .hamburger-icon {
        width: 22px !important;
    }
}

/* ===================================================================
   MOBILE - MELHORIAS PARA HEADERS 3 E 4
   =================================================================== */

/* Portrait - Ajustes finos para telas pequenas */
@media (max-width: 768px) and (orientation: portrait) {
    
    /* Logo - Proteção adicional */
    .site-logo-mobile img,
    .site-logo-mini-mobile img {
        width: auto !important;
        max-width: none !important;
        object-fit: contain !important;
    }
    
    /* Categoria - Ajuste para iPhone SE/8 */
    @media (max-width: 414px) {
        .category-name-mobile {
            font-size: 20px !important;
        }
    }
    
    /* Categoria - Ajuste para iPhone SE 1st gen */
    @media (max-width: 375px) {
        .category-name-mobile {
            font-size: 18px !important;
        }
        
        .header-mobile-home,
        .header-mobile-single {
            gap: 6px !important;
        }
    }
    
    /* Categoria - Ajuste para telas muito pequenas */
    @media (max-width: 360px) {
        .category-name-mobile {
            font-size: 16px !important;
        }
        
        .site-logo-mobile img {
            max-width: 80px !important;
        }
        
        .site-logo-mini-mobile img {
            max-width: 60px !important;
        }
    }
}

/* Landscape - Melhorias para telas baixas */
@media (orientation: landscape) and (max-width: 1024px) {
    
    /* Logo - Proteção adicional */
    .site-logo-mobile img,
    .site-logo-mini-mobile img {
        width: auto !important;
        max-width: none !important;
        object-fit: contain !important;
    }
    
    /* Header 4 (Single) - Gap consistente */
    .header-mobile-single {
        gap: 4px !important;
    }
    
    /* Landscape com altura muito baixa (<500px) */
    @media (max-height: 500px) {
        :root {
            --pj-header-h-landscape: 48px;
            --pj-logo-h-landscape: 24px;
        }
        
        .header-mobile-home,
        .header-mobile-single {
            padding: 0 8px !important;
        }
        
        .category-name-mobile {
            font-size: 16px !important;
        }
        
        .hamburger-icon {
            width: 18px !important;
            height: 2px !important;
        }
        
        .search-toggle svg {
            width: 15px !important;
            height: 15px !important;
        }
    }
    
    /* iPhone X/11/12/13 landscape específico */
    @media (max-width: 896px) and (max-height: 414px) {
        .site-logo-mobile img {
            max-width: 50px !important;
        }
        
        .site-logo-mini-mobile img {
            max-width: 40px !important;
        }
        
        .category-name-mobile {
            font-size: 17px !important;
        }
    }
}

/* ===================================================================
   CORREÇÕES UNIVERSAIS - TODOS OS HEADERS
   =================================================================== */

/* Hambúrguer - Padronização sem conflito */
.menu-toggle .hamburger-icon,
.menu-toggle-desktop-1 .hamburger-icon,
.menu-toggle-desktop-2 .hamburger-icon {
    display: block !important;
    background: currentColor !important;
    border-radius: 2px !important;
    margin: 0 !important;
    transition: all 0.3s ease !important;
}

/* Headers 1 e 2 - Força cor azul no hambúrguer */
.header-model-1 .menu-toggle-desktop-1 .hamburger-icon {
    background: #003482 !important;
}

.header-model-2 .menu-toggle-desktop-2 {
    color: #003482 !important;
}

.header-model-2 .menu-toggle-desktop-2 .hamburger-icon {
    background: #003482 !important;
}

/* Proteção anti-esticamento de logos - TODOS os headers */
.site-logo img,
.site-logo-large img,
.site-logo-mini img,
.site-logo-mobile img,
.site-logo-mini-mobile img,
.header-model-1 .site-logo-large img,
.header-model-2 .site-logo-mini img {
    width: auto !important;
    max-width: none !important;
    object-fit: contain !important;
    display: block !important;
}

/* Categoria mobile - Proteção contra sobrescrita de tema */
.category-name-mobile,
a.category-name-mobile,
.header-mobile-single .category-name-mobile {
    display: block !important;
    text-decoration: none !important;
    color: inherit !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    font-family: "Open Sans", sans-serif !important;
    font-weight: 300 !important;
    text-transform: uppercase !important;
}

/* Header 2 - Truncagem de título de categoria */
.header-model-2 .category-name-header a {
    display: block !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}

/* Container - Padding lateral responsivo (não afeta body padding-top) */
@media (min-width: 769px) and (max-width: 1023px) {
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* ===================================================================
   SUAVIZAÇÃO DE TRANSIÇÕES
   =================================================================== */

/* Transições suaves em mudanças de layout */
.header-mobile-home,
.header-mobile-single,
.header-model-1 .header-logo-bar,
.header-model-2 .header-single-bar {
    transition: height 0.3s ease, padding 0.3s ease;
}

.site-logo img,
.site-logo-large img,
.site-logo-mini img,
.site-logo-mobile img,
.site-logo-mini-mobile img {
    transition: height 0.3s ease, max-width 0.3s ease;
}

.category-name-mobile,
.header-model-2 .category-name-header a {
    transition: font-size 0.3s ease;
}

/* ===================================================================
   ADMIN BAR - Compatibilidade WordPress
   =================================================================== */

@media (max-width: 768px) {
    .admin-bar .header-mobile-home,
    .admin-bar .header-mobile-single {
        top: 46px !important;
    }
    
    .admin-bar body.pj-header-mobile-active {
        padding-top: calc(var(--pj-header-h-portrait) + 46px + 8px) !important;
    }
}

@media (orientation: landscape) and (max-width: 1024px) {
    .admin-bar .header-mobile-home,
    .admin-bar .header-mobile-single {
        top: 46px !important;
    }
    
    .admin-bar body.pj-header-mobile-active {
        padding-top: calc(var(--pj-header-h-landscape) + 46px + 8px) !important;
    }
}

/* ===================================================================
   DEBUG - Remover após testes
   =================================================================== */

/* Descomente para visualizar breakpoints ativos
@media (min-width: 1280px) {
    body::before { content: "Desktop Large (1280px+)"; position: fixed; top: 0; left: 0; background: red; color: white; padding: 5px; z-index: 99999; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    body::before { content: "Desktop Standard (1024-1279px)"; position: fixed; top: 0; left: 0; background: orange; color: white; padding: 5px; z-index: 99999; }
}

@media (min-width: 769px) and (max-width: 1023px) {
    body::before { content: "Tablet Landscape (769-1023px)"; position: fixed; top: 0; left: 0; background: yellow; color: black; padding: 5px; z-index: 99999; }
}

@media (max-width: 768px) and (orientation: portrait) {
    body::before { content: "Mobile Portrait (≤768px)"; position: fixed; top: 0; left: 0; background: green; color: white; padding: 5px; z-index: 99999; }
}

@media (orientation: landscape) and (max-width: 1024px) {
    body::before { content: "Mobile Landscape (≤1024px)"; position: fixed; top: 0; left: 0; background: blue; color: white; padding: 5px; z-index: 99999; }
}
*/