/*
Theme Name: PDM Misterio
Theme URI: https://www.pdm.pag.com.py
Author: Periodismo del Misterio
Author URI: https://www.pdm.pag.com.py
Description: Tema cinematográfico oscuro para portal de investigación de fenómenos inexplicables, ovnis y casos históricos de Paraguay y el mundo. Compatible con Gutenberg y Elementor. Incluye CPTs de Investigaciones, Casos, Videos, Biblioteca y Radio, formulario "Los Vigilantes" con base de datos y newsletter propio.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pdm-misterio
Tags: dark, news, magazine, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, translation-ready
*/

/* ==========================================================================
   PDM MISTERIO — Hoja de estilos principal
   Paleta: Negro #05080D · Azul noche #071426 · Dorado #C9A227 · Blanco
   ========================================================================== */

:root {
    --pdm-black: #05080D;
    --pdm-night: #071426;
    --pdm-night-2: #0A1B33;
    --pdm-gold: #C9A227;
    --pdm-gold-soft: #E0C868;
    --pdm-white: #F4F6FB;
    --pdm-grey: #9AA7BD;
    --pdm-grey-dark: #4A5468;
    --pdm-border: rgba(201, 162, 39, 0.18);
    --pdm-card: #0B1626;
    --pdm-card-2: #0E1B30;

    --pdm-font-head: 'Oswald', 'Arial Narrow', sans-serif;
    --pdm-font-body: 'Inter', 'Segoe UI', Roboto, sans-serif;

    --pdm-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.9);
    --pdm-shadow-gold: 0 0 35px -8px rgba(201, 162, 39, 0.45);

    --pdm-max: 1200px;
    --pdm-radius: 10px;
    --pdm-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--pdm-font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--pdm-white);
    background-color: var(--pdm-black);
    background-image:
        radial-gradient(1200px 600px at 80% -10%, rgba(10, 27, 51, 0.85), transparent 60%),
        radial-gradient(900px 500px at 0% 100%, rgba(7, 20, 38, 0.9), transparent 55%);
    background-attachment: fixed;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    color-scheme: dark;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--pdm-gold); text-decoration: none; transition: color .25s var(--pdm-ease); }
a:hover { color: var(--pdm-gold-soft); }

h1, h2, h3, h4, h5 {
    font-family: var(--pdm-font-head);
    font-weight: 600;
    line-height: 1.1;
    margin: 0 0 .5em;
    letter-spacing: .5px;
}

p { margin: 0 0 1.2em; }

ul { margin: 0; padding: 0; }

.pdm-container {
    width: 100%;
    max-width: var(--pdm-max);
    margin: 0 auto;
    padding: 0 24px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* ---------- Botones ---------- */
.pdm-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    font-family: var(--pdm-font-head);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .25s var(--pdm-ease), box-shadow .25s var(--pdm-ease), background .25s;
}
.pdm-btn--gold {
    background: linear-gradient(135deg, var(--pdm-gold), var(--pdm-gold-soft));
    color: var(--pdm-black);
    box-shadow: var(--pdm-shadow-gold);
}
.pdm-btn--gold:hover { transform: translateY(-2px); color: var(--pdm-black); }
.pdm-btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--pdm-white);
    backdrop-filter: blur(4px);
}
.pdm-btn--ghost:hover { border-color: var(--pdm-gold); color: var(--pdm-gold); transform: translateY(-2px); }

/* ---------- Encabezado de sección ---------- */
.pdm-section { padding: 70px 0; position: relative; }
.pdm-section--alt { background: linear-gradient(180deg, transparent, rgba(7, 20, 38, 0.55), transparent); }

.pdm-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 38px;
}
.pdm-section-title {
    font-size: clamp(22px, 3vw, 34px);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    position: relative;
    padding-bottom: 14px;
}
.pdm-section-title::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 64px; height: 3px;
    background: var(--pdm-gold);
    box-shadow: var(--pdm-shadow-gold);
}
.pdm-section-link {
    font-family: var(--pdm-font-head);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 13px;
    white-space: nowrap;
}
.pdm-section-link::after { content: " →"; }

/* ==========================================================================
   HEADER / NAVEGACIÓN
   ========================================================================== */
.pdm-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 100;
    transition: background .35s var(--pdm-ease), box-shadow .35s, padding .35s;
}
.pdm-header.is-stuck {
    position: fixed;
    background: rgba(5, 8, 13, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--pdm-border);
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.9);
    animation: pdmSlideDown .4s var(--pdm-ease);
}
@keyframes pdmSlideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

