/* «La EPM en los medios» (templates/medios.html). Usa los tokens de styles.css/tema.css. */

/* Cabecera de la página, como el h1 de .content pero a todo el ancho */
.medios .page-head { padding-block: clamp(40px, 6vw, 64px) 8px; }
.medios .page-head h1 { display: flex; align-items: baseline; gap: 16px; font: var(--display-weight) clamp(2rem, 4.4vw, 2.8rem)/1.1 var(--font-display); color: var(--primary); margin: 0 0 .5em; text-wrap: balance; }
.medios .page-head h1::after { content: ""; flex: 1; min-width: 40px; height: 2px; background: var(--h1-line); }
.medios .page-head p { max-width: 62ch; font-size: 1.2rem; }

/* Medios que han hablado de nosotros */
.outlets { padding-block: 28px 8px; }
.outlets ul { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 26px; }
.outlets li { font: var(--display-weight) clamp(1.15rem, 2.2vw, 1.5rem)/1.3 var(--font-display); color: var(--primary); opacity: .85; }
.outlets li.big { font-size: clamp(1.45rem, 3vw, 2rem); opacity: 1; }

/* Citas */
.lead-quote { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 clamp(14px, 3vw, 28px); align-items: start; margin-bottom: 40px; }
.lead-quote .mark { font: var(--display-weight) clamp(5rem, 12vw, 8.5rem)/.8 var(--font-section); color: var(--accent); }
.lead-quote blockquote { font: var(--display-weight) clamp(1.55rem, 3.6vw, 2.5rem)/1.2 var(--font-display); color: var(--primary); text-wrap: balance; max-width: 26ch; }
.lead-quote figcaption { grid-column: 2; margin-top: 14px; color: var(--muted); font-size: 1.05rem; }
/* Cada cita es un recorte de periódico: papel con grano, cortado a tijera (clip-path) y algo torcido.
   La sombra va en .quote-wrap con drop-shadow, porque clip-path recortaría un box-shadow. */
.medios {
  --paper: #f5efe0; --paper-ink: #2b2720; --paper-muted: #6d6452;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.quote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 30px 26px; align-items: start; padding-block: 6px; }
.quote-wrap { min-width: 0; filter: drop-shadow(0 1px 1px rgba(60, 45, 20, .18)) drop-shadow(0 6px 10px rgba(60, 45, 20, .14)); }
.quote { display: flex; flex-direction: column; gap: 10px; background: var(--grain), var(--paper); color: var(--paper-ink); padding: 20px 22px 18px; clip-path: var(--cut); transform: rotate(var(--rot)); }
.quote .cab { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid var(--paper-ink); font: 600 .78rem/1.2 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--paper-muted); }
.quote .cab a { color: var(--paper-ink); text-decoration: none; }
.quote .cab a:hover { text-decoration: underline; text-underline-offset: 3px; }
.quote blockquote { font-size: 1.15rem; line-height: 1.5; font-weight: 400; }
.quote figcaption { font-size: .92rem; font-style: italic; color: var(--paper-muted); }
/* Seis cortes y giros fijos que se repiten; salen de la maqueta notas/citas_recortes.src.html */
.quote-wrap:nth-child(6n+1) .quote { --rot: -0.02deg; --cut: polygon(0.9% 0.3%, 44.9% 0.5%, 99.2% 0.2%, 98.9% 50.9%, 99.3% 99.3%, 55.6% 99.2%, 0.1% 98.8%, 0.3% 51.7%); }
.quote-wrap:nth-child(6n+2) .quote { --rot: -0.82deg; --cut: polygon(0.9% 1.2%, 43.5% 0.1%, 98.5% 2.4%, 99.9% 49.4%, 98.5% 99.5%, 48.4% 99.3%, 1.1% 99.3%, 0.2% 54.9%); }
.quote-wrap:nth-child(6n+3) .quote { --rot: -0.13deg; --cut: polygon(0.4% 1.4%, 46.6% 0.2%, 98.8% 0.9%, 99.6% 45.8%, 98.5% 99.4%, 57.7% 99.4%, 0.4% 98.5%, 0.5% 52.6%); }
.quote-wrap:nth-child(6n+4) .quote { --rot: 0.37deg; --cut: polygon(0.2% 0.6%, 49% 0.1%, 99.9% 1%, 99.2% 51.5%, 98.5% 99.2%, 48.8% 99.4%, 0.7% 97.9%, 0.5% 49.4%); }
.quote-wrap:nth-child(6n+5) .quote { --rot: -0.57deg; --cut: polygon(0.4% 1.9%, 42.6% 0.3%, 98.8% 2.1%, 98.8% 54.3%, 98.6% 98.1%, 52.8% 99.3%, 0% 99.2%, 0.4% 47.2%); }
.quote-wrap:nth-child(6n) .quote { --rot: -0.26deg; --cut: polygon(1.1% 1.8%, 45.3% 1.1%, 100% 0.9%, 99.3% 49.4%, 99.9% 97.5%, 49.1% 99%, 0.9% 98.8%, 0.2% 52.9%); }
@media (prefers-reduced-motion: no-preference) {
  .quote { transition: transform .2s ease; }
  .quote-wrap:hover .quote { transform: rotate(0deg) scale(1.02); }
}

