/* Noticias: the article page, the listing and the «Lo último» block on the
   home page. Pages are generated by herramientas/noticias.py; every block of
   the article text uses the site's own pieces (sticky notes, handwriting,
   organic photo masks, colour shapes). --accent is each story's colour. */
.news-page .site-header a[aria-current=page] { color: var(--pink-dark); border-bottom: 2px solid var(--pink); padding-block: 8px; }

/* --- Cards (listing, «Lo último», «Más noticias») ----------------------- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 50px 34px; }
.news-card { display: flex; flex-direction: column; }
.news-card-image { display: block; position: relative; overflow: hidden; margin-bottom: 22px; background: #f0eeee; border-radius: 48% 48% 8px 8px / 42% 42% 8px 8px; }
.news-card:nth-child(3n+2) .news-card-image { border-radius: 8px 8px 48% 48% / 8px 8px 42% 42%; }
.news-card:nth-child(3n+3) .news-card-image { border-radius: 52% 44% 49% 41% / 46% 52% 44% 50%; }
.news-card-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.news-card-image::after { content: ''; position: absolute; inset: auto 0 0; height: 6px; background: var(--accent); }
.news-card:hover .news-card-image img { transform: scale(1.06); }
.news-card-meta { font-size: 12px; letter-spacing: .06em; color: #606060; margin-bottom: 10px; }
.news-card h3 { font-size: 22px; line-height: 1.2; margin-bottom: 12px; }
.news-card h3 a:hover { color: var(--pink-dark); }
.news-card h3 .handwritten { color: var(--pink); font-size: 1.12em; }
.news-card-copy > p:not(.news-card-meta) { font-size: 15px; line-height: 1.65; margin-bottom: 18px; flex-grow: 1; }
.news-card-copy { display: flex; flex-direction: column; flex-grow: 1; }
.news-card .text-link { align-self: flex-start; font-size: 12px; margin-top: auto; }
.news-draft-badge { margin-left: 10px; padding: 2px 8px; border-radius: 999px; background: var(--note-yellow); color: var(--ink); font-weight: 700; }

.news-card-featured { display: grid; grid-template-columns: 1.15fr 1fr; gap: 60px; align-items: center; margin-bottom: 90px; }
.news-card-featured .news-card-image { margin-bottom: 0; border-radius: 51% 49% 43% 57% / 45% 56% 44% 55%; transform: rotate(-2deg); }
.news-card-featured h3 { font-size: clamp(1.8rem, 3.2vw, 2.8rem); letter-spacing: -.045em; }
.news-card-featured .news-card-copy > p:not(.news-card-meta) { font-size: 18px; flex-grow: 0; }

/* --- Home block --------------------------------------------------------- */
.news-home { background: #fff; padding-top: 30px; padding-bottom: calc(110px + var(--curve-h)); }
.news-home > .section-wrap { border-top: 1px solid var(--line); padding-top: 80px; }
.news-home .section-heading { align-items: center; }

/* --- Listing page ------------------------------------------------------- */
.news-list-hero { position: relative; padding-block: 80px 70px; }
.news-list-hero h1, .news-hero h1 { font-size: clamp(2.6rem, 5.4vw, 5rem); font-weight: 750; letter-spacing: -.055em; line-height: 1.06; margin-bottom: 24px; }
.news-list-hero h1 .handwritten, .news-hero h1 .handwritten { color: var(--pink); letter-spacing: -.06em; }
.news-lead { font-size: 20px; line-height: 1.55; max-width: 620px; }
.news-list { padding-bottom: calc(110px + var(--curve-h)); }
.news-empty { width: 260px; margin: 20px auto 60px; font-size: 30px; text-align: center; --note-angle: -4deg; }
.news-list-hero .news-deco-accent, .news-hero .news-deco-accent { --size: clamp(200px, 24vw, 360px); --blob: var(--accent, var(--deco-lime)); top: -40px; right: -6vw; }
.news-list-hero .news-deco-dot, .news-hero .news-deco-dot { --size: clamp(34px, 3.4vw, 54px); --blob: var(--pink); left: -5vw; top: 46%; }
.news-hero .news-deco-ring { --size: clamp(80px, 9vw, 130px); --blob: var(--deco-teal); --ring: clamp(10px, 1.2vw, 16px); left: 40%; bottom: 0; }

/* --- Article ------------------------------------------------------------ */
.news-draft-ribbon { position: sticky; top: 104px; z-index: 40; margin: 0; padding: 8px 16px; background: var(--note-yellow); text-align: center; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.news-hero { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; align-items: center; padding-block: 70px 120px; }
.news-hero .eyebrow a { border-bottom: 1px solid currentColor; }
.news-hero .eyebrow a:hover { color: var(--pink-dark); }
.news-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 26px 0 0; }
.news-tags li { padding: 5px 13px; border: 1px solid var(--ink); border-radius: 999px; font-size: 12px; font-weight: 600; }
.news-cover { position: relative; margin: 0; }
.news-cover img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 51% 49% 43% 57% / 45% 56% 44% 55%; transform: rotate(3deg); }

