/*
Theme Name: AE503
Theme URI: https://ae503.com
Author: Guachipro
Description: Tema editorial personalizado para Periódico Digital AE503.
Version: 0.8.2
Text Domain: ae503
*/

:root {
 --ae-azul:#001B2A;
 --ae-rojo:#D32F2F;
 --ae-gris:#6B7280;
 --ae-gris-claro:#E5E7EB;
 --ae-blanco:#FFFFFF;
 --ae-ancho-maximo:1240px;
 --ae-fuente:Arial,Helvetica,sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{overflow-x:hidden}
body{margin:0;padding:0;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;background:var(--ae-blanco);color:var(--ae-azul);font-family:var(--ae-fuente);line-height:1.6}
img{max-width:100%;height:auto}
a{color:inherit;text-decoration:none}
a:hover{color:var(--ae-rojo)}
.ae503-saltar-contenido{position:absolute;left:-9999px;z-index:99999}
.ae503-saltar-contenido:focus{left:16px;top:16px;padding:12px;background:var(--ae-azul);color:#fff}
.ae503-solo-lector{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.ae503-contenido{width:100%;max-width:var(--ae-ancho-maximo);margin:0 auto;padding:40px 20px;min-height:400px;flex:1 0 auto}
.ae503-contenido h1{font-size:32px;line-height:1.2;color:var(--ae-azul)}
.ae503-pie-pagina{background:var(--ae-azul);color:#fff;flex-shrink:0}
.ae503-footer-contenedor{width:100%;max-width:var(--ae-ancho-maximo);margin:0 auto;padding:30px 20px;text-align:center;font-size:13px}
.ae503-cabecera-completa{width:100%;position:relative;z-index:20;flex-shrink:0}
.ae503-desktop-shell{display:block}
.ae503-mobile-shell{display:none}
.ae503-barra-interior,.ae503-cabecera-contenedor,.ae503-menu-interior,.ae503-banner-horizontal-interior{width:100%;max-width:var(--ae-ancho-maximo);padding-left:20px;padding-right:20px;margin-left:auto;margin-right:auto}
.ae503-submenu{background:#f0f2f5;color:#263748;font-size:12px;border-bottom:1px solid #dce1e7}
.ae503-submenu .ae503-barra-interior{display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:36px}
.ae503-fecha-derecha .ae503-fecha-texto{order:2}
.ae503-fecha-derecha .ae503-botones-apoyo{order:1}
.ae503-fecha-centro .ae503-barra-interior{justify-content:center}
.ae503-botones-apoyo{display:flex;align-items:center;flex-wrap:wrap;gap:15px}
.ae503-botones-apoyo a{display:inline-flex;gap:6px;align-items:center;font-weight:600}
.ae503-botones-apoyo a:hover{color:var(--ae-rojo)}
.ae503-botones-apoyo .ae-icono-red{width:19px;height:19px}
.ae503-cabecera{background:#fff;border-bottom:1px solid var(--ae-gris-claro)}
.ae503-cabecera-contenedor{display:flex;align-items:center;gap:24px;padding-top:18px;padding-bottom:18px;min-height:110px;justify-content:flex-start}
.ae503-logo-enlace{display:inline-flex;align-items:center;flex:0 0 auto;max-width:25%}
.ae503-logo{display:block;width:260px;max-width:100%;height:auto}
.ae503-cabecera-anuncio{flex:1 1 auto;min-width:0;max-width:75%;text-align:center}
.ae503-cabecera-anuncio > a,.ae503-cabecera-anuncio > img{display:block;width:100%}
.ae503-cabecera-anuncio img{display:block;max-width:100%;max-height:125px;width:auto;height:auto;object-fit:contain;margin:auto}
.ae503-distribucion-derecha .ae503-cabecera-contenedor{justify-content:flex-end}
.ae503-distribucion-derecha .ae503-logo-enlace{order:2}
.ae503-distribucion-derecha .ae503-cabecera-anuncio{order:1}
.ae503-distribucion-izquierda .ae503-cabecera-contenedor{justify-content:flex-start}
.ae503-distribucion-centro .ae503-cabecera-contenedor,.ae503-distribucion-centro_banner .ae503-cabecera-contenedor{justify-content:center}
.ae503-distribucion-izquierda.ae503-con-anuncio .ae503-cabecera-contenedor,.ae503-distribucion-derecha.ae503-con-anuncio .ae503-cabecera-contenedor{justify-content:space-between}
.ae503-solo-publicidad .ae503-cabecera-contenedor{justify-content:center!important;min-height:0;padding-top:14px;padding-bottom:14px}
.ae503-solo-publicidad .ae503-cabecera-anuncio{flex:0 1 75%;width:75%;max-width:75%;margin:auto}
.ae503-banner-horizontal{padding:12px 0}
.ae503-banner-horizontal-interior{width:100%;text-align:center}
.ae503-banner-horizontal-interior > a,.ae503-banner-horizontal-interior > img{display:block;width:100%}
.ae503-banner-horizontal-interior img{display:block;max-width:100%;width:100%;height:auto;object-fit:contain;margin:auto}
.ae503-anuncio-vacio{display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;box-sizing:border-box;min-height:90px;width:100%;padding:12px;border:1px dashed #9aabb9;background:#f1f4f7;color:#455b6e;text-align:center}
.ae503-anuncio-vacio span{font-size:12px;font-weight:800;letter-spacing:.06em}
.ae503-anuncio-vacio small{font-size:11px}
.ae503-menu-principal{background:var(--ae-azul);color:#fff}
.ae503-menu-interior{display:flex;min-height:54px;align-items:center;justify-content:space-between;gap:20px}
.ae503-menu-logo{display:inline-flex;align-items:center;width:145px;flex:none}
.ae503-menu-logo img{display:block;width:100%;height:auto}
.ae503-menu-enlaces{display:flex;align-items:center;gap:24px;flex:1;flex-wrap:wrap}
.ae503-menu-enlaces a{color:#fff;text-transform:uppercase;font-weight:700;font-size:12px;letter-spacing:.02em;padding:18px 0}
.ae503-menu-enlaces a:hover{color:#ff8285}
.ae503-buscar-escritorio{flex:none}
.ae503-buscar-escritorio form{display:flex;align-items:center;gap:5px;margin:0}
.ae503-buscar-escritorio input[type="search"]{width:130px;max-width:100%;padding:8px 9px;border:1px solid #738596;border-radius:3px;color:#001b2a;background:#fff}
.ae503-menu-principal input[type="submit"]{border:0;border-radius:3px;color:#fff;background:var(--ae-rojo);padding:8px 10px;cursor:pointer}
.ae503-menu-movil{display:none}
.ae503-cabecera-completa a:focus-visible,.ae503-cabecera-completa button:focus-visible,.ae503-cabecera-completa input:focus-visible{outline:3px solid var(--ae-rojo);outline-offset:3px}
@media(max-width:1100px) and (min-width:1025px){.ae503-menu-enlaces{gap:11px}.ae503-buscar-escritorio input[type="search"]{width:105px}}
@media(max-width:767px){.ae503-contenido{padding:25px 15px}.ae503-contenido h1{font-size:25px}.ae503-footer-contenedor{padding:25px 15px}}

/* ======================================================
 AE503 v0.8.1 - CABECERA MOVIL PROPIA
 Es independiente de las posiciones de escritorio.
====================================================== */
.ae503-mobile-shell { display:none; }
.ae503-mobile-drawer-layer[hidden], .ae503-mobile-search[hidden] { display:none !important; }
@media (max-width:1024px) {
    .ae503-cabecera-completa .ae503-desktop-shell { display:none !important; }
    .ae503-mobile-shell { display:block; background:#fff; position:relative; z-index:25; }
    .ae503-mobile-ad { padding:8px 12px; background:#f7f8fa; border-bottom:1px solid #e5e7eb; }
    .ae503-mobile-ad-inner { display:flex; align-items:center; justify-content:center; margin:0 auto; }
    .ae503-mobile-ad-inner.ae503-mobile-ad-threequarters { width:75%; max-width:930px; }
    .ae503-mobile-ad-inner.ae503-mobile-ad-full { width:100%; }
    .ae503-mobile-ad-inner a, .ae503-mobile-ad-inner img { display:block; max-width:100%; margin:0 auto; }
    .ae503-mobile-ad-inner img { width:auto; height:auto; max-height:110px; object-fit:contain; }
    .ae503-mobile-topbar {
        width:100%; min-height:64px; padding:6px 12px;
        display:grid; grid-template-columns:46px minmax(0,1fr) 46px; align-items:center;
        background:#fff; border-bottom:1px solid #e5e7eb;
    }
    .ae503-mobile-icon-button {
        width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center;
        appearance:none; border:0; background:transparent; color:#001b2a;
        cursor:pointer; border-radius:5px; padding:8px;
    }
    .ae503-mobile-icon-button:hover, .ae503-mobile-icon-button:focus-visible { background:#edf0f3; }
    /* Fecha y logotipo comparten la barra movil original de 64px. */
    .ae503-mobile-brand { display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:0; gap:0; }
    .ae503-mobile-date { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; line-height:12px; font-weight:600; color:#6B7280; text-align:center; }
    .ae503-mobile-brand img { display:block; width:min(112px,82%); height:auto; max-height:38px; object-fit:contain; }
    .ae503-mobile-search { background:#f3f5f7; padding:9px 12px; }
    .ae503-mobile-search form { display:flex; gap:7px; align-items:center; margin:0 auto; max-width:620px; }
    .ae503-mobile-search input[type=search] { flex:1; min-width:0; height:42px; border:1px solid #b8c5cf; padding:0 12px; border-radius:5px; font:inherit; background:#fff; }
    .ae503-mobile-search button { height:42px; background:#d32f2f; color:white; border:0; border-radius:5px; padding:0 13px; font-weight:700; }
    .ae503-mobile-sections { width:100%; background:#001b2a; border-bottom:3px solid #d32f2f; }
    .ae503-mobile-sections-track {
        display:flex; gap:0; align-items:center; overflow-x:auto; overscroll-behavior-x:contain;
        scrollbar-width:none; -webkit-overflow-scrolling:touch; scroll-snap-type:x proximity;
        padding:0 7px;
    }
    .ae503-mobile-sections-track::-webkit-scrollbar { display:none; }
    .ae503-mobile-section-link {
        display:inline-flex; flex:0 0 auto; align-items:center; min-height:43px;
        padding:0 14px; white-space:nowrap; color:#fff !important; font-weight:700;
        text-decoration:none; font-size:12px; text-transform:uppercase; letter-spacing:.02em;
        scroll-snap-align:start;
    }
    .ae503-mobile-section-link.is-current { box-shadow:inset 0 -3px 0 #fff; }
    .ae503-mobile-section-link:focus-visible, .ae503-mobile-icon-button:focus-visible { outline:3px solid #d32f2f; outline-offset:2px; }
    .ae503-mobile-drawer-layer:not([hidden]) { position:fixed; inset:0; display:flex; justify-content:flex-end; z-index:999999; }
    .ae503-mobile-drawer-backdrop { position:absolute; inset:0; width:100%; border:0; background:rgba(0,10,20,.57); padding:0; cursor:pointer; }
    .ae503-mobile-drawer {
        position:relative; width:min(86vw,390px); height:100%; max-height:100dvh; margin-left:auto;
        overflow-y:auto; overscroll-behavior:contain; background:#001b2a; color:#fff;
        box-shadow:-10px 0 32px #0003;
    }
    .ae503-mobile-drawer-head { display:flex; align-items:center; justify-content:space-between; min-height:70px; padding:10px 18px; font-size:18px; font-weight:900; letter-spacing:.04em; border-bottom:1px solid #ffffff33; }
    .ae503-mobile-drawer-close { color:#fff; }
    .ae503-mobile-drawer-close:hover, .ae503-mobile-drawer-close:focus-visible { background:#ffffff22; }
    .ae503-mobile-drawer-social { display:flex; justify-content:space-evenly; flex-wrap:wrap; gap:8px; padding:17px 11px; border-bottom:1px solid #ffffff33; }
    .ae503-mobile-drawer-social a { color:#fff; display:flex; align-items:center; justify-content:center; width:44px; height:44px; border:1px solid #ffffff55; border-radius:7px; }
    .ae503-mobile-drawer-social a:hover { background:#d32f2f; }
    .ae503-mobile-drawer-social .ae-icono-red { width:23px; height:23px; }
    .ae503-mobile-drawer-content h2 { font-size:12px; color:#d0dde6; letter-spacing:.1em; text-transform:uppercase; margin:22px 20px 8px; }
    .ae503-mobile-drawer-links { display:flex; flex-direction:column; }
    .ae503-mobile-drawer-links a { display:block; padding:15px 20px; color:white; border-bottom:1px solid #ffffff28; font-size:15px; text-decoration:none; font-weight:600; }
    .ae503-mobile-drawer-links a:focus-visible, .ae503-mobile-drawer-links a:hover { background:#d32f2f; color:white; }
    body.ae503-drawer-abierto { overflow:hidden !important; }
}
@media (max-width:380px) {
    .ae503-mobile-topbar { padding:5px 8px; grid-template-columns:42px minmax(0,1fr) 42px; }
    .ae503-mobile-icon-button { width:42px; height:42px; }
    .ae503-mobile-brand img { width:min(106px,90%); }
    .ae503-mobile-section-link { padding:0 11px; font-size:11px; }
}
@media (prefers-reduced-motion: reduce) {
    .ae503-mobile-sections-track { scroll-behavior:auto; }
}

/* Reservas publicitarias visibles tambien sin anuncio cargado */
@media(max-width:1024px){
 .ae503-mobile-ad .ae503-anuncio-vacio{min-height:65px;padding:8px 6px}
 .ae503-mobile-ad .ae503-anuncio-vacio span{font-size:10px}
 .ae503-mobile-ad .ae503-anuncio-vacio small{font-size:10px}
}