.pdm-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 24px;
    max-width: var(--pdm-max);
    margin: 0 auto;
}
.pdm-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--pdm-font-head);
    line-height: 1;
}
.pdm-logo img { max-height: 48px; width: auto; }
.pdm-logo__text { display: flex; flex-direction: column; }
.pdm-logo__main {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--pdm-white);
}
.pdm-logo__main b { color: var(--pdm-gold); }
.pdm-logo__sub {
    font-size: 9px;
    letter-spacing: 4px;
    color: var(--pdm-grey);
    text-transform: uppercase;
}

.pdm-nav { display: flex; align-items: center; gap: 6px; }
.pdm-menu { display: flex; align-items: center; list-style: none; gap: 4px; }
.pdm-menu a {
    display: block;
    padding: 10px 14px;
    font-family: var(--pdm-font-head);
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--pdm-white);
    position: relative;
}
.pdm-menu a::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; bottom: 4px;
    height: 2px;
    background: var(--pdm-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s var(--pdm-ease);
}
.pdm-menu a:hover::after,
.pdm-menu .current-menu-item > a::after { transform: scaleX(1); }
.pdm-menu .current-menu-item > a { color: var(--pdm-gold); }

/* Submenús */
.pdm-menu .sub-menu {
    position: absolute;
    top: 100%; left: 0;
    min-width: 220px;
    background: var(--pdm-night);
    border: 1px solid var(--pdm-border);
    border-radius: 8px;
    padding: 8px;
    list-style: none;
    box-shadow: var(--pdm-shadow);
    opacity: 0; visibility: hidden;
    transform: translateY(10px);
    transition: all .25s var(--pdm-ease);
    z-index: 50;
}
.pdm-menu li { position: relative; }
.pdm-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.pdm-menu .sub-menu a::after { display: none; }
.pdm-menu .sub-menu a:hover { background: rgba(201, 162, 39, 0.1); border-radius: 6px; }

/* Buscador en header */
.pdm-search-toggle {
    background: none; border: none; cursor: pointer;
    color: var(--pdm-white); padding: 8px;
    display: flex; align-items: center;
    transition: color .25s;
}
.pdm-search-toggle:hover { color: var(--pdm-gold); }
.pdm-search-toggle svg { width: 20px; height: 20px; }

.pdm-search-panel {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 13, 0.96);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity .3s var(--pdm-ease);
}
.pdm-search-panel.is-open { opacity: 1; visibility: visible; }
.pdm-search-panel form { width: min(680px, 90vw); }
.pdm-search-panel input[type="search"] {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--pdm-gold);
    color: var(--pdm-white);
    font-family: var(--pdm-font-head);
    font-size: clamp(22px, 5vw, 44px);
    padding: 16px 8px;
    outline: none;
}
.pdm-search-panel input::placeholder { color: var(--pdm-grey-dark); }
.pdm-search-close {
    position: absolute; top: 28px; right: 32px;
    background: none; border: none; color: var(--pdm-white);
    font-size: 34px; cursor: pointer; line-height: 1;
}

