/* =============================================
   SINGLE NOTICIA ESPECIAL
   Depende de: main.css (variables, .btn, .wrap, .reveal)
   Mobile-first: reglas base = mobile, cada @media (min-width) agrega
   complejidad hacia arriba. No usar max-width en este archivo.
   ============================================= */

/* ── Progreso de lectura ── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--line);
    z-index: 200;
}
.reading-progress__fill {
    height: 100%;
    width: 0;
    background: var(--red-accent);
    transition: width .1s linear;
}

/* P16 — @media(min-width:601px) y @media(min-width:901px) eliminados.
   Confirmado con capturas en el mismo ancho (768): con 601 aplicado
   (1.5rem) se veía peor que sin aplicar (1.25rem, el valor base). 901
   además resultó ser tan específico que no se llegaba a ninguna
   combinación real donde se activara por sobre otra regla — en la
   práctica, dead code. Un solo valor fijo, sin escalar por ancho. */
:root { --noticia-pad-x: 1.25rem; }

/* ── Hero ── */
.noticia-hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem var(--noticia-pad-x) 2rem;
    border-bottom: 1px solid var(--line);
}
/* P16 — @media(min-width:601px){padding:clamp(7rem,10vw,9rem)...}
   eliminado. Confirmado con toggle del checkbox en devtools sobre el
   mismo elemento a 768px real (768 x 280.48 en el tooltip, sin
   ambigüedad de dispositivo): con el padding-top grande activo se veía
   un espacio excesivo entre la foto de portada y la etiqueta de
   categoría; desactivado (queda el 2rem base) se ve correcto. Mismo
   criterio que el resto de --noticia-pad-x — un solo valor fijo. */
.noticia-tag-cat {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mid-gray);
    border: 1px solid var(--line);
    padding: 4px 12px;
    border-radius: 2px;
    margin-bottom: 1.25rem;
    transition: border-color .25s, color .25s;
}
.noticia-tag-cat:hover {
    border-color: var(--red-accent);
    color: var(--red-accent);
}
.noticia-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    font-weight: 600;
    color: var(--white);
    line-height: 1.15;
    letter-spacing: -.02em;
    margin-bottom: 1.25rem;
    max-width: 680px;
}
/* ── CTA row (P69.8) — entre H1 y meta-row. Mismo patrón que
   .svc-hero__body .cta-row en services.css, sin colores hardcodeados:
   a diferencia del hero de servicio/proyecto (fondo imagen/video
   siempre oscuro), .noticia-hero no tiene fondo fijo — .btn/.btn-primary/
   .btn-ghost ya se adaptan solos a modo claro/oscuro vía main.css. ── */
.noticia-hero .cta-row {
    display: flex;
    gap: 16px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.noticia-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Audio narrado — bajo el meta-row ── */
.noticia-audio {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}
.noticia-audio__label {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--red-accent);
    flex-shrink: 0;
}
.noticia-audio__player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: transparent;
    max-width: 380px;
    width: 100%;
}
.noticia-audio__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--white);
    transition: color .2s;
}
.noticia-audio__btn:hover,
.noticia-audio__btn:focus-visible {
    color: var(--red-accent);
}
.noticia-audio__btn svg { pointer-events: none; }
.noticia-audio__time {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: var(--mid-gray);
    flex-shrink: 0;
    min-width: 30px;
    text-align: center;
}
/* Barra de progreso — <input type="range"> en vez de <audio controls>:
   a diferencia del widget nativo de audio, el range SÍ es 100% estilable
   y consistente entre navegadores (no depende de shadow DOM propietario) */
