/* Páginas de noticias: listado, nota individual y 404. Usa la paleta de palette.css. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.news-page { background: var(--cream); }
.news-page .site-header .brand-motion { color: var(--blue); }

/* ---------- Listado ---------- */
.archive-main { padding-top: 74px; }
.archive.section { padding-top: clamp(60px, 7vw, 100px); min-height: 70vh; }
.archive-top { gap: 40px; align-items: end; }
.archive-top h1 { font-size: clamp(38px, 5vw, 68px); line-height: 1.02; letter-spacing: -.055em; margin: 0; color: var(--ink); text-wrap: balance; }
.archive-top h1 em { color: var(--blue); font-style: italic; font-weight: 400; }
.archive-count { margin: 18px 0 0; color: #5d6b80; font-size: 14px; }
.archive-search { position: relative; flex: 0 1 360px; display: flex; }
.archive-search input {
  width: 100%; padding: 16px 56px 16px 22px; border: 1px solid #8ba9c5; border-radius: 999px;
  background: #fffdfa; color: var(--ink); font: inherit; font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.archive-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px #a9dfe766; }
.archive-search button {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: var(--blue); color: #fff; cursor: pointer; display: grid; place-items: center;
}
.archive-search svg { width: 18px; fill: currentColor; }
.archive-filters { position: relative; z-index: 4; display: flex; flex-wrap: wrap; gap: 10px; margin: -14px 0 38px; }
.archive-filters a {
  padding: 10px 16px; border: 1px solid #c9d9e4; border-radius: 999px; background: #fffdfa; font-size: 12px; font-weight: 600; color: var(--blue);
  transition: background .2s, border-color .2s;
}
.archive-filters a small { margin-left: 4px; opacity: .6; font-weight: 500; }
.archive-filters a:hover { border-color: var(--blue); }
.archive-filters a.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.news-grid-archive, .news-grid-even { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.news-grid-archive .featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; }
.news-grid-archive .featured .news-image { height: 100%; min-height: 380px; }
.news-grid-archive h2, .news-grid-even h2 { font-size: clamp(17px, 1.45vw, 22px); line-height: 1.35; letter-spacing: -.025em; margin: 14px 0 18px; color: var(--ink); text-wrap: balance; }
.news-grid-archive .featured h2 { font-size: clamp(24px, 2.4vw, 34px); }
.news .news-grid-archive .news-card:nth-child(n) .news-image img { object-position: center 30%; }
.archive-empty { position: relative; z-index: 4; padding: 60px 0; text-align: center; font-size: 17px; }
.archive-empty .outline-button { display: inline-flex; margin-top: 12px; }
.pagination { position: relative; z-index: 4; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 56px; }
.pagination a, .pagination .dots {
  min-width: 44px; height: 44px; padding: 0 14px; display: grid; place-items: center; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--blue);
}
.pagination a { border: 1px solid #c9d9e4; background: #fffdfa; }
.pagination a:hover { border-color: var(--blue); }
.pagination a.current { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Nota ---------- */
.article-main { padding-top: 74px; }
.preview-banner { position: sticky; top: 74px; z-index: 40; padding: 10px 20px; background: var(--yellow); color: var(--ink); text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .06em; }

/* Cabecera: texto y foto lado a lado */
.article-hero {
  position: relative; overflow: hidden;
  padding: clamp(28px, 4vw, 56px) var(--section-x) clamp(32px, 4vw, 56px);
  background: radial-gradient(ellipse at 92% 8%, #cfe7ed 0%, transparent 42%), radial-gradient(ellipse at 4% 100%, #f3e3d6 0%, transparent 38%), var(--cream);
  border-bottom: 1px solid #e3ecf0;
}
.article-hero-inner { max-width: 1128px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.article-hero.no-media .article-hero-inner { grid-template-columns: minmax(0, 820px); justify-content: center; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #7a879a; margin-bottom: 22px; }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs span { opacity: .5; }
.article-chip { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid #e6d3b0; color: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.article-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }
.article-head h1 { margin: 0; font-size: clamp(27px, 2.7vw, 40px); line-height: 1.14; letter-spacing: -.035em; color: var(--ink); text-wrap: balance; }
.article-lead { margin: 18px 0 0; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.6; color: #4a5a70; }
.article-byline { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.byline-avatar { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.article-byline strong { display: block; font-size: 14px; color: var(--ink); }
.article-byline span { font-size: 12.5px; color: #6c7a90; }
.article-cover { margin: 0; }
.article-cover a { display: block; border-radius: 22px; overflow: hidden; box-shadow: 0 26px 60px #284f7c26; background: var(--mist); }
.article-cover img { width: 100%; aspect-ratio: 4 / 3; height: auto; max-height: 470px; object-fit: cover; transition: transform .6s ease; }
.article-cover a:hover img { transform: scale(1.02); }
.article-cover figcaption { margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: #6c7a90; }
.article-cover figcaption span { font-style: italic; opacity: .85; }
.article-video, .article-body .embed-video { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; box-shadow: 0 26px 60px #284f7c26; }
.article-video iframe, .article-video video, .article-body .embed-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Cuerpo: compartir | texto | últimas noticias */
.article-layout {
  max-width: 1240px; margin: 0 auto; padding: clamp(36px, 4.5vw, 64px) clamp(20px, 4vw, 56px) 20px;
  display: grid; grid-template-columns: 48px minmax(0, 720px) 270px; justify-content: space-between; gap: 32px; align-items: start;
}
.article-rail { position: sticky; top: 110px; display: grid; justify-items: center; gap: 10px; }
.article-rail > span { font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8b97a8; writing-mode: vertical-rl; transform: rotate(180deg); margin-bottom: 4px; }
.article-rail .share { flex-direction: column; }
.share { display: flex; gap: 8px; }
.share a, .share button {
  width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #d6e2ea; border-radius: 999px;
  background: #fff; color: var(--blue); cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; padding: 0; font: inherit;
}
.share a:hover, .share button:hover, .share button.copied { background: var(--blue); border-color: var(--blue); color: #fff; transform: translateY(-2px); }
.share svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.share em { font-style: normal; font-size: 13px; font-weight: 600; }
.share-labeled { flex-wrap: wrap; }
.share-labeled a, .share-labeled button { width: auto; padding: 0 16px 0 13px; }

.article-body { font-size: 17px; line-height: 1.8; color: #33445c; overflow-wrap: break-word; }
.article-body > * { margin: 0 0 1.15em; }
.article-body > p:first-of-type::first-letter { float: left; font-size: 3.3em; line-height: .9; font-weight: 700; color: var(--blue); margin: .08em .1em 0 0; }
.article-body p:empty { display: none; }
.article-body br + br { display: none; }
.article-body h2, .article-body h3, .article-body h4 { color: var(--ink); line-height: 1.3; letter-spacing: -.025em; margin: 1.7em 0 .55em; }
.article-body h2 { font-size: 25px; }
.article-body h3 { font-size: 21px; }
.article-body h4 { font-size: 18px; }
.article-body a { color: var(--blue); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.article-body strong, .article-body b { color: var(--ink); font-weight: 700; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li { margin-bottom: .4em; }
.article-body li::marker { color: var(--accent-ink); }
.article-body blockquote:not(.twitter-tweet):not(.instagram-media) {
  position: relative; margin: 2em 0; padding: 26px 28px 24px 64px; border-radius: 20px;
  background: linear-gradient(135deg, #fff8ea, #fdf3e3); border: 1px solid #f1e0bd;
  font-size: 19px; line-height: 1.6; font-style: italic; color: var(--ink);
}
.article-body blockquote:not(.twitter-tweet):not(.instagram-media)::before {
  content: "“"; position: absolute; left: 20px; top: 8px; font: 700 64px/1 Georgia, serif; color: var(--yellow);
}
.article-body blockquote p { margin: 0 0 .5em; }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body blockquote cite { display: block; margin-top: 10px; font-size: 13px; font-style: normal; font-weight: 600; color: var(--accent-ink); }
.article-body img { height: auto; border-radius: 16px; }
.article-body figure { margin: 1.8em 0; }
.article-body figcaption { margin-top: 10px; font-size: 13px; line-height: 1.5; color: #6c7a90; }
.article-body .alignleft, .article-body img[style*="float: left"] { float: left; max-width: 48%; margin: .3em 1.5em 1em 0; }
.article-body .alignright, .article-body img[style*="float: right"] { float: right; max-width: 48%; margin: .3em 0 1em 1.5em; }
.article-body .aligncenter { margin-left: auto; margin-right: auto; }
.article-body .wp-block-image img, .article-body > figure img { width: 100%; }
.article-body iframe { max-width: 100%; border: 0; border-radius: 16px; }
.article-body iframe[src*="youtube"], .article-body iframe[src*="vimeo"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.article-body video { width: 100%; border-radius: 16px; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.article-body th, .article-body td { padding: 10px 12px; border: 1px solid #d9e7ed; text-align: left; }
.article-body th { background: #eef6f8; }
.article-body hr { border: 0; height: 1px; background: #d9e7ed; margin: 2.5em 0; }
.article-body::after { content: ""; display: table; clear: both; }
.article-body .wp-block-columns { display: flex; flex-wrap: wrap; gap: 24px; }
.article-body .wp-block-column { flex: 1 1 240px; }
.article-body .wp-block-embed__wrapper { position: relative; }
.article-body .wp-block-embed.is-type-video .wp-block-embed__wrapper { aspect-ratio: 16 / 9; }
.article-body .wp-block-embed.is-type-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Galerías (las del cuerpo y la del panel): mosaico grande */
.article-body .wp-block-gallery, .article-body .gallery, .photo-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 2em 0; list-style: none;
}
.article-body .wp-block-gallery > figure, .article-body .gallery > * { margin: 0 !important; width: auto !important; }
.article-body .wp-block-gallery figure a, .photo-grid a { display: block; height: 100%; }
.article-body .wp-block-gallery img, .article-body .gallery img, .photo-grid img {
  width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 14px; transition: transform .5s ease, filter .3s;
}
.article-body .wp-block-gallery figure, .photo-grid a { overflow: hidden; border-radius: 14px; background: var(--mist); position: relative; }
.article-body .wp-block-gallery figure:hover img, .photo-grid a:hover img { transform: scale(1.04); }
/* Con cantidad impar, la primera foto va a lo ancho. */
.article-body .wp-block-gallery > figure:first-child:nth-last-child(odd), .photo-grid > a:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.article-body .wp-block-gallery > figure:first-child:nth-last-child(odd) img, .photo-grid > a:first-child:nth-last-child(odd) img { aspect-ratio: 16 / 9; }
.article-body .wp-block-gallery:has(> figure:nth-child(7)), .photo-grid:has(> a:nth-child(7)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.article-body .wp-block-gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 22px 12px 10px; font-size: 12px; color: #fff; background: linear-gradient(transparent, #0009); }
.article-gallery { margin-top: 2.4em; }
.article-gallery h2 { display: flex; align-items: baseline; gap: 10px; font-size: 20px; letter-spacing: -.02em; color: var(--ink); margin: 0 0 14px; }
.article-gallery h2 span { font-size: 12px; font-weight: 500; color: #6c7a90; letter-spacing: 0; }
.photo-grid { margin: 0; }

/* Cierre */
.article-end { margin-top: 44px; display: grid; gap: 22px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.article-tags a { padding: 7px 13px; border-radius: 999px; background: #e9f3f6; color: var(--blue); font-size: 12.5px; font-weight: 600; }
.article-tags a:hover { background: var(--cyan); }
.share-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px; border-radius: 20px; background: #fff; border: 1px solid #e3ecf0; box-shadow: 0 14px 40px #284f7c12; }
.share-card strong { display: block; font-size: 16px; color: var(--ink); }
.share-card span { font-size: 13px; color: #6c7a90; }

/* Últimas noticias */
.article-aside { position: sticky; top: 110px; }
.aside-box { padding: 20px; border-radius: 20px; background: #fff; border: 1px solid #e3ecf0; box-shadow: 0 14px 40px #284f7c10; }
.aside-box h2 { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.aside-box ol { list-style: none; margin: 0; padding: 0; }
.aside-box li + li { border-top: 1px solid #edf2f5; }
.aside-box li a { display: flex; gap: 12px; padding: 12px 0; align-items: flex-start; }
.aside-box img { width: 70px; height: 56px; flex: none; object-fit: cover; border-radius: 10px; }
.aside-box time { display: block; font-size: 10.5px; font-weight: 600; color: #8b97a8; margin-bottom: 3px; }
.aside-box b { font-size: 13px; line-height: 1.35; color: var(--ink); font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.aside-box li a:hover b { color: var(--blue); }
.aside-more { display: block; margin-top: 8px; padding-top: 12px; border-top: 1px solid #edf2f5; font-size: 12.5px; font-weight: 600; color: var(--blue); }
.related-news.section { padding-top: clamp(56px, 6vw, 84px); border-top: 1px solid #e3ecf0; }
.related-news h2 em { color: var(--blue); font-style: italic; font-weight: 400; }

/* Visor de fotos */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; padding: 24px; background: #0b1a2ef2; backdrop-filter: blur(6px); }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; justify-items: center; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 12px; box-shadow: 0 30px 80px #0008; }
.lightbox figcaption { display: flex; gap: 14px; margin-top: 14px; color: #fff; font-size: 14px; text-align: center; }
.lb-count { opacity: .6; white-space: nowrap; }
.lightbox button { width: 48px; height: 48px; border: 0; border-radius: 50%; background: #ffffff1f; color: #fff; font-size: 30px; line-height: 1; cursor: pointer; transition: background .2s; }
.lightbox button:hover { background: #ffffff38; }
.lb-close { position: absolute; top: 18px; right: 22px; font-size: 28px !important; }
.lb-prev { justify-self: start; }
.lb-next { justify-self: end; }
.lightbox.single .lb-prev, .lightbox.single .lb-next, .lightbox.single .lb-count { visibility: hidden; }

@media (max-width: 1180px) {
  .article-layout { grid-template-columns: 48px minmax(0, 1fr); }
  .article-aside { grid-column: 1 / -1; position: static; }
  .aside-box ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .aside-box li + li { border-top: 0; }
  .aside-box li { border-bottom: 1px solid #edf2f5; }
}
@media (max-width: 860px) {
  .article-hero-inner { grid-template-columns: 1fr; }
  .article-cover { order: -1; }
  .article-cover img { aspect-ratio: 16 / 10; max-height: 420px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .article-rail { display: none; }
}
@media (max-width: 620px) {
  .article-hero { padding-top: 20px; }
  .article-cover a { border-radius: 16px; }
  .article-head h1 { font-size: 26px; }
  .article-body { font-size: 16.5px; }
  .article-body blockquote:not(.twitter-tweet):not(.instagram-media) { font-size: 17px; padding: 22px 18px 18px 48px; }
  .article-body blockquote:not(.twitter-tweet):not(.instagram-media)::before { left: 12px; font-size: 50px; }
  .article-body .alignleft, .article-body .alignright { float: none; max-width: 100%; margin: 1em 0; }
  .article-body .wp-block-gallery, .article-body .gallery, .photo-grid { gap: 6px; }
  .article-body .wp-block-gallery:has(> figure:nth-child(7)), .photo-grid:has(> a:nth-child(7)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aside-box ol { grid-template-columns: 1fr; }
  .share-labeled a, .share-labeled button { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .lightbox { grid-template-columns: 1fr; padding: 60px 10px 24px; }
  .lb-prev, .lb-next { position: absolute; bottom: 20px; }
  .lb-prev { left: 20px; }
  .lb-next { right: 20px; }
}

@media (max-width: 980px) {
  .news-grid-archive, .news-grid-even { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .archive-top { flex-direction: column; align-items: stretch; }
  .archive-search { flex-basis: auto; }
}
@media (max-width: 620px) {
  .news .news-grid-archive { display: grid !important; grid-template-columns: 1fr !important; margin-right: 0; padding-right: 0; overflow: visible; }
  .news .news-grid-archive .news-card, .news .news-grid-archive .featured { min-width: 0; display: flex; }
  .news-grid-archive .featured { grid-template-columns: 1fr; }
  .news-grid-archive .featured .news-image { min-height: 0; height: 240px; }
}
