/* Stereo Trotamundos - Hoja de estilos del sitio publico
   Rediseno alineado al logotipo: azul-noche + acento dorado. */
:root {
    --brand: #1e3a5f;
    --brand-dark: #0c1421;
    --brand-deep: #17263b;
    --accent: #f4bd55;
    --accent-ink: #21313d;
    --ink: #1f2933;
    --muted: #6b7785;
    --bg: #f4f6f9;
    --card: #ffffff;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(16, 42, 67, 0.08);
    --maxw: 1180px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink); background: var(--bg); line-height: 1.6;
}
h1, h2, h3, .brand-name { font-family: 'Poppins', sans-serif; line-height: 1.2; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); font-size: .9rem; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 10px; top: 10px; background: #fff; padding: 8px; z-index: 999; }

/* ===== Barra superior con reproductor persistente ===== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--brand-dark);
    box-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
.topbar { background: linear-gradient(180deg, #101827 0%, #0c1421 100%); border-bottom: 1px solid rgba(255,255,255,.06); }
.topbar-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }

.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand-logo { height: 42px; width: auto; display: block; }
.brand-name { font-size: 1.15rem; }

/* Menu en linea: vive dentro de la topbar, entre el logotipo y el player.
   Reutiliza .nav-inner (mismo markup) pero sin barra propia. */
.nav-bar.nav-inline {
    display: block;
    background: transparent;
    border: 0;
    flex: 0 1 auto;
    min-width: 0;
}
.nav-bar.nav-inline .nav-inner {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 18px;
    min-height: 0;
    /* OJO: sin overflow:hidden. El panel del submenu es position:absolute
       y este contenedor lo recortaria a la altura de la barra. */
    overflow: visible;
}
.nav-bar.nav-inline .nav-inner a {
    padding: 6px 0;
    font-size: .84rem;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

/* ===== Submenu "Medios" (Videos / Podcasts) =====
   Mismo markup en escritorio y movil (app/views/partials/nav.php).

   Requisito de diseno: el disparador debe VERSE como un enlace de texto
   mas, no como un control de formulario. Por eso es un <button> al que se
   le anulan por completo fondo, borde y radio nativos, y hereda la
   tipografia de los demas enlaces del menu. */
.nav-group {
    position: relative;
    display: flex;
    align-items: center;
    /* Sin esto el panel se recortaria contra la barra. */
    overflow: visible;
}
.nav-group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
    margin: 0;
    /* Reset explicito: anula la apariencia nativa de <button> en todos
       los navegadores (fondo gris, borde, sombra, radio). */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    background-color: transparent;
    background-image: none;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    /* Tipografia identica a .nav-inner a */
    color: #cfd8e3;
    font-family: inherit;
    font-size: .84rem;
    font-weight: 500;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
    cursor: pointer;
}
.nav-group-toggle:hover { color: #fff; }
.nav-group-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}
.nav-group.is-active > .nav-group-toggle,
.nav-group.is-open > .nav-group-toggle {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.nav-caret {
    display: inline-block;
    font-size: .55rem;
    line-height: 1;
    transition: transform .18s ease;
}
.nav-group.is-open .nav-caret { transform: rotate(180deg); }

/* Panel desplegable (solo escritorio).
   display:none por defecto; .is-open lo muestra. */
.nav-sub {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 176px;
    padding: 6px;
    margin: 0;
    background: var(--brand-deep);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0,0,0,.45);
    z-index: 200;
}
.nav-group.is-open .nav-sub { display: block; }

/* Cada opcion es un bloque independiente, con su propio padding y
   separacion. Sin esto heredaban la regla generica de .nav-inner a
   (padding 6px 0, sin display:block) y quedaban "videoPodcast" pegados. */
.nav-sub a {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin: 0;
    border-radius: 7px;
    border-bottom: 0;
    color: #cfd8e3;
    font-size: .82rem;
    font-weight: 500;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
    text-decoration: none;
}
.nav-sub a + a { margin-top: 2px; }
.nav-sub a:hover,
.nav-sub a:focus-visible {
    background: rgba(255,255,255,.09);
    color: #fff;
    outline: none;
}
.nav-sub a.is-active {
    color: var(--accent);
    background: rgba(244,189,85,.12);
}