.noticia-audio__range {
    flex: 1;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--mid-gray);
    border-radius: 2px;
    cursor: pointer;
    outline: none;
    min-width: 60px;
}
.noticia-audio__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red-accent);
    border: none;
    margin-top: -3.5px;
    transition: transform .15s;
}
.noticia-audio__range:hover::-webkit-slider-thumb,
.noticia-audio__range:active::-webkit-slider-thumb { transform: scale(1.3); }
.noticia-audio__range::-moz-range-track {
    height: 3px;
    background: transparent;
    border-radius: 2px;
}
.noticia-audio__range::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red-accent);
    border: none;
    transition: transform .15s;
}
.noticia-audio__range:hover::-moz-range-thumb,
.noticia-audio__range:active::-moz-range-thumb { transform: scale(1.3); }

.noticia-autor {
    display: flex;
    align-items: center;
    gap: 10px;
}
.noticia-autor__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--dark-graphite);
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--mid-gray);
    flex-shrink: 0;
}
.noticia-autor__nombre,
.noticia-meta-lectura {
    font-size: 13px;
    color: var(--mid-gray);
    font-family: 'Nunito', sans-serif;
}
/* Fecha del artículo: lectura relevante, no decorativa — N4 */
.noticia-meta-fecha {
    font-size: 13px;
    color: var(--reading-text);
    font-family: 'Nunito', sans-serif;
}
.noticia-meta-lectura {
    display: flex;
    align-items: center;
    gap: 5px;
}
.noticia-meta-lectura svg { color: var(--mid-gray); }
.noticia-meta-sep { color: var(--line); font-size: 16px; }

/* ── Cover — mobile primero: recorte más cuadrado, se alarga en desktop ── */
.noticia-cover { width: 100%; }
.noticia-cover__img {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--dark-graphite);
}
@media (min-width: 768px) {
    .noticia-cover__img { aspect-ratio: 16 / 7; }
}
.noticia-cover__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .3s, transform .7s var(--ease);
    transform: scale(1.04) translateY(0px);
    will-change: transform;
}
.noticia-cover__img:hover img { opacity: .9; }
.noticia-cover__caption {
    text-align: center;
    font-size: 11px;
    color: var(--mid-gray);
    padding: 10px 2rem;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--line);
    font-family: 'Montserrat', sans-serif;
    opacity: .7;
}

/* ── Layout cuerpo + sidebar — mobile primero: 1 columna, sidebar oculto ── */
.noticia-content-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 1120px;
    margin: 0 auto;
    padding: 2.5rem var(--noticia-pad-x) 4rem;
}
/* P16 — 901 → 1024, mismo criterio que .proyecto-dos-columnas en
   single-proyecto.css (mismo tipo de componente: artículo + columna
   lateral). Capturas confirmaron 1 columna se ve bien en todo el rango
   de tablet, sin necesidad de un corte propio antes de 1024. */
@media (min-width: 1024px) {
    .noticia-content-wrap {
        grid-template-columns: 1fr 260px;
        gap: 4rem;
        padding: 3.5rem var(--noticia-pad-x) 5rem;
    }
}

/* ── Artículo ── */
.noticia-article p {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: var(--reading-text);
    line-height: 1.9;
    margin-bottom: 1.5rem;
}
.noticia-article h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    font-weight: 600;
    color: var(--white);
    margin: 2.75rem 0 1rem;
    letter-spacing: -.01em;
}
.noticia-article h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    opacity: .85;
    margin: 2rem 0 .75rem;
}
/* Imágenes inline del editor */
.noticia-article figure,
.noticia-article .wp-block-image {
    margin: 2rem 0 .5rem;
    width: 100%;
}
.noticia-article figure img,
.noticia-article .wp-block-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: opacity .3s, transform .6s var(--ease);
}
.noticia-article figure:hover img,
.noticia-article .wp-block-image:hover img {
    opacity: .9;
    transform: scale(1.02);
}
.noticia-article figcaption,
.noticia-article .wp-block-image figcaption {
    font-size: 11px;
    color: var(--mid-gray);
    opacity: .7;
    letter-spacing: .03em;
    margin-top: 6px;
    font-family: 'Montserrat', sans-serif;
}