/* Hamburguesa */
.pdm-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 8px;
}
.pdm-burger span {
    width: 26px; height: 2px; background: var(--pdm-white);
    transition: transform .3s, opacity .3s;
}
.pdm-burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pdm-burger.is-active span:nth-child(2) { opacity: 0; }
.pdm-burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */
.pdm-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--pdm-black);
}
.pdm-hero__bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
}
.pdm-hero__bg::after {
    content: "";
    position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 8, 13, 0.95) 0%, rgba(5, 8, 13, 0.65) 45%, rgba(5, 8, 13, 0.25) 100%),
        linear-gradient(0deg, var(--pdm-black) 2%, transparent 40%);
}
/* Cielo estrellado generado */
.pdm-stars {
    position: absolute; inset: 0; z-index: 2;
    background-image:
        radial-gradient(1px 1px at 20% 30%, #fff, transparent),
        radial-gradient(1px 1px at 60% 20%, #fff, transparent),
        radial-gradient(1px 1px at 80% 45%, #cbd5f5, transparent),
        radial-gradient(1.5px 1.5px at 35% 15%, #fff, transparent),
        radial-gradient(1px 1px at 90% 25%, #fff, transparent),
        radial-gradient(1px 1px at 50% 8%, #fff, transparent);
    opacity: .7;
    animation: pdmTwinkle 5s ease-in-out infinite alternate;
}
@keyframes pdmTwinkle { from { opacity: .35; } to { opacity: .85; } }

/* ---------- Niebla animada ---------- */
/* Capa del hero (más densa, sobre el horizonte) */
.pdm-hero__fog {
    position: absolute;
    left: -25%; right: -25%; bottom: -10%;
    height: 65%;
    z-index: 3;
    pointer-events: none;
    background:
        radial-gradient(60% 70% at 20% 80%, rgba(150, 170, 215, 0.18), transparent 70%),
        radial-gradient(55% 65% at 55% 90%, rgba(110, 135, 185, 0.16), transparent 70%),
        radial-gradient(65% 75% at 85% 75%, rgba(170, 185, 225, 0.14), transparent 70%);
    filter: blur(28px);
    animation: pdmFogHero 26s ease-in-out infinite alternate;
}
@keyframes pdmFogHero {
    0%   { transform: translateX(-4%) translateY(0); opacity: .8; }
    100% { transform: translateX(4%) translateY(-3%); opacity: 1; }
}

/* Capa global sutil sobre toda la página (solo aclara) */
.pdm-fog {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
    mix-blend-mode: screen;
    opacity: .6;
}
.pdm-fog span {
    position: absolute;
    top: -20%; left: -60%;
    width: 220%; height: 140%;
    background:
        radial-gradient(closest-side at 18% 35%, rgba(120, 150, 205, 0.10), transparent 60%),
        radial-gradient(closest-side at 48% 65%, rgba(95, 125, 180, 0.08), transparent 60%),
        radial-gradient(closest-side at 78% 28%, rgba(150, 170, 220, 0.09), transparent 60%);
    filter: blur(40px);
    animation: pdmFogDrift 55s linear infinite;
}
.pdm-fog span:nth-child(2) {
    top: 0; opacity: .7;
    animation-duration: 85s;
    animation-direction: reverse;
}
@keyframes pdmFogDrift {
    from { transform: translateX(-12%); }
    to   { transform: translateX(12%); }
}

/* ==========================================================================
   EFECTOS UFOLÓGICOS
   ========================================================================== */

/* ---- OVNI que cruza el cielo ---- */
.pdm-ufo {
    position: absolute;
    top: 16%; left: -160px;
    z-index: 4;
    pointer-events: none;
    width: 90px; height: 80px;
    animation: pdmUfoFly 22s linear infinite;
}
.pdm-ufo__body {
    position: absolute; top: 18px; left: 50%;
    width: 84px; height: 22px; margin-left: -42px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 30%, #3a4a66 0%, #0c1626 70%);
    box-shadow: 0 0 18px 2px rgba(201, 162, 39, 0.45), inset 0 -3px 6px rgba(0, 0, 0, .6);
    animation: pdmUfoLights 1.1s steps(1) infinite;
}
.pdm-ufo__dome {
    position: absolute; top: 6px; left: 50%;
    width: 38px; height: 26px; margin-left: -19px;
    border-radius: 50% 50% 40% 40%;
    background: radial-gradient(ellipse at 50% 30%, rgba(150, 220, 255, .85), rgba(60, 120, 180, .35));
    box-shadow: 0 0 14px rgba(120, 200, 255, .6);
}
.pdm-ufo__beam {
    position: absolute; top: 36px; left: 50%;
    width: 70px; height: 130px; margin-left: -35px;
    background: linear-gradient(to bottom, rgba(201, 162, 39, .35), rgba(201, 162, 39, 0));
    clip-path: polygon(34% 0, 66% 0, 100% 100%, 0 100%);
    filter: blur(2px);
    animation: pdmBeam 2.6s ease-in-out infinite;
}
@keyframes pdmUfoLights {
    0%   { box-shadow: 0 0 18px 2px rgba(201, 162, 39, .55), inset 0 -3px 6px rgba(0,0,0,.6); }
    50%  { box-shadow: 0 0 18px 2px rgba(120, 200, 255, .55), inset 0 -3px 6px rgba(0,0,0,.6); }
}
@keyframes pdmBeam { 0%, 100% { opacity: .25; } 50% { opacity: .6; } }
@keyframes pdmUfoFly {
    0%   { transform: translate(0, 0) rotate(-4deg); opacity: 0; }
    6%   { opacity: 1; }
    50%  { transform: translate(55vw, -26px) rotate(2deg); }
    80%  { transform: translate(85vw, 14px) rotate(-3deg); opacity: 1; }
    90%  { opacity: 0; }
    100% { transform: translate(110vw, 0) rotate(0); opacity: 0; }
}

/* ---- Radar con barrido (esquina superior derecha) ---- */
.pdm-radar {
    position: absolute; top: 96px; right: 6%;
    width: 150px; height: 150px;
    z-index: 4; pointer-events: none; opacity: .55;
    border-radius: 50%;
    border: 1px solid rgba(201, 162, 39, .25);
    background: radial-gradient(circle, rgba(201, 162, 39, .06), transparent 70%);
}
.pdm-radar::before {
    content: ""; position: absolute; inset: 34px;
    border-radius: 50%; border: 1px solid rgba(201, 162, 39, .22);
    box-shadow: 0 0 0 1px rgba(201, 162, 39, .05);
}
.pdm-radar::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(201, 162, 39, .4), rgba(201, 162, 39, .05) 18%, transparent 30%);
    animation: pdmSweep 4s linear infinite;
}
@keyframes pdmSweep { to { transform: rotate(360deg); } }

/* ---- Meteoros / estrellas fugaces ---- */
.pdm-meteor {
    position: absolute; z-index: 3; width: 130px; height: 1px;
    background: linear-gradient(90deg, #ffffff, rgba(255,255,255,0));
    filter: drop-shadow(0 0 6px rgba(180, 210, 255, .9));
    opacity: 0; transform: rotate(34deg);
}
.pdm-meteor--1 { top: 10%; left: 28%; animation: pdmMeteor 8s linear infinite 1s; }
.pdm-meteor--2 { top: 20%; left: 58%; animation: pdmMeteor 11s linear infinite 5s; }
@keyframes pdmMeteor {
    0%   { opacity: 0; transform: translate(0, 0) rotate(34deg); }
    4%   { opacity: 1; }
    18%  { opacity: 0; transform: translate(240px, 170px) rotate(34deg); }
    100% { opacity: 0; }
}

/* ---- Línea de escáner global ("archivo desclasificado") ---- */
.pdm-scan {
    position: fixed; left: 0; right: 0; top: 0; height: 160px;
    z-index: 3; pointer-events: none;
    background: linear-gradient(to bottom, transparent, rgba(120, 175, 255, .05) 46%, rgba(120, 175, 255, .12) 50%, rgba(120, 175, 255, .05) 54%, transparent);
    mix-blend-mode: screen; opacity: .55;
    animation: pdmScan 10s linear infinite;
}
@keyframes pdmScan {
    from { transform: translateY(-180px); }
    to   { transform: translateY(100vh); }
}

/* ---- Barrido de luz al pasar el cursor por las tarjetas ---- */
.pdm-card__media::before {
    content: ""; position: absolute; z-index: 2;
    top: 0; left: -90%; width: 65%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(201, 162, 39, .22), transparent);
    transform: skewX(-18deg);
}
.pdm-card:hover .pdm-card__media::before { animation: pdmCardSweep .85s ease; }
@keyframes pdmCardSweep { to { left: 150%; } }

/* Ocultar radar/OVNI en pantallas chicas para no recargar */
@media (max-width: 880px) {
    .pdm-radar { display: none; }
    .pdm-ufo { transform: scale(.7); top: 12%; }
}

/* Si el hero tiene foto de fondo (que ya incluye OVNI/radar), ocultar los dibujados
   por CSS para no duplicarlos. Se mantienen niebla, meteoros y escáner. */
.pdm-hero.has-photo .pdm-ufo,
.pdm-hero.has-photo .pdm-radar { display: none; }

.pdm-hero__content {
    position: relative;
    z-index: 5;
    max-width: var(--pdm-max);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}
.pdm-hero__inner { max-width: 620px; }
.pdm-hero__title {
    font-size: clamp(44px, 8vw, 104px);
    font-weight: 700;
    line-height: .95;
    text-transform: uppercase;
    margin: 0 0 22px;
    text-shadow: 0 6px 40px rgba(0, 0, 0, 0.8);
}
.pdm-hero__title span { display: block; color: var(--pdm-white); }
.pdm-hero__subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--pdm-grey);
    max-width: 480px;
    margin-bottom: 38px;
}
.pdm-hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

.pdm-scroll-cue {
    position: absolute;
    bottom: 28px; left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    width: 26px; height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px;
}
.pdm-scroll-cue::after {
    content: ""; position: absolute;
    top: 8px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 8px; border-radius: 2px;
    background: var(--pdm-gold);
    animation: pdmScroll 1.6s infinite;
}
@keyframes pdmScroll { 0% { opacity: 0; top: 8px; } 50% { opacity: 1; } 100% { opacity: 0; top: 22px; } }

/* ==========================================================================
   CARDS — Últimas investigaciones
   ========================================================================== */
.pdm-grid { display: grid; gap: 26px; }
.pdm-grid--4 { grid-template-columns: repeat(4, 1fr); }
.pdm-grid--3 { grid-template-columns: repeat(3, 1fr); }
.pdm-grid--2 { grid-template-columns: repeat(2, 1fr); }

.pdm-card {
    position: relative;
    background: var(--pdm-card);
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    overflow: hidden;
    transition: transform .35s var(--pdm-ease), box-shadow .35s, border-color .35s;
    display: flex; flex-direction: column;
}
.pdm-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--pdm-shadow);
    border-color: var(--pdm-gold);
}
.pdm-card__media {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: var(--pdm-night);
}
.pdm-card__media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .6s var(--pdm-ease);
}
.pdm-card:hover .pdm-card__media img { transform: scale(1.08); }
.pdm-card__media::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(0deg, var(--pdm-card) 5%, transparent 55%);
}
.pdm-badge {
    position: absolute;
    top: 14px; left: 14px;
    z-index: 3;
    background: var(--pdm-gold);
    color: var(--pdm-black);
    font-family: var(--pdm-font-head);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 3px;
}
.pdm-card__body { padding: 20px 20px 24px; flex: 1; display: flex; flex-direction: column; }
.pdm-card__title {
    font-size: 19px;
    line-height: 1.25;
    margin: 0 0 12px;
}
.pdm-card__title a { color: var(--pdm-white); }
.pdm-card__title a:hover { color: var(--pdm-gold); }
.pdm-card__meta {
    margin-top: auto;
    font-size: 12px;
    color: var(--pdm-grey);
    letter-spacing: .5px;
    display: flex; align-items: center; gap: 8px;
}
.pdm-card__excerpt { color: var(--pdm-grey); font-size: 14px; margin-bottom: 16px; }

