/**
 * Header Styles - Poços Já
 * Versão: 19.4 - FIX categoria + landscape + menos conflito com JS
 *
 * Principais correções:
 * - Remove bug: font-size: 2px em landscape (causava truncagem errada)
 * - Categoria mobile: ellipsis como fallback, sem !important (permite JS medir)
 * - Mantém layout/estrutura original e patches existentes sem "briga" de prioridade
 */

/* ===================================================================
   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%;
    }
	
	/* ===================================================================
   FIX: Remove bullet points do menu institucional desktop
   Adicionar ao header-styles.css após linha ~170
   =================================================================== */

@media (min-width: 1025px) {
    .header-model-1 .institutional-menu,
    .header-model-2 .institutional-menu {
        list-style: none !important;
    }
    
    .header-model-1 .institutional-menu li,
    .header-model-2 .institutional-menu li {
        list-style: none !important;
        display: inline-block;
    }
}

    .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 - BASE (<= 1024px)
   =================================================================== */

@media (max-width: 1024px) {

    html, body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
        max-width: 100vw;
    }

    /* Header Home Mobile */
    .header-mobile-home {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        background: var(--category-color, var(--pj-blue));
        z-index: 5001;
    }

    /* Header Single Mobile */
    .header-mobile-single {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        background: var(--category-color, var(--pj-blue));
        z-index: 5001;
    }

    /* Logo Home Mobile */
    .site-logo-mobile {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Logo Single Mobile */
    .site-logo-mini-mobile {
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }

    /* Categoria Mobile (fallback) */
    .category-name-mobile {
        flex: 1 1 auto;
        min-width: 0;
        text-align: center;
        font-family: "Open Sans", sans-serif;
        font-weight: 300;
        letter-spacing: -0.03em;
        text-transform: uppercase;
        overflow: hidden;           /* fallback */
        text-overflow: ellipsis;    /* fallback */
        white-space: nowrap;        /* fallback */
        color: inherit;
        text-decoration: none;
        display: block;
        line-height: 1.2;
    }

    /* Botão Busca Mobile */
    .search-toggle-mobile {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px !important;
        flex-shrink: 0 !important;
    }

    .search-toggle-mobile svg {
        width: 20px;
        height: 20px;
    }
}

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

@media (max-width: 768px) and (orientation: portrait) {

    body.pj-header-mobile-active {
        padding-top: var(--pj-header-h-portrait) !important;
    }

    .header-mobile-home,
    .header-mobile-single {
        height: var(--pj-header-h-portrait);
        padding: 0 16px;
        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 {
        width: 40px !important;
        height: 40px !important;
        padding: 8px !important;
        gap: var(--hamburger-gap) !important;
    }

    .header-mobile-home .menu-toggle-mobile .hamburger-icon,
    .header-mobile-single .menu-toggle-mobile .hamburger-icon {
        background: currentColor !important;
        width: var(--hamburger-width) !important;
        height: var(--hamburger-height) !important;
        display: block !important;
    }

    .site-logo-mobile img {
        height: var(--pj-logo-h-portrait);
        width: auto;
        max-width: 140px;
        display: block;
        object-fit: contain;
    }

    .site-logo-mini-mobile img {
        height: calc(var(--pj-logo-h-portrait) * 0.81);
        width: auto;
        max-width: 90px;
        display: block;
        object-fit: contain;
    }

    .category-name-mobile {
        font-size: 24px;
        margin: 0 8px;
    }

    .search-toggle-mobile {
        width: 40px !important;
        height: 40px !important;
    }
}

/* ===================================================================
   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 {
        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;
    }

    /* ✅ FIX: NUNCA usar 2px aqui */
    .category-name-mobile {
        margin: 0 4px;
        font-size: clamp(14px, 3.2vw, 20px);
    }

    .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: '\2039  Menu Po\00e7os J\00e1';
    font-size: 14px;
    font-weight: 400;
    color: white;
}

.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;
}

.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;
}

.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);
}

.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);
}

.category-title-header {
    padding: 14px 16px;
    background: #f8f8f8;
    border-bottom: 1px solid #e5e5e5;
    font-size: 15px;
    font-weight: 700;
    color: #003482;
    text-transform: uppercase;
}

.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
   =================================================================== */

.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;
}

.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;
}

/* ===================================================================
   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;
    }
}

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

.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;
}

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

/* Hambúrguer model-2 - Contraste automático como a logo */
.header-model-2.contrast-dark .menu-toggle-desktop-2 { color: #fff !important; }
.header-model-2.contrast-light .menu-toggle-desktop-2 { color: #333 !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;
}

/* 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
   =================================================================== */

.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: 1024px) {
    .admin-bar .header-mobile-home,
    .admin-bar .header-mobile-single {
        top: 46px !important;
    }

    /* Portrait e landscape (mantém coerência com as variáveis) */
    @media (orientation: portrait) {
        .admin-bar body.pj-header-mobile-active {
            padding-top: calc(var(--pj-header-h-portrait) + 46px + 8px) !important;
        }
    }

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

/* ===================================================================
   AUTOHIDE HEADER MOBILE - Hide on scroll down, show on scroll up
   =================================================================== */

body.pj-header-mobile-active .header-mobile-home,
body.pj-header-mobile-active .header-mobile-single {
    transition: transform 0.25s ease;
}

body.pj-header-mobile-active.pj-header-hidden .header-mobile-home,
body.pj-header-mobile-active.pj-header-hidden .header-mobile-single {
    transform: translateY(-100%);
}