/* Pullquote / blockquote */
.noticia-article blockquote {
    position: relative;
    padding: 1rem 1.75rem;
    margin: 2.5rem 0;
}
.noticia-article blockquote::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: var(--red-accent);
    transform-origin: top;
    transform: scaleY(0);
    transition: transform .6s var(--ease);
}
.noticia-article blockquote.pq-visible::before {
    transform: scaleY(1);
}
/* P27: los 3 !important que había acá se quitaron. Por especificidad CSS,
   .noticia-article blockquote p (0-1-2) ya gana sobre .noticia-article p
   (0-1-1) sin necesitarlos — no se encontró otra regla en este archivo que
   compita. No se pudo confirmar contra main.css (fuera de este proyecto);
   verificar visualmente en el navegador después de subir esto: si el
   tamaño/color/line-height de la cita se ve igual que antes, quedó bien;
   si se ve como párrafo normal, hay algo en main.css con más especificidad
   y estos !important vuelven a ser necesarios. */
.noticia-article blockquote p {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    font-style: italic;
    color: var(--reading-text);
    line-height: 1.55;
    margin: 0;
}

/* Divider */
.noticia-divider {
    border: none;
    border-top: 1px solid var(--line);
    margin: 3rem 0;
}

/* ── Galería de imágenes (carrusel) — P69.5 ──
   Mismo componente base (.carousel-container/carousel.js) que el
   carrusel de portafolio en page-servicio.php. Override local solo
   para ancho (100% del artículo, no los 800px fijos del genérico) y
   aspect-ratio (16/9, consistente con .noticia-cover__img desktop y
   figuras inline). Botón/indicador NO se sobreescriben acá — heredan
   el estilo unificado de carousel.css (círculo rojo + punto circular). */
.noticia-galeria { margin: 2.5rem 0; }
.noticia-galeria__label {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mid-gray);
    opacity: .7;
    margin-bottom: 1rem;
}
.noticia-galeria-carousel.carousel-container {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0;
}

/* Tags footer */
.noticia-tags-footer {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.noticia-tag {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: var(--mid-gray);
    border: 1px solid var(--line);
    padding: 4px 12px;
    border-radius: 2px;
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: border-color .2s, color .2s;
}
.noticia-tag:hover {
    border-color: var(--red-accent);
    color: var(--red-accent);
}

/* Share row */
.noticia-share-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
}
.noticia-share-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: var(--mid-gray);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-right: 4px;
    opacity: .7;
}
.noticia-share-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mid-gray);
    cursor: pointer;
    transition: border-color .2s, color .2s, transform .25s var(--ease);
    text-decoration: none;
}
.noticia-share-btn:hover {
    border-color: var(--red-accent);
    color: var(--red-accent);
    transform: scale(1.12);
}
/* Botón nativo oculto por defecto — JS lo activa si navigator.share está disponible */
.noticia-share-native { display: none; }

/* ── CTA mobile — mobile primero: visible por defecto, se oculta en desktop ── */
.noticia-cta-mobile {
    display: block;
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 1.25rem;
    margin-top: 2rem;
    background: var(--dark-graphite);
}
.noticia-cta-mobile p {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    color: var(--mid-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}
/* P16 — 901 → 1024, junto con .noticia-content-wrap (ver arriba) —
   tienen que cambiar en el mismo punto o el CTA mobile y la sidebar
   quedan descoordinados con el grid de 2 columnas. */
@media (min-width: 1024px) {
    .noticia-cta-mobile { display: none; }
}

/* ── Sidebar — mobile primero: oculto, aparece en desktop junto al 2do columna ── */
.noticia-sidebar { display: none; }
@media (min-width: 1024px) {
    .noticia-sidebar { display: block; }
}
.noticia-sidebar__sticky {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}
.noticia-sidebar__label {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--mid-gray);
    opacity: .6;
    margin-bottom: 1rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.noticia-sidebar__item {
    display: block;
    margin-bottom: 1.25rem;
    text-decoration: none;
    cursor: pointer;
}
.noticia-sidebar__thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--dark-graphite);
    border-radius: 2px;
    margin-bottom: 8px;
    overflow: hidden;
}
.noticia-sidebar__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .2s, transform .5s var(--ease);
}
.noticia-sidebar__item:hover .noticia-sidebar__thumb img {
    opacity: .9;
    transform: scale(1.05);
}
.noticia-sidebar__cat {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    color: var(--mid-gray);
    letter-spacing: .07em;
    text-transform: uppercase;
    margin-bottom: 4px;
    opacity: .6;
}
.noticia-sidebar__titulo {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    color: var(--mid-gray);
    line-height: 1.45;
    transition: color .2s;
}
.noticia-sidebar__item:hover .noticia-sidebar__titulo { color: var(--white); }