/* ==========================================================================
   CASOS DESTACADOS — bloques numerados
   ========================================================================== */
.pdm-cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pdm-case {
    position: relative;
    min-height: 270px;
    border-radius: var(--pdm-radius);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 26px;
    border: 1px solid var(--pdm-border);
    isolation: isolate;
}
.pdm-case__bg {
    position: absolute; inset: 0; z-index: -2;
    background-size: cover; background-position: center;
    filter: grayscale(35%) brightness(.7);
    transition: transform .6s var(--pdm-ease), filter .4s;
}
.pdm-case::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(0deg, rgba(5, 8, 13, 0.95), rgba(5, 8, 13, 0.3));
}
.pdm-case:hover .pdm-case__bg { transform: scale(1.08); filter: grayscale(0%) brightness(.85); }
.pdm-case__num {
    font-family: var(--pdm-font-head);
    font-size: 64px;
    font-weight: 700;
    color: var(--pdm-gold);
    line-height: 1;
    opacity: .9;
}
.pdm-case__content { width: 100%; }
.pdm-case__title {
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 4px 0 16px;
    color: var(--pdm-white);
}
.pdm-case .pdm-btn { padding: 9px 18px; font-size: 12px; }

/* ==========================================================================
   RADIO PDM
   ========================================================================== */