/* Cifras: las .facts de la portada, aquí con cuatro casillas y sin solapar nada */
.medios .facts { margin-top: 0; }
.medios .facts ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.medios .facts li { align-content: start; }
.medios .facts b { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.medios .facts span { line-height: 1.4; }

/* Hilo temporal */
.timeline { list-style: none; position: relative; max-width: 900px; margin: 0; padding: 0; }
.timeline::before { content: ""; position: absolute; left: 7.25rem; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--primary), var(--accent)); }
.tl-item { position: relative; display: grid; grid-template-columns: 6.25rem minmax(0, 1fr); gap: 0 2.5rem; padding-block: 0 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: calc(7.25rem - 7px); top: 8px; width: 17px; height: 17px; border-radius: 50%; background: var(--surface); border: 4px solid var(--primary); box-sizing: border-box; }
.tl-item.hito::before { background: var(--accent); border-color: var(--accent); }
.tl-year { font: var(--display-weight) 1.9rem/1 var(--font-section); color: var(--accent); text-align: right; padding-top: 2px; }
.tl-year small { display: block; font: 300 .85rem/1.3 var(--font-body); color: var(--muted); margin-top: 4px; }
.tl-body { min-width: 0; }
.tl-body h3 { font: var(--display-weight) 1.45rem/1.2 var(--font-display); color: var(--primary); margin: 0 0 6px; text-wrap: balance; }
.tl-body p { max-width: 62ch; margin: 0 0 8px; }
.tl-photo { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 18px; align-items: center; margin: 10px 0 6px; }
.tl-photo img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }
.tl-photo figcaption { font-size: .98rem; font-style: italic; color: var(--muted); }
.sources { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.sources a { display: inline-block; font-size: .92rem; font-weight: 400; background: var(--soft); color: var(--primary); padding: .25em .8em; border-radius: 999px; text-decoration: none; }
.sources a::after { content: " ↗"; font-size: .85em; }

/* Llamada final */
.call { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: center; }
.call h2 { font: var(--display-weight) clamp(1.5rem, 3vw, 2rem)/1.15 var(--font-display); color: var(--primary); margin: 0 0 8px; }
.call p { max-width: 56ch; }

@media (max-width: 900px) {
  .medios .facts ul { grid-template-columns: 1fr 1fr; }
  .medios .facts li:nth-child(2) { border-left: 1px solid var(--soft); border-top: 0; }
  .medios .facts li:nth-child(3) { border-left: 0; }
  .medios .facts li:nth-child(n+3) { border-top: 1px solid var(--soft); }
}
@media (max-width: 640px) {
  .timeline::before { left: 7px; }
  .tl-item { grid-template-columns: minmax(0, 1fr); padding-left: 34px; }
  .tl-item::before { left: 0; top: 4px; }
  .tl-year { text-align: left; margin-bottom: 8px; }
  .tl-year small { display: inline; margin-left: 8px; }
  .tl-photo { grid-template-columns: 1fr; }
  .call { grid-template-columns: 1fr; }
  .lead-quote { grid-template-columns: 1fr; }
  .lead-quote .mark { line-height: .6; height: .45em; }
  .lead-quote figcaption { grid-column: 1; }
}