/* The text sits on a white sheet that rises over the hero with the site's curve. */
.news-body-wrap { background: #fff; --curve-fill: #fff; padding-block: 40px calc(110px + var(--curve-h)); }
.news-body { display: flow-root; max-width: 720px; font-size: 18px; line-height: 1.8; }
.news-body > * + * { margin-top: 26px; }
.news-body > p:first-child { font-size: 22px; line-height: 1.6; letter-spacing: -.01em; }
.news-body h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-top: 70px; line-height: 1.15; }
.news-body h3 { font-size: 22px; margin-top: 44px; }
.news-body h2 .handwritten, .news-body h3 .handwritten { color: var(--pink); }
.news-body a:not(.button) { color: var(--pink-dark); text-decoration: underline; text-underline-offset: 3px; }
.news-body ul, .news-body ol { padding-left: 24px; }
.news-body li + li { margin-top: 8px; }
.news-body li::marker { color: var(--pink); font-weight: 700; }
.news-body code { font-size: .85em; background: #f4f3f4; padding: 2px 6px; border-radius: 4px; }

/* Wide blocks break out of the reading column. With margins, not a transform:
   replica.js reveals blocks by animating transform. */
.news-body .news-wide { width: min(1100px, 92vw); margin-left: calc((100% - min(1100px, 92vw)) / 2); }
.news-body > .news-wide { margin-top: 50px; margin-bottom: 20px; }

.news-figure { margin-inline: 0; }
.news-figure img { display: block; width: 100%; max-width: var(--max, 100%); margin-inline: auto; border-radius: 8px; }
.news-figure figcaption { margin-top: 12px; font-size: 14px; color: #606060; }
.news-figure-wide img { border-radius: 44% 56% 12px 12px / 18% 22% 12px 12px; max-height: 80vh; object-fit: cover; }
.news-figure-tilted { margin-block: 60px; }
.news-figure-tilted img { border-radius: 45% 55% 49% 41%; transform: rotate(-4deg); aspect-ratio: 16 / 10; object-fit: cover; }
.news-figure-tilted figcaption { font-family: Kalam, cursive; font-weight: 700; font-size: 26px; letter-spacing: -.04em; color: var(--pink-dark); text-align: center; transform: rotate(-3deg); margin-top: 22px; }

.news-note { font-size: 28px; line-height: 1.15; text-align: center; width: 240px; padding: 30px 22px; --note-angle: 5deg; margin-inline: auto; }
@media (min-width: 1250px) {
  /* On wide screens the notes hang in the margin next to the text. */
  .news-body > .news-note { float: right; clear: right; margin: 6px -290px 30px 40px; }
  .news-body > .news-note:nth-of-type(even) { float: left; clear: left; margin: 6px 40px 30px -290px; --note-angle: -6deg; }
}

.news-quote { position: relative; margin: 60px 0; padding: 10px 0 0 62px; }
.news-quote::before { content: '“'; position: absolute; left: -6px; top: -34px; font-family: Kalam, cursive; font-weight: 700; font-size: 130px; line-height: 1; color: var(--accent, var(--pink)); }
.news-quote p { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; line-height: 1.3; letter-spacing: -.035em; }
.news-quote cite { display: block; margin-top: 16px; font-style: normal; font-size: 14px; font-weight: 600; color: #606060; }
.news-quote cite::before { content: '— '; color: var(--pink); }

.news-divider { border: 0; height: 14px; width: 120px; margin: 60px auto !important; background: var(--pink); mask: url('/assets/594c8f6fbea4b24b.svg') center / 100% 100% no-repeat; -webkit-mask: url('/assets/594c8f6fbea4b24b.svg') center / 100% 100% no-repeat; }

.news-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 30px; padding: 46px 40px; border-radius: 16px; background: var(--pink-light); text-align: center; }
.news-stat strong { display: block; font-size: clamp(3.6rem, 7vw, 6rem); line-height: 1; color: var(--pink); }
.news-stat strong span { font-variant-numeric: tabular-nums; }
.news-stat > span { display: block; margin-top: 10px; font-size: 15px; font-weight: 600; line-height: 1.4; }

.news-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 14px; }
.news-gallery-item { position: relative; overflow: hidden; padding: 0; border: 0; border-radius: 10px; background: #f0eeee; cursor: zoom-in; }
.news-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.16,1,.3,1); }
.news-gallery-item:hover img { transform: scale(1.06); }
/* noticias.py gives each photo its span so the mosaic never leaves holes. */
.news-gallery-item { grid-column: span var(--c, 1); grid-row: span var(--r, 1); }
.news-gallery-item:first-child { border-radius: 48% 48% 10px 10px / 30% 30% 10px 10px; }