/* La version movil baja a su propia barra: oculta en escritorio. */
.nav-bar.nav-mobile { display: none; }
/* Reproductor en vivo (compacto: sin bloque "EN VIVO" a la izquierda) */
.live-player {
    display: flex; align-items: center;
    gap: 0;                 /* sin hueco: el iframe ya mide exactamente su area util */
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    padding: 2px 4px 2px 2px;  /* el sobrante lo aporta el padding, no el gap */
    margin-left: auto;
}
.live-dot {
    width: 9px; height: 9px; border-radius: 50%; background: #ff4d4d;
    box-shadow: 0 0 0 0 rgba(255,77,77,.7); animation: livePulse 1.6s infinite;
}
@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(255,77,77,.7); }
    70% { box-shadow: 0 0 0 8px rgba(255,77,77,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); }
}
.live-label { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 2px; }
/* El iframe mide EXACTAMENTE el area util del reproductor:
   play 40 + gap 10 + volumen 160 = 210px  (== --player-w).
   Antes eran 300px: los 90px restantes eran aire muerto DENTRO del iframe,
   que se veia como un espacio vacio entre la barra de volumen y el boton
   de desacople. Un iframe no puede "recortar" su viewport, asi que la
   unica forma de eliminar ese hueco es dimensionarlo al contenido real. */
.live-frame {
    border: 0;
    overflow: hidden;
    background: transparent;
    display: block;
    width: var(--player-w);
    height: var(--player-h);
    flex: 0 0 auto;
}

/* Boton de desacople: abre el reproductor en ventana flotante para que el
   audio sobreviva a la navegacion. Area tactil >= 28px. */
.live-popout {
    display: grid; place-items: center;
    width: 28px; height: 28px; padding: 0;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    color: var(--accent);
    font-size: 15px; line-height: 1;
    cursor: pointer;
    transition: background .18s, border-color .18s, color .18s;
}
.live-popout:hover,
.live-popout:focus-visible {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
    outline: none;
}
.live-popout.is-open {
    background: rgba(244,189,85,.16);
    border-color: rgba(244,189,85,.55);
    color: var(--accent);
}

.btn-admin {
    background: var(--accent); color: var(--accent-ink); padding: 9px 18px; border-radius: 8px;
    font-weight: 700; font-size: .85rem; flex: 0 0 auto;
}
.btn-admin:hover { filter: brightness(1.06); }
.nav-toggle { display: none; background: transparent; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }

/* Barra de navegacion */
.nav-bar { background: var(--brand-deep); border-top: 1px solid rgba(255,255,255,.05); }
.nav-inner { display: flex; gap: 26px; align-items: center; min-height: 48px; flex-wrap: wrap; }
.nav-inner a {
    color: #cfd8e3; font-weight: 500; font-size: .92rem; text-transform: uppercase;
    letter-spacing: .4px; padding: 12px 0; border-bottom: 2px solid transparent;
}
.nav-inner a:hover { color: #fff; }
.nav-inner a.is-active { color: var(--accent); border-bottom-color: var(--accent); }
/* Hero */
.hero { position: relative; }
.hero-static {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
}
.hero-static-inner { padding: 90px 20px; text-align: center; }
.hero-static h1 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 16px; }
.hero-static p { font-size: 1.1rem; opacity: .92; max-width: 640px; margin: 0 auto 28px; }
.btn-hero {
    background: var(--accent); color: #21313d; padding: 13px 30px; border-radius: 10px;
    font-weight: 700; display: inline-block;
}
.btn-hero:hover { filter: brightness(1.05); }

.slides { position: relative; height: 460px; overflow: hidden; }
.slide {
    position: absolute; inset: 0; opacity: 0; transition: opacity .8s;
    background-size: cover; background-position: center; display: flex; align-items: flex-end;
}
.slide.active { opacity: 1; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.slide-content { position: relative; z-index: 2; color: #fff; padding-bottom: 48px; }
.slide-content h1 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); margin-bottom: 12px; }