.pdm-radio-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 26px; align-items: stretch; }
@media (max-width: 900px) { .pdm-radio-grid { grid-template-columns: 1fr; } }

.pdm-radio {
    background: linear-gradient(135deg, var(--pdm-night), var(--pdm-night-2));
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    padding: 30px;
}
.pdm-radio__head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.pdm-radio__wave {
    flex: 1; height: 56px;
    display: flex; align-items: center; justify-content: center; gap: 4px;
}
.pdm-radio__wave span {
    width: 4px; background: var(--pdm-gold); border-radius: 2px;
    animation: pdmWave 1.1s ease-in-out infinite;
}
.pdm-radio.is-playing .pdm-radio__wave span { animation-play-state: running; }
.pdm-radio__wave span { animation-play-state: paused; }
.pdm-radio__wave span:nth-child(odd) { animation-delay: .2s; }
.pdm-radio__wave span:nth-child(3n) { animation-delay: .4s; }
@keyframes pdmWave { 0%, 100% { height: 12px; } 50% { height: 44px; } }

.pdm-radio__play {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--pdm-gold);
    color: var(--pdm-black);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--pdm-shadow-gold);
    transition: transform .25s var(--pdm-ease);
    flex-shrink: 0;
}
.pdm-radio__play:hover { transform: scale(1.08); }
.pdm-radio__play svg { width: 26px; height: 26px; }
.pdm-radio__brand { font-family: var(--pdm-font-head); font-size: 28px; letter-spacing: 2px; }
.pdm-radio__brand small { display: block; font-size: 11px; letter-spacing: 4px; color: var(--pdm-grey); }