.news-video { margin-inline: 0; }
.news-video-play { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 16px; background: radial-gradient(circle at 30% 30%, var(--accent, var(--deco-lime)), var(--ink) 75%); color: #fff; font-weight: 700; font-size: 18px; cursor: pointer; }
.news-video-play span { display: grid; place-items: center; width: 84px; height: 84px; margin-bottom: 8px; border-radius: 50%; background: var(--pink); font-size: 30px; transition: transform .3s; }
.news-video-play:hover span { transform: scale(1.1); }
.news-video-play small { font-size: 12px; font-weight: 500; opacity: .75; }
.news-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 16px; }
.news-video figcaption { margin-top: 12px; font-size: 14px; color: #606060; }

.news-share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; max-width: 720px; margin-top: 80px; padding-top: 28px; border-top: 1px solid var(--line); }
.news-share div { display: flex; flex-wrap: wrap; gap: 10px; }
.news-share a, .news-copy-link { padding: 8px 16px; border: 1px solid var(--ink); border-radius: 999px; background: none; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.news-share a:hover, .news-copy-link:hover { background: var(--ink); color: #fff; }

.news-more { padding-block: 40px calc(110px + var(--curve-h)); }
.news-more h2 { margin-bottom: 50px; }
.news-more .button { margin-top: 50px; }

/* Lightbox for the gallery. */
.news-lightbox { width: min(1200px, 94vw); max-height: 92vh; padding: 0; border: 0; background: none; overflow: visible; }
.news-lightbox::backdrop { background: rgb(20 20 20 / .86); backdrop-filter: blur(4px); }
.news-lightbox img { display: block; max-width: 100%; max-height: 80vh; margin: auto; border-radius: 8px; }
.news-lightbox p { margin-top: 14px; color: #fff; text-align: center; font-size: 15px; }
.news-lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #fff; border-radius: 50%; background: rgb(0 0 0 / .3); color: #fff; font-size: 22px; cursor: pointer; }
.news-lightbox [data-close] { top: -60px; right: 0; }
.news-lightbox [data-prev] { left: -64px; top: 40%; }
.news-lightbox [data-next] { right: -64px; top: 40%; }

@media (max-width: 1100px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-lightbox [data-prev] { left: 8px; }
  .news-lightbox [data-next] { right: 8px; }
}
@media (max-width: 800px) {
  .news-hero, .news-card-featured { grid-template-columns: 1fr; gap: 40px; }
  .news-hero { padding-block: 40px 90px; }
  .news-list-hero { padding-block: 50px 50px; }
  .news-lead { font-size: 18px; }
  .news-body { font-size: 17px; }
  .news-body > p:first-child { font-size: 19px; }
  .news-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .news-gallery-item { grid-column: span var(--cm, 1); grid-row: span var(--rm, 1); }
  .news-stats { padding: 34px 20px; }
  .news-quote { padding-left: 44px; }
  .news-quote::before { font-size: 100px; top: -26px; }
  .news-list, .news-home, .news-body-wrap, .news-more { padding-bottom: calc(75px + var(--curve-h)); }
  .news-draft-ribbon { top: 85px; font-size: 12px; }
  .news-list-hero .news-deco-accent, .news-hero .news-deco-accent { --size: clamp(120px, 34vw, 180px); top: -30px; right: -14vw; }
}
@media (max-width: 560px) {
  .news-grid { grid-template-columns: 1fr; }
}