/* Sections */
.section { padding: 56px 0; }
.section-alt { background: #fff; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.section-head h2 { font-size: 1.6rem; color: var(--brand-dark); }
.btn-link { color: var(--brand); font-weight: 600; }

/* Featured */
.featured-card {
    display: grid; grid-template-columns: 1.2fr 1fr; background: #fff;
    border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.featured-media img, .featured-media .img-placeholder { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.featured-body { padding: 40px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.featured-body h2 { font-size: 1.8rem; color: var(--brand-dark); }

/* ===== Portada 70/30: articulo destacado + ultimo podcast =====
   El espacio del articulo principal se divide en dos columnas:
     70% -> articulo (featured-card)
     30% -> ultimo episodio de podcast (last-podcast)
   Si no hay podcasts publicados, la clase .featured-split-1 desactiva la
   rejilla y el articulo recupera el 100%. */
.featured-split {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    gap: 26px;
    align-items: stretch;
}
.featured-split-1 { grid-template-columns: minmax(0, 1fr); }

/* Dentro del split el articulo dispone de menos ancho: se apila
   (imagen arriba, texto abajo) para que el titular no se parta en
   tiras de dos palabras. */
.featured-split .featured-card { grid-template-columns: 1fr; height: 100%; }
.featured-split .featured-media img,
.featured-split .featured-media .img-placeholder { min-height: 240px; max-height: 300px; }
.featured-split .featured-body { padding: 24px 28px; gap: 12px; }
.featured-split .featured-body h2 { font-size: 1.45rem; }

/* Tarjeta del ultimo podcast */
.last-podcast {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    min-width: 0;
    background: var(--brand-deep);
    color: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.podcast-tag {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
}
.last-podcast-cover img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
}
.last-podcast-cover .img-placeholder { border-radius: 10px; }
.last-podcast h3 { font-size: 1.02rem; line-height: 1.35; }
.last-podcast h3 a { color: #fff; }
.last-podcast h3 a:hover { color: var(--accent); }
.btn-podcast {
    margin-top: auto;
    display: inline-block;
    padding: 10px 16px;
    border-radius: 9px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    font-size: .86rem;
    text-align: center;
}
.btn-podcast:hover { filter: brightness(1.06); }
.chip {
    display: inline-block; color: #fff; padding: 4px 12px; border-radius: 20px;
    font-size: .78rem; font-weight: 600; width: fit-content; text-transform: uppercase;
    letter-spacing: .4px;
}
.chip.small { font-size: .7rem; padding: 3px 10px; }
/* Variante para colores claros (ej. dorado de marca): texto oscuro por contraste. */
.chip--light { color: #21313d; }
.img-placeholder {
    display: grid; place-items: center; background: linear-gradient(135deg, #e3edf3, #cfe0ea);
    color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
.img-placeholder.small { min-height: 180px; font-size: .8rem; }

/* Cards grid */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s; }
.card:hover { transform: translateY(-4px); }
.card-media img, .card-media .img-placeholder { height: 190px; width: 100%; object-fit: cover; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-size: 1.1rem; }
.card-body h3 a { color: var(--ink); }
.card-body h3 a:hover { color: var(--brand); }
.card-body time { font-size: .82rem; color: var(--muted); margin-top: auto; }

/* Videos */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.video-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-frame { position: relative; aspect-ratio: 16/9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame img { width: 100%; height: 100%; object-fit: cover; }
.video-card h3 { padding: 16px 16px 4px; font-size: 1rem; }
.video-card .muted { padding: 0 16px 16px; display: block; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.filter { padding: 8px 16px; border-radius: 20px; background: #fff; border: 1px solid #dde6ec; font-size: .9rem; color: var(--ink); }
.filter.active, .filter:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Sponsors */.sponsors-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: center; }
.sponsor {
    flex: 0 0 auto; padding: 18px 26px; background: #fff; border-radius: 12px;
    box-shadow: var(--shadow); min-width: 140px; text-align: center;
    filter: grayscale(100%); opacity: .8; transition: all .2s;
}
.sponsor:hover { filter: none; opacity: 1; }
.sponsor img { max-height: 60px; margin: 0 auto; }

/* ===== Podcasts (listado y detalle) ===== */
.podcast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 26px;
}
.podcast-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.podcast-cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.podcast-cover .img-placeholder { min-height: 170px; }
.podcast-body {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 18px 18px 20px;
    flex: 1;
}
.podcast-body h2 { font-size: 1.05rem; line-height: 1.35; }
.podcast-body h2 a { color: var(--ink); }
.podcast-body h2 a:hover { color: var(--brand); }
.podcast-body p { font-size: .9rem; color: var(--muted); }
.podcast-ep {
    display: inline-block;
    color: var(--brand);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
}
.podcast-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: .82rem;
    color: var(--muted);
}
/* Reproductor del listado: discreto, sin dominar la tarjeta. */
.podcast-audio {
    width: 100%;
    height: 34px;
    margin-top: auto;
    border-radius: 8px;
}
/* Detalle del episodio */
.podcast-detail {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}
.podcast-detail-cover img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
}
.podcast-detail-body { min-width: 0; }
.podcast-player {
    width: 100%;
    margin: 18px 0;
    border-radius: 10px;
}
/* En la tarjeta del ultimo podcast (fondo oscuro) el audio nativo
   necesita contraste suficiente. */
.last-podcast .podcast-audio { background: rgba(255,255,255,.92); }

@media (max-width: 900px) {
    .podcast-detail { grid-template-columns: 1fr; gap: 22px; }
    .podcast-detail-cover { max-width: 260px; }
}

/* Article page */
.article-page { padding: 40px 0 0; }
.article-container { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 48px; max-width: 860px; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 20px; }
.article-title { font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--brand-dark); margin: 14px 0; }
.article-meta { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
.article-hero { margin: 24px 0; border-radius: 12px; overflow: hidden; }
.article-hero figcaption { font-size: .82rem; color: var(--muted); padding: 8px 0; }
.article-body { font-size: 1.05rem; line-height: 1.8; }
.article-body p { margin-bottom: 1rem; }
.article-body h1, .article-body h2, .article-body h3 { margin: 1.4rem 0 .8rem; color: var(--brand-dark); }
.article-body img { border-radius: 10px; margin: 1rem 0; }
.article-body a { text-decoration: underline; }
.article-video { margin: 24px 0; }
.article-video iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 12px; }

/* Page head */
.page-head { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; padding: 56px 0; }
.page-head h1 { font-size: 2.2rem; }
.page-head .muted { color: rgba(255,255,255,.85); }
.page-head .btn-link { color: var(--accent); }

/* Footer */
.site-footer { background: var(--brand-dark); color: #cdd9e1; margin-top: 40px; padding-top: 48px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; padding-bottom: 32px; }
.footer-inner strong { color: #fff; font-size: 1.1rem; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: #cdd9e1; }
.footer-links a:hover { color: #fff; }
.footer-copy { border-top: 1px solid rgba(255,255,255,.12); padding: 10px; text-align: center; font-size: .82rem; color: #8fa4b3; }

/* ===== Credito de desarrollo (SELTEN) =====
   Va debajo de la linea de derechos reservados, en su propia banda.
   Colores tomados de la paleta del pie (fondo --brand-dark) para que no
   desentone; el enlace usa un dorado mas luminoso que el --accent base
   porque sobre azul-noche el contraste del acento puro es justo. */
.footer-credit {
    border-top: 0px solid rgba(255,255,255,.08);
    padding: 0px 20px 20px;
    text-align: center;
}
.footer-credit p {
    margin: 0;
    font-size: .8rem;
    line-height: 1.6;
    color: #8fa4b3;
}
.footer-credit a {
    color: red;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .18s, border-color .18s;
}
.footer-credit a:hover,
.footer-credit a:focus-visible {
    color: #ff3c00;
    border-bottom-color: currentColor;
    outline: none;
}
.footer-credit sup {
    font-size: .62em;
    line-height: 0;
    vertical-align: super;
    margin-left: 1px;
}


/* ===== Franja de clientes / patrocinadores ===== */
.clients-strip { background: #fff; border-bottom: 1px solid #e6ecf2; padding: 26px 0; }
.clients-title {
    text-align: center; font-size: .75rem; font-weight: 700; letter-spacing: 3px;
    text-transform: uppercase; color: var(--accent-ink); margin-bottom: 18px;
}
.clients-track {
    display: flex; align-items: center; justify-content: center;
    gap: 34px; flex-wrap: wrap;
}
.client-logo {
    flex: 0 0 auto; padding: 6px; filter: grayscale(100%); opacity: .65;
    transition: all .25s ease;
}
.client-logo img { max-height: 46px; width: auto; object-fit: contain; }
.client-logo:hover { filter: none; opacity: 1; transform: translateY(-2px); }
/* Footer brand */
.footer-brand img { height: 32px; width: auto; margin-bottom: 12px; }
.footer-brand p { max-width: 320px; font-size: .9rem; color: #9fb0c0; }

/* Responsive */
@media (max-width: 900px) {
    .topbar-inner { flex-wrap: wrap; min-height: auto; }
    .live-player { margin-left: 0; order: 3; width: 100%; justify-content: center; }
    .nav-toggle { display: block; margin-left: auto; }
    .btn-admin { order: 2; }

    /* En movil el menu regresa a su barra propia. */
    .nav-bar.nav-inline { display: none; }
    .nav-bar.nav-mobile { display: none; background: var(--brand-deep); border-top: 1px solid rgba(255,255,255,.05); }
    .nav-bar.nav-mobile.is-open { display: block; }
    .nav-bar.nav-mobile .nav-inner { flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 20px; }
    .nav-bar.nav-mobile .nav-inner a { width: 100%; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); }

    /* Submenu "Medios" en movil: se comporta igual que en escritorio
       (cerrado por defecto, se abre al pulsar). Antes estaba forzado a
       display:block y por eso se veia siempre abierto como una caja gris
       con los dos enlaces apilados debajo del disparador. */
    .nav-bar.nav-mobile .nav-group {
        display: block;
        width: 100%;
        position: static;
    }
    .nav-bar.nav-mobile .nav-group-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,.06);
        font-size: .92rem;
        /* Aqui SI debe ser pulsable: es el que abre el submenu. */
        pointer-events: auto;
        cursor: pointer;
    }
    .nav-bar.nav-mobile .nav-caret {
        display: inline-block;
        font-size: .7rem;
    }
    .nav-bar.nav-mobile .nav-sub {
        position: static;
        display: none;
        min-width: 0;
        width: 100%;
        padding: 0 0 0 16px;
        margin: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .nav-bar.nav-mobile .nav-group.is-open .nav-sub { display: block; }
    .nav-bar.nav-mobile .nav-sub a {
        padding: 11px 0;
        border-bottom: 1px solid rgba(255,255,255,.05);
        font-size: .85rem;
    }

    .featured-card { grid-template-columns: 1fr; }
    /* El 30% no cabe en movil: el podcast baja debajo del articulo. */
    .featured-split { grid-template-columns: 1fr; gap: 22px; }
    .featured-split .featured-media img,
    .featured-split .featured-media .img-placeholder { max-height: none; }
    .last-podcast-cover { max-width: 240px; }
    .article-container { padding: 28px; }
    .slides { height: 340px; }
}

/* Escritorio intermedio: el menu en linea necesita sitio, se comprime. */
@media (min-width: 901px) and (max-width: 1180px) {
    .topbar-inner { gap: 14px; }
    .nav-bar.nav-inline .nav-inner { gap: 12px; }
    .nav-bar.nav-inline .nav-inner a { font-size: .78rem; }
    .brand-logo { height: 38px; }
}
@media (max-width: 520px) {
    .live-frame { width: var(--player-w); }  /* el centrado interno es autonomo */
    .live-popout { width: 26px; height: 26px; font-size: 13px; }
    .brand-logo { height: 34px; }
}

/* =================================================================
   REPRODUCTOR EN VIVO (player.php) - diseno para barra superior
   -----------------------------------------------------------------
   Las reglas van DESPUES del skin blue.monday, cuyo tamanos base son
   para 182px de ancho. Aqui se rehace el control en 3 bloques:
     [ play ]  [  volumen  ]  <- alineados al tope del boton grande
             [ titulo ]       <- banda dorada centrada, esquinas redondas
   Ancla: .jp-interface (position:relative).
   ================================================================= */
/* Geometria del reproductor: unica fuente de verdad.
   --player-w = play (40) + gap (10) + volumen (160) = 210px de area util.
   El iframe se dimensiona con este mismo valor, de modo que NO queda aire
   muerto entre la barra de volumen y el boton de desacople. Si se amplia
   el volumen, solo hay que subir --player-vol y --player-bar a la par. */
:root {
    --player-w: 210px;
    --player-h: 44px;
    --player-play: 40px;
    --player-vol: 160px;
    --player-gap: 10px;
    --player-bar: 136px;
}

.jp-audio-stream {
    width: var(--player-w);
    height: var(--player-h);
    color: var(--accent);
    background: transparent;
    border: 0;
}

.jp-audio-stream .jp-interface {
    position: relative;
    width: var(--player-w);   /* ancla real: sin ancho, los hijos absolutos
                                 se calculan contra un bloque de 0px */
    height: var(--player-h);
    background: transparent;
    border: 0;
}


/* Cuando el skin aplica gris al boton de pausa (sin imagen), heredamos la
   textura exacta del boton de play activo. */
.jp-audio-stream.jp-state-playing .jp-pause {
    background: url("../vendor/jplayer/dist/skin/blue.monday/image/jplayer.blue.monday.png") 0 -42px no-repeat;
}

/* --- Bloque 1: boton grande play / pause --- */
.jp-audio-stream .jp-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--player-play);
}
.jp-audio-stream .jp-play,
.jp-audio-stream .jp-pause {
    width: var(--player-play);
    height: var(--player-play);
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    border-radius: 0;
    background-color: transparent;
}

/* --- Bloque 2: controles de volumen, al tope del boton grande --- */
.jp-audio-stream .jp-volume-controls {
    position: absolute;
    top: 0;
    left: calc(var(--player-play) + var(--player-gap));
    width: var(--player-vol);
    height: var(--player-h);
}
.jp-audio-stream .jp-volume-controls button.jp-mute {
    position: absolute;
    top: 0;
    left: 0;
    width: 19px;
    height: 16px;
    border: 0;
    cursor: pointer;
}
.jp-audio-stream .jp-volume-bar {
    position: absolute;
    top: 6px;
    left: 24px;
    width: var(--player-bar);
    height: 6px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, .18);
    background-image: none;
    overflow: hidden;
    cursor: pointer;
}
.jp-audio-stream .jp-volume-bar-value {
    height: 6px;
    background-image: none;
    background-color: var(--accent);
}

/* --- Bloque 3: banda de titulo (amarilla, centrada, redondeada) ---
   El punto "en vivo" va DENTRO de la banda: el nombre de la estacion y el
   punto quedan en una sola linea y se elimina el bloque "EN VIVO" de la
   izquierda del reproductor (mas espacio en la topbar). */
@keyframes livePulseGold {
    0%   { box-shadow: 0 0 0 0 rgba(232, 57, 44, .65); }
    70%  { box-shadow: 0 0 0 5px rgba(232, 57, 44, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 57, 44, 0); }
}
.jp-audio-stream .jp-details .jp-title::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 4px;
    border-radius: 50%;
    background: #e8392c;
    vertical-align: middle;
    animation: livePulseGold 1.6s infinite;
}
@media (prefers-reduced-motion: reduce) {
    .jp-audio-stream .jp-details .jp-title::before { animation: none; }
}

/* La banda de titulo NO puede ser absoluta contra el viewport del iframe:
   .jp-details es HERMANO de .jp-interface, no hijo, asi que su bloque
   contenedor es .jp-type-single (sin position -> viewport). Con el iframe
   a 44px de alto, un bottom:0 la sacaba del area y encima del boton play.
   Solucion: anclarla a .jp-interface mediante un contenedor posicionado
   explicito y acotar su ancho al area a la derecha del play. */
.jp-audio-stream .jp-type-single {
    position: relative;
    width: var(--player-w);
    height: var(--player-h);
}
.jp-audio-stream .jp-details {
    position: absolute;
    bottom: 0;
    /* empieza a la derecha del boton play y termina en el borde del area
       util: 40 (play) + 8 (respiro) = 48 ... 210 - 2 = 208 */
    left: calc(var(--player-play) + 8px);
    right: 2px;
    width: auto;          /* el ancho lo dan left y right, no un valor fijo */
    max-width: none;
    margin: 0;
    background: var(--accent);
    border: 0;
    border-radius: 7px;
    overflow: hidden;
}
.jp-audio-stream.jp-type-single .jp-details {
    border-top: 0;
}
.jp-audio-stream .jp-details .jp-title {
    margin: 0;
    padding: 0 6px;
    font-size: 9px;        /* cabe en 162px sin encimarse al play */
    font-weight: 700;
    line-height: 14px;
    letter-spacing: .2px;
    color: var(--accent-ink);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Enlaces de licencia / creditos de jPlayer: fuera de la barra. */
.jp-audio-stream .jp-details + a,
.jp-audio-stream .jp-interface a { display: none; }
/* =================================================================
   FORMULARIO DE CONTACTO
   -----------------------------------------------------------------
   Tres campos (nombre, correo, mensaje) + captcha.
   El honeypot se oculta de forma que un humano NUNCA lo vea, pero un
   bot que ignora el CSS si lo encuentre y lo rellene.
   ================================================================= */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}
.contact-form {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
}
.contact-form .field { margin-bottom: 20px; }
.contact-form label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    color: var(--brand-dark);
    margin-bottom: 6px;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d6e0e8;
    border-radius: 9px;
    font: inherit;
    font-size: .95rem;
    color: var(--ink);
    background: #fbfcfd;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, .12);
}
.contact-form textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
    border-color: #d64545;
    background: #fff8f8;
}
.field-hint { display: block; font-size: .78rem; color: var(--muted); margin-top: 5px; }
.field-error { display: block; font-size: .82rem; color: #c53030; font-weight: 600; margin-top: 5px; }

/* Honeypot: fuera de pantalla y sin foco. No se usa display:none porque
   algunos bots lo detectan; posicionarlo fuera es mas disimulado. */
.hp-field {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.form-alert {
    background: #fdecec;
    border: 1px solid #f5b5b5;
    border-left: 4px solid #d64545;
    color: #a12b2b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .9rem;
    margin-bottom: 20px;
}
/* Variante de exito: verde sobrio, misma estructura. */
.form-alert-ok {
    background: #eafaf0;
    border-color: #a8e0c0;
    border-left-color: #2f9e5f;
    color: #1d6b40;
}

/* Captcha aritmetico */
.field-captcha .captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-question {
    background: var(--brand-deep);
    color: var(--accent);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 1px;
    padding: 10px 16px;
    border-radius: 9px;
    white-space: nowrap;
    user-select: none;
    font-variant-numeric: tabular-nums;
}
.captcha-row input[type="text"] { max-width: 110px; text-align: center; }

.btn-submit {
    width: 100%;
    background: var(--brand);
    color: #fff;
    border: 0;
    padding: 13px 24px;
    border-radius: 9px;
    font: inherit;
    font-weight: 700;
    font-size: .95rem;
    cursor: pointer;
    transition: background .18s, transform .12s;
}
.btn-submit:hover { background: #17304f; }
.btn-submit:active { transform: translateY(1px); }
.btn-submit:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.contact-aside {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}
.contact-aside h2 { font-size: 1.15rem; color: var(--brand-dark); margin-bottom: 8px; }
.contact-list { list-style: none; margin-top: 20px; display: grid; gap: 16px; }
.contact-list strong { color: var(--brand); font-size: .82rem; text-transform: uppercase; letter-spacing: .6px; }

@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; gap: 26px; }
    .contact-form { padding: 22px; }
}
/* --- Paginacion (listados publicos) --- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 34px 0 10px;
}
.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #dde6ec;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: .9rem;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.pagination a.page-link:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.pagination .page-link.is-current {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    font-weight: 600;
    cursor: default;
}
.pagination .page-link.is-disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}
.pagination .page-gap {
    color: var(--ink-muted, #8a9aa8);
    padding: 0 4px;
}
.pagination-info {
    text-align: center;
    font-size: .88rem;
    margin: 0 0 10px;
}
/* =====================================================================
   Embeds de contenido compuesto ([VID=..] y [POD=..])
   Los sprinkles de tamano los pone el markup (width/height en el iframe),
   aqui solo se controla la caja y la alineacion.
   ===================================================================== */
.embed {
    margin: 1.5em 0;
    max-width: 100%;
    line-height: 0;
}
.embed iframe {
    border: 0;
    border-radius: 10px;
    max-width: 100%;
    box-shadow: 0 2px 12px rgba(16, 24, 39, .12);
    background: #0c1421;
}
/* Alineacion simple: la figura se encoge al contenido (inline-block). */
.embed--izq { text-align: left; }
.embed--cen { text-align: center; }
.embed--der { text-align: right; }
.embed--izq, .embed--cen, .embed--der { display: block; }

/* Caja de error: el shortcode se reconocio pero el contenido no existe o
   no esta publicado. Se marca la posicion con borde discontinuo. */
.embed--error .embed-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4em;
    max-width: 100%;
    border: 2px dashed #b3261e;
    border-radius: 10px;
    background: #fdf3f2;
    color: #b3261e;
    font-size: .9rem;
    line-height: 1.3;
    text-align: center;
    padding: 12px;
    box-sizing: border-box;
}
.embed--error .embed-error-icon { font-size: 1.6rem; line-height: 1; }
.embed--error .embed-error-text { font-weight: 600; }
/* Reproductor nativo de audio (episodios de podcast con mp3 directo).
   Se mantiene discreto: es contenido, no debe competir con el articulo. */
.embed--audio audio {
    width: 100%;
    border-radius: 10px;
    background: #f4f6f9;
    box-shadow: 0 2px 12px rgba(16, 24, 39, .10);
}
.embed--audio {
    padding: 10px;
    box-sizing: border-box;
}