.pdm-radio__rows { margin-top: 8px; }
.pdm-radio__row { padding: 14px 0; border-top: 1px solid var(--pdm-border); }
.pdm-radio__label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--pdm-grey); }
.pdm-radio__value { font-family: var(--pdm-font-head); font-size: 19px; display: flex; justify-content: space-between; align-items: center; }
.pdm-live {
    font-family: var(--pdm-font-body);
    font-size: 11px; letter-spacing: 1px;
    color: #ff5a5a; display: inline-flex; align-items: center; gap: 6px;
}
.pdm-live::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: #ff5a5a; animation: pdmPulse 1.4s infinite;
}
@keyframes pdmPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 90, .6); } 70% { box-shadow: 0 0 0 8px rgba(255, 90, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 90, 0); } }

/* Lista archivo programas (columna derecha) */
.pdm-radio-side {
    background: var(--pdm-card);
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    padding: 24px;
}
.pdm-radio-side h3 { font-size: 16px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.pdm-prog { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--pdm-border); }
.pdm-prog:last-child { border-bottom: none; }
.pdm-prog__time { font-family: var(--pdm-font-head); color: var(--pdm-gold); font-size: 14px; min-width: 56px; }
.pdm-prog__name { font-size: 14px; color: var(--pdm-white); }

/* ==========================================================================
   BIBLIOTECA + VIDEOS + COMUNIDAD (fila inferior home)
   ========================================================================== */
.pdm-trio { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 30px; align-items: start; }
@media (max-width: 1024px) { .pdm-trio { grid-template-columns: 1fr; } }

.pdm-library-icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; }
.pdm-lib {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 18px 6px;
    border: 1px solid var(--pdm-border);
    border-radius: 8px;
    text-align: center;
    transition: border-color .3s, transform .3s, background .3s;
}
.pdm-lib:hover { border-color: var(--pdm-gold); transform: translateY(-4px); background: rgba(201, 162, 39, 0.06); }
.pdm-lib svg { width: 30px; height: 30px; color: var(--pdm-gold); }
.pdm-lib span { font-family: var(--pdm-font-head); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--pdm-white); }

/* Video destacado */
.pdm-video-feature {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--pdm-radius);
    overflow: hidden;
    border: 1px solid var(--pdm-border);
    cursor: pointer;
}
.pdm-video-feature img { width: 100%; height: 100%; object-fit: cover; }
.pdm-video-feature__play {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(5, 8, 13, 0.35);
    transition: background .3s;
}
.pdm-video-feature:hover .pdm-video-feature__play { background: rgba(5, 8, 13, 0.15); }
.pdm-play-circle {
    width: 74px; height: 74px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    display: flex; align-items: center; justify-content: center;
    background: rgba(201, 162, 39, 0.15);
    backdrop-filter: blur(4px);
    transition: transform .3s var(--pdm-ease);
}
.pdm-video-feature:hover .pdm-play-circle { transform: scale(1.1); background: var(--pdm-gold); }
.pdm-play-circle svg { width: 28px; height: 28px; color: #fff; }
.pdm-video-feature:hover .pdm-play-circle svg { color: var(--pdm-black); }

.pdm-video-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.pdm-video-thumbs img { aspect-ratio: 16/10; object-fit: cover; border-radius: 6px; opacity: .7; transition: opacity .3s; cursor: pointer; }
.pdm-video-thumbs img:hover { opacity: 1; }

/* ==========================================================================
   FORMULARIO LOS VIGILANTES + NEWSLETTER (forms)
   ========================================================================== */
.pdm-form { display: flex; flex-direction: column; gap: 12px; }
.pdm-form p { margin: 0; }
.pdm-input, .pdm-textarea, .pdm-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(201, 162, 39, 0.4);
    border-radius: 6px;
    color: var(--pdm-white);
    font-family: var(--pdm-font-body);
    font-size: 15px;
    padding: 14px 16px;
    outline: none;
    color-scheme: dark;
    transition: border-color .25s, box-shadow .25s, background .25s;
}
.pdm-input:hover, .pdm-textarea:hover, .pdm-select:hover { background: rgba(255, 255, 255, 0.1); }
.pdm-input:focus, .pdm-textarea:focus, .pdm-select:focus {
    border-color: var(--pdm-gold);
    background: rgba(255, 255, 255, 0.11);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.2);
}
.pdm-input::placeholder, .pdm-textarea::placeholder { color: #aeb9cc; opacity: 1; }
.pdm-select option { background: #0E1B30; color: var(--pdm-white); }
/* Evita el fondo blanco del autocompletado del navegador */
.pdm-input:-webkit-autofill,
.pdm-input:-webkit-autofill:hover,
.pdm-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--pdm-white);
    -webkit-box-shadow: 0 0 0 40px #0E1B30 inset;
    caret-color: var(--pdm-white);
}
.pdm-textarea { resize: vertical; min-height: 110px; }
.pdm-file-row { display: flex; gap: 10px; align-items: center; }
.pdm-file-row label {
    flex: 1; font-size: 13px; color: #c4cddd;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(201, 162, 39, 0.45); padding: 13px; border-radius: 6px; cursor: pointer;
    transition: border-color .25s, background .25s;
}
.pdm-file-row label:hover { border-color: var(--pdm-gold); background: rgba(201, 162, 39, 0.08); }
.pdm-hp { position: absolute; left: -9999px; opacity: 0; height: 0; }
.pdm-form__msg { font-size: 14px; padding: 10px 14px; border-radius: 6px; display: none; }
.pdm-form__msg.is-ok { display: block; background: rgba(46, 160, 90, .15); border: 1px solid rgba(46, 160, 90, .5); color: #8be0aa; }
.pdm-form__msg.is-err { display: block; background: rgba(255, 90, 90, .12); border: 1px solid rgba(255, 90, 90, .5); color: #ff9a9a; }

.pdm-newsletter {
    position: relative;
    background:
        linear-gradient(90deg, rgba(7, 20, 38, 0.95), rgba(7, 20, 38, 0.6)),
        radial-gradient(600px 300px at 90% 50%, rgba(201, 162, 39, 0.15), transparent);
    border-top: 1px solid var(--pdm-border);
    border-bottom: 1px solid var(--pdm-border);
    overflow: hidden;
}
.pdm-newsletter__inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; padding: 56px 0; }
@media (max-width: 768px) { .pdm-newsletter__inner { grid-template-columns: 1fr; } }
.pdm-newsletter h2 { font-size: clamp(22px, 3vw, 32px); text-transform: uppercase; letter-spacing: 1px; }
.pdm-newsletter form { display: flex; gap: 10px; flex-wrap: wrap; }
.pdm-newsletter .pdm-input { flex: 1; min-width: 200px; }

/* ==========================================================================
   CONTENIDO (single / page / archive)
   ========================================================================== */
.pdm-page-hero {
    position: relative;
    padding: 140px 0 60px;
    background: linear-gradient(180deg, var(--pdm-night), var(--pdm-black));
    border-bottom: 1px solid var(--pdm-border);
}
.pdm-page-hero h1 { font-size: clamp(28px, 5vw, 52px); text-transform: uppercase; }
.pdm-breadcrumb { font-size: 13px; color: var(--pdm-grey); margin-bottom: 14px; letter-spacing: 1px; }
.pdm-breadcrumb a { color: var(--pdm-grey); }
.pdm-breadcrumb a:hover { color: var(--pdm-gold); }

.pdm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding: 60px 0; }
@media (max-width: 900px) { .pdm-layout { grid-template-columns: 1fr; } }

