/**
 * /assets/site-header.css v1.0
 * CSS compartido para el header del site + page-header de páginas de listado.
 * Fuente de verdad unificada (antes cada archivo tenía su copia y divergían).
 *
 * Variables que deben existir en el :root del archivo padre (o se usan fallbacks):
 *   --dark-blue, --dark, --border, --gray-dark, --gray, --primary, --accent
 */

/* ===================================================
   HEADER TOP — barra azul con fecha + Anuncie + Suscríbete
   =================================================== */
.header-top {
    background: var(--dark-blue, #1F4558);
    padding: 10px 0;
}
.header-top-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: white;
}
.header-top-inner > * {
    display: inline-flex;
    align-items: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}
.header-top-inner span,
.header-top-inner > span {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    color: #fff !important;
}
.header-top-inner a {
    color: white !important;
    text-decoration: none;
    line-height: 1 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}
.header-top-inner a.btn-subscribe,
.btn-subscribe {
    display: inline-flex !important;
    align-items: center;
    padding: 7px 16px !important;
    background: #fff !important;
    color: #1F4558 !important;
    border-radius: 4px;
    font-weight: 700 !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    text-transform: uppercase;
    text-decoration: none !important;
}
.btn-subscribe:hover {
    background: #FF6B35 !important;
    color: #fff !important;
}

/* ===================================================
   HEADER STICKY (logo + nav pegados al scroll)
   =================================================== */
.header-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-main {
    padding: 24px 0;
    text-align: center;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.logo {
    height: 82px;
    width: auto;
    margin: 0 auto;
}

/* ===================================================
   NAV PRINCIPAL
   =================================================== */
.nav {
    border-bottom: 1px solid var(--border, #e2e8f0);
    background: white;
}
.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 30px;
}
.nav-list {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
}
.nav-list li {
    position: relative;
}
.nav-list li:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--border, #e2e8f0);
    font-size: 14px;
}
.nav-list a {
    display: block;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-dark, #475569);
    border-bottom: 3px solid transparent;
    text-decoration: none;
}
.nav-list a:hover,
.nav-list a.active {
    color: var(--primary, #0085C3);
    border-bottom-color: var(--primary, #0085C3);
}

/* ===================================================
   HAMBURGER (oculto en desktop, visible en móvil)
   =================================================== */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 0;
    gap: 4px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--dark, #0f172a);
    border-radius: 2px;
    margin: 2px 0;
    transition: all 0.3s;
}

/* ===================================================
   MOBILE MENU (sidebar + overlay)
   Prefijo wh- para evitar colisiones con otras reglas de los archivos padre.
   =================================================== */
.wh-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.wh-mobile-overlay.active {
    display: block;
}
.wh-mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: left 0.3s;
    overflow-y: auto;
}
.wh-mobile-menu.active {
    left: 0;
}
.wh-mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid var(--border, #e2e8f0);
}
.wh-mobile-menu-title {
    font-size: 18px;
    font-weight: 700;
}
.wh-mobile-menu-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--gray, #64748b);
    cursor: pointer;
    line-height: 1;
}
.wh-mobile-menu-nav {
    display: flex;
    flex-direction: column;
}
.wh-mobile-menu-nav a {
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-dark, #475569);
    border-bottom: 1px solid var(--border, #e2e8f0);
    text-decoration: none;
}
.wh-mobile-menu-nav a.active {
    color: var(--primary, #0085C3);
    background: #f8fafc;
}

/* ===================================================
   PAGE HEADER — usado por seccion/clasificados/ediciones
   (identidad visual uniforme de los títulos de listado)
   =================================================== */
.page-header {
    padding: 40px 0 30px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 48px;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--dark, #0f172a);
    letter-spacing: -1px;
    margin: 0;
}
.page-subtitle {
    font-size: 16px;
    color: var(--gray, #64748b);
    margin: 8px 0 0;
}
.breadcrumb {
    padding: 16px 0;
    font-size: 14px;
    color: var(--gray, #64748b);
}
.breadcrumb a {
    color: var(--primary, #0085C3);
    text-decoration: none;
}

/* ===================================================
   RESPONSIVE — móvil (< 768px)
   =================================================== */
@media (max-width: 768px) {
    .header-top-inner {
        flex-direction: column;
        gap: 6px;
        padding: 0 16px;
        text-align: center;
    }
    .nav-inner {
        padding: 0 16px;
        display: flex;
        align-items: center;
    }
    .logo {
        height: 60px;
    }
    .nav-list {
        display: none;
    }
    .hamburger {
        display: flex;
        flex-direction: column;
        margin-right: auto;
    }
    .page-title {
        font-size: 36px;
    }
    .page-header {
        padding: 28px 0 20px;
    }
}