/* CTA box sidebar */
.noticia-cta-box {
    background: var(--dark-graphite);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 1.25rem;
    animation: borderPulseNoticia 4s ease-in-out infinite;
}
@keyframes borderPulseNoticia {
    0%, 100% { border-color: var(--line); }
    50%       { border-color: rgba(255,252,255,.18); }
}
.noticia-cta-box p {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    color: var(--mid-gray);
    line-height: 1.65;
    margin-bottom: 1rem;
}
.noticia-cta-box .btn {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 10px 16px;
}

/* ── Related — mobile primero: 1 columna, padding compacto ── */
.noticia-related {
    background: var(--dark-graphite);
    border-top: 1px solid var(--line);
    padding: 2.5rem 1.25rem 4rem;
}
@media (min-width: 768px) {
    .noticia-related {
        padding: clamp(2.5rem, 5vw, 4rem) 2rem clamp(3rem, 6vw, 5rem);
    }
}
.noticia-related__heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: var(--mid-gray);
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    opacity: .7;
}
/* P16 — antes 601→2 columnas fijas, 901→3 columnas fijas. Con
   auto-fit + minmax, el navegador decide cuántas caben según el ancho
   real disponible, sin un punto de quiebre artificial — 2 en la
   mayoría del rango de tablet, 3 apenas hay espacio real para una
   tercera de al menos 260px, en vez de saltar exactamente en 901px
   tenga o no tenga sentido en ese punto puntual. */
.noticia-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.noticia-rel-card {
    display: block;
    border: 1px solid var(--line);
    border-radius: 2px;
    overflow: hidden;
    text-decoration: none;
    transition: border-color .25s, transform .3s var(--ease), box-shadow .3s;
}
.noticia-rel-card:hover {
    border-color: var(--red-accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(16,10,10,.5);
}
.noticia-rel-card__thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--dark-graphite);
    overflow: hidden;
}
.noticia-rel-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .3s, transform .5s var(--ease);
}
.noticia-rel-card:hover .noticia-rel-card__thumb img {
    opacity: .9;
    transform: scale(1.05);
}
.noticia-rel-card__body { padding: 1rem; }
.noticia-rel-card__cat {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    color: var(--mid-gray);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 6px;
    opacity: .7;
}
.noticia-rel-card__titulo {
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    color: var(--mid-gray);
    line-height: 1.45;
    transition: color .2s;
}
.noticia-rel-card:hover .noticia-rel-card__titulo { color: var(--white); }
.noticia-rel-card__fecha {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: var(--mid-gray);
    opacity: .5;
    margin-top: 10px;
}

/* ── Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.reveal.in {
    opacity: 1;
    transform: none;
}
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }

/* ── Modo claro ── */
body.light .noticia-tag-cat:hover,
body.light .noticia-tag:hover {
    border-color: var(--red);
    color: var(--red);
}
body.light .noticia-article p { color: var(--reading-text); }
body.light .noticia-article blockquote p { color: var(--reading-text); } /* P27: !important removido, misma lógica de especificidad */
body.light .noticia-rel-card__titulo { color: var(--white); }
body.light .noticia-rel-card:hover { border-color: var(--red); }