.pdm-article { font-size: 17px; line-height: 1.8; color: #d7deec; }
.pdm-article img { border-radius: 8px; margin: 24px 0; }
.pdm-article h2 { font-size: 28px; margin-top: 40px; color: var(--pdm-white); }
.pdm-article h3 { font-size: 22px; margin-top: 30px; color: var(--pdm-white); }
.pdm-article blockquote {
    border-left: 3px solid var(--pdm-gold);
    margin: 26px 0; padding: 6px 22px;
    color: var(--pdm-grey); font-style: italic; font-size: 19px;
}
.pdm-article a { text-decoration: underline; text-underline-offset: 3px; }
.pdm-article ul, .pdm-article ol { padding-left: 22px; margin-bottom: 1.2em; }
.pdm-article li { margin-bottom: 8px; }

.pdm-sidebar .widget { background: var(--pdm-card); border: 1px solid var(--pdm-border); border-radius: 8px; padding: 22px; margin-bottom: 24px; }
.pdm-sidebar .widget-title { font-size: 15px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--pdm-border); }
.pdm-sidebar ul { list-style: none; }
.pdm-sidebar li { padding: 8px 0; border-bottom: 1px dashed var(--pdm-border); }

/* Línea de tiempo (casos) */
.pdm-timeline { position: relative; margin: 30px 0; padding-left: 28px; border-left: 2px solid var(--pdm-border); }
.pdm-timeline__item { position: relative; padding-bottom: 26px; }
.pdm-timeline__item::before {
    content: ""; position: absolute; left: -36px; top: 4px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--pdm-gold); box-shadow: var(--pdm-shadow-gold);
}
.pdm-timeline__date { font-family: var(--pdm-font-head); color: var(--pdm-gold); font-size: 15px; }

/* Documentos relacionados / biblioteca lista */
.pdm-doc-list { display: grid; gap: 12px; }
.pdm-doc {
    display: flex; align-items: center; gap: 14px;
    background: var(--pdm-card); border: 1px solid var(--pdm-border);
    border-radius: 8px; padding: 14px 16px; transition: border-color .3s, transform .3s;
}
.pdm-doc:hover { border-color: var(--pdm-gold); transform: translateX(4px); }
.pdm-doc__icon { color: var(--pdm-gold); flex-shrink: 0; }
.pdm-doc__meta { flex: 1; }
.pdm-doc__title { font-family: var(--pdm-font-head); font-size: 16px; }
.pdm-doc__sub { font-size: 12px; color: var(--pdm-grey); }

/* Galería simple */
.pdm-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; }
.pdm-gallery img { aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; cursor: pointer; transition: transform .3s; }
.pdm-gallery img:hover { transform: scale(1.03); }

/* Paginación */
.pdm-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pdm-pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 42px; height: 42px; padding: 0 10px;
    border: 1px solid var(--pdm-border); border-radius: 6px;
    font-family: var(--pdm-font-head); color: var(--pdm-white);
}
.pdm-pagination .page-numbers.current,
.pdm-pagination .page-numbers:hover { background: var(--pdm-gold); color: var(--pdm-black); border-color: var(--pdm-gold); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.pdm-footer {
    background: var(--pdm-black);
    border-top: 1px solid var(--pdm-border);
    padding: 60px 0 0;
    position: relative;
}
.pdm-footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 40px; }
@media (max-width: 1024px) { .pdm-footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pdm-footer__top { grid-template-columns: 1fr; } }
.pdm-footer__about p { color: var(--pdm-grey); font-size: 14px; max-width: 260px; }
.pdm-footer h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: var(--pdm-gold); margin-bottom: 16px; }
.pdm-footer ul { list-style: none; }
.pdm-footer ul li { margin-bottom: 9px; }
.pdm-footer ul a { color: var(--pdm-grey); font-size: 14px; }
.pdm-footer ul a:hover { color: var(--pdm-white); padding-left: 4px; }
.pdm-social { display: flex; gap: 12px; margin-top: 18px; }
.pdm-social a {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--pdm-border); color: var(--pdm-white);
    transition: all .3s var(--pdm-ease);
}
.pdm-social a:hover { background: var(--pdm-gold); color: var(--pdm-black); border-color: var(--pdm-gold); transform: translateY(-3px); }
.pdm-social svg { width: 17px; height: 17px; }
.pdm-footer__bottom {
    border-top: 1px solid var(--pdm-border);
    padding: 22px 0;
    text-align: center;
    font-size: 13px;
    color: var(--pdm-grey-dark);
}

/* ==========================================================================
   ANIMACIONES DE ENTRADA (scroll reveal)
   ========================================================================== */
.pdm-reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s var(--pdm-ease), transform .7s var(--pdm-ease); }
.pdm-reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
    .pdm-reveal { opacity: 1; transform: none; transition: none; }
    * { animation: none !important; scroll-behavior: auto; }
}

/* Modal video */
.pdm-modal { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; background: rgba(5,8,13,.95); }
.pdm-modal.is-open { display: flex; }
.pdm-modal__inner { width: min(900px, 92vw); aspect-ratio: 16/9; }
.pdm-modal__inner iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; }
.pdm-modal__close { position: absolute; top: 24px; right: 30px; background: none; border: none; color: #fff; font-size: 36px; cursor: pointer; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .pdm-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .pdm-cases { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
    .pdm-burger { display: flex; }
    .pdm-nav {
        position: fixed; top: 0; right: 0; bottom: 0;
        width: min(320px, 85vw);
        background: var(--pdm-night);
        border-left: 1px solid var(--pdm-border);
        flex-direction: column;
        align-items: stretch;
        padding: 90px 22px 30px;
        transform: translateX(100%);
        transition: transform .35s var(--pdm-ease);
        overflow-y: auto;
        z-index: 150;
    }
    .pdm-nav.is-open { transform: translateX(0); }
    .pdm-menu { flex-direction: column; align-items: stretch; gap: 0; }
    .pdm-menu a { padding: 14px 6px; border-bottom: 1px solid var(--pdm-border); }
    .pdm-menu a::after { display: none; }
    .pdm-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding-left: 14px; background: transparent; }
    .pdm-header { position: fixed; background: rgba(5,8,13,.92); backdrop-filter: blur(12px); }
    .pdm-hero { padding-top: 80px; }
}
@media (max-width: 600px) {
    .pdm-grid--4, .pdm-grid--3, .pdm-grid--2 { grid-template-columns: 1fr; }
    .pdm-video-thumbs { grid-template-columns: repeat(3, 1fr); }
    .pdm-section { padding: 50px 0; }
    .pdm-section-head { flex-direction: column; align-items: flex-start; }
}
