/* ==========================================================================
   Jobs&Sea · Noticias y respuestas (/noticias y /noticias/:slug)
   Se apoya en home-story.css y story-chapters.css (capítulos, kicker, títulos,
   travesía, puerto, dock) y añade solo lo propio de esta sección:
   - Portada: hero con buscador de dudas, preguntas frecuentes y rejilla de guías.
   - Artículo: hero de imagen, respuesta rápida, índice fijo, cuerpo legible,
     preguntas relacionadas, fuentes oficiales y «cómo se mantiene esta guía».
   Regla de oro (igual que story-chapters): nada de transform/filter en
   ancestros de formularios; las piezas entran con data-story-reveal.
   ========================================================================== */

.news-page {
  --news-rose: #e0457f;
  --news-rose-deep: #c83572;
  --news-teal: #11766b;
  --news-line: rgba(18, 49, 84, 0.12);
  --news-soft: #f3f6fa;
  --news-reading: 44rem;
}

/* --------------------------------------------------------------------------
   Hero de la portada: foto de puerto, título y buscador de dudas
   -------------------------------------------------------------------------- */

.news-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: min(92svh, 860px);
  place-items: center;
  overflow: hidden;
  padding: clamp(7rem, 14vh, 9rem) var(--story-gutter) clamp(4rem, 9vh, 6rem);
  color: #ffffff;
  text-align: center;
}

.news-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  margin: 0;
}

.news-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

.news-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 60% at 50% 30%, rgba(13, 35, 54, 0.35), rgba(13, 35, 54, 0.82) 75%),
    linear-gradient(180deg, rgba(13, 35, 54, 0.15), rgba(13, 35, 54, 0.92));
}

.news-hero__inner {
  display: grid;
  width: min(100%, 980px);
  justify-items: center;
  gap: 1.4rem;
}

.news-hero__title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.4rem, 6.2vw, 5.4rem);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.news-hero__lead {
  max-width: 46ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
}

/* Buscador: misma silueta que la barra del agente de Tripulantes. */
.news-search {
  position: relative;
  width: min(100%, 760px);
  margin-top: 0.6rem;
  text-align: left;
}

.news-search__bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 66px;
  padding: 0.45rem 0.5rem 0.45rem 1.4rem;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(255, 255, 255, 0.14);
}

.news-search__bar svg {
  width: 1.3rem;
  height: 1.3rem;
  flex: none;
  fill: none;
  stroke: #6b7f95;
  stroke-width: 2;
  stroke-linecap: round;
}

.news-search__bar input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--story-ink);
  font: inherit;
  font-size: 1.08rem;
  outline: none;
}

.news-search__bar input::placeholder {
  color: #7d8ea2;
}

.news-search__go {
  display: inline-grid;
  width: 52px;
  height: 52px;
  flex: none;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #ef5a92, var(--news-rose-deep));
  box-shadow: 0 10px 22px -10px rgba(200, 53, 114, 0.9);
  cursor: pointer;
}

.news-search__go svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.news-search__results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  display: grid;
  max-height: min(60vh, 420px);
  overflow: auto;
  padding: 0.5rem;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.5);
}

.news-search__results[hidden] {
  display: none;
}

.news-search__results a {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  color: var(--story-ink);
  text-decoration: none;
}

.news-search__results a:hover,
.news-search__results a[aria-selected="true"] {
  background: var(--news-soft);
}

.news-search__results strong {
  font-size: 0.98rem;
}

.news-search__results small {
  color: var(--story-muted);
  font-size: 0.84rem;
}

.news-search__empty {
  margin: 0;
  padding: 0.9rem;
  color: var(--story-muted);
  font-size: 0.92rem;
}

.news-hero__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 860px;
}

.news-hero__pills a {
  padding: 0.55rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 200ms var(--story-ease), border-color 200ms var(--story-ease);
}

.news-hero__pills a:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.2);
}

.news-hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.6rem;
  margin: 0.4rem 0 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  list-style: none;
}

.news-hero__stats strong {
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Preguntas frecuentes (portada y artículo)
   -------------------------------------------------------------------------- */

.news-faq {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.news-faq__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.news-faq__item {
  border: 1px solid var(--news-line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(13, 35, 54, 0.04);
  transition: box-shadow 260ms var(--story-ease), border-color 260ms var(--story-ease);
}

.news-faq__item[open] {
  border-color: rgba(18, 49, 84, 0.22);
  box-shadow: 0 26px 50px -30px rgba(13, 35, 54, 0.45);
}

.news-faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  color: var(--story-ink);
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
  font-weight: 700;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.news-faq__item summary::-webkit-details-marker {
  display: none;
}

.news-faq__item summary::after {
  content: "";
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--news-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23123154' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M8 3v10M3 8h10'/%3E%3C/svg%3E") no-repeat center;
  transition: transform 260ms var(--story-ease), background-color 260ms var(--story-ease);
}

.news-faq__item[open] summary::after {
  background-color: #e5ecf5;
  transform: rotate(45deg);
}

.news-faq__answer {
  display: grid;
  gap: 0.9rem;
  padding: 0 1.4rem 1.4rem;
  color: var(--story-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.news-faq__answer p {
  margin: 0;
}

.news-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--story-blue);
  font-weight: 700;
  text-decoration: none;
}

.news-link svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: translate 200ms var(--story-ease);
}

.news-link:hover svg {
  translate: 3px 0;
}

/* --------------------------------------------------------------------------
   Rejilla de guías con filtros por ruta
   -------------------------------------------------------------------------- */

.news-library {
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.6rem;
}

.news-filters a,
.news-filters button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0 1.1rem;
  border: 1px solid var(--news-line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--story-navy);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.news-filters .is-active,
.news-filters [aria-pressed="true"] {
  border-color: var(--story-navy);
  background: var(--story-navy);
  color: #ffffff;
}

.news-filters small {
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-card {
  position: relative;
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(13, 35, 54, 0.05), 0 30px 60px -44px rgba(13, 35, 54, 0.5);
  transition: translate 320ms var(--story-ease), box-shadow 320ms var(--story-ease);
}

.news-card:hover {
  translate: 0 -4px;
  box-shadow: 0 1px 2px rgba(13, 35, 54, 0.05), 0 40px 70px -40px rgba(13, 35, 54, 0.6);
}

.news-card__media {
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
  background: #dbe5ef;
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 700ms var(--story-ease);
}

.news-card:hover .news-card__media img {
  scale: 1.04;
}

.news-card__body {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 0.7rem;
  padding: 1.4rem 1.5rem 1.6rem;
}

.news-card__route {
  justify-self: start;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--news-soft);
  color: var(--story-blue);
  font-size: 0.8rem;
  font-weight: 750;
}

.news-card h3 {
  margin: 0;
  color: var(--story-ink);
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
}

.news-card h3 a {
  color: inherit;
  text-decoration: none;
}

/* Toda la tarjeta es enlace. */
.news-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.news-card p {
  margin: 0;
  color: var(--story-muted);
  font-size: 0.97rem;
  line-height: 1.55;
}

.news-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  margin-top: auto;
  padding-top: 0.6rem;
  color: #7d8ea2;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.news-card--feature {
  grid-column: span 2;
  flex-direction: row;
}

.news-card--feature .news-card__media {
  width: 55%;
  aspect-ratio: auto;
  flex: none;
}

.news-card--feature h3 {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
}

.news-more {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   Puerto: «¿No encuentras tu duda?» (formulario que alimenta al Agente)
   -------------------------------------------------------------------------- */

.news-ask {
  display: grid;
  width: min(100%, 720px);
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.news-ask textarea {
  min-height: 110px;
  padding: 1rem 1.2rem;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--story-ink);
  font: inherit;
  font-size: 1.02rem;
  resize: vertical;
}

.news-ask__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.news-ask__note {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
}

.news-ask__note a {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Artículo
   -------------------------------------------------------------------------- */

.news-article-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: min(84svh, 780px);
  align-items: end;
  overflow: hidden;
  padding: 8rem var(--story-gutter) clamp(6rem, 12vh, 8rem);
  color: #ffffff;
}

.news-article-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  margin: 0;
}

.news-article-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-article-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(13, 35, 54, 0.2) 0%, rgba(13, 35, 54, 0.45) 45%, rgba(13, 35, 54, 0.94) 100%);
}

.news-article-hero__inner {
  display: grid;
  width: min(100%, 1100px);
  gap: 1.1rem;
  margin-inline: auto;
}

.news-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  list-style: none;
}

.news-crumbs a {
  color: inherit;
  text-decoration: none;
}

.news-crumbs a:hover {
  color: #ffffff;
}

.news-crumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  opacity: 0.5;
}

.news-article-hero h1 {
  max-width: 22ch;
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.2rem, 5.4vw, 4.6rem);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1;
  text-wrap: balance;
}

.news-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.4rem;
  margin: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  list-style: none;
}

.news-article-meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.news-article-meta svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.news-article-meta .news-card__route {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* Hoja que sube sobre la foto, como en Tripulantes. */
.news-article {
  position: relative;
  z-index: 5;
  margin-top: clamp(-4rem, -7vh, -3rem);
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(4rem, 8vw, 7rem);
  border-radius: clamp(28px, 3vw, 44px) clamp(28px, 3vw, 44px) 0 0;
  background: #ffffff;
  box-shadow: 0 -30px 60px rgba(13, 35, 54, 0.2);
}

.news-quick {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.4rem 1.2rem;
  width: min(100% - 2 * var(--story-gutter), 1100px);
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border-radius: 28px;
  background: linear-gradient(135deg, #0f2643, #173f6c);
  box-shadow: 0 30px 60px -36px rgba(13, 35, 54, 0.8);
  color: #ffffff;
}

.news-quick__icon {
  display: grid;
  width: 52px;
  height: 52px;
  grid-row: span 2;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.news-quick__icon svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: #7fe7df;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.news-quick h2 {
  margin: 0;
  color: #9fd8ff;
  font-size: 1rem;
  font-weight: 750;
}

.news-quick p {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 560;
  line-height: 1.45;
  text-wrap: pretty;
}

.news-article__layout {
  display: grid;
  grid-template-columns: minmax(200px, 270px) minmax(0, var(--news-reading));
  justify-content: center;
  gap: clamp(2rem, 5vw, 5rem);
  width: min(100% - 2 * var(--story-gutter), 1100px);
  margin-inline: auto;
}

.news-toc {
  position: sticky;
  top: 110px;
  align-self: start;
}

.news-toc h2 {
  margin: 0 0 0.8rem;
  color: var(--story-ink);
  font-size: 0.95rem;
  font-weight: 750;
}

.news-toc ol {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.news-toc a {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  border-radius: 12px;
  color: var(--story-muted);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  counter-increment: toc;
  transition: background-color 200ms var(--story-ease), color 200ms var(--story-ease);
}

.news-toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: #9aabbd;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1.7;
}

.news-toc a:hover {
  background: var(--news-soft);
  color: var(--story-ink);
}

.news-toc a.is-current {
  background: var(--news-soft);
  color: var(--story-ink);
}

.news-toc a.is-current::before {
  color: var(--news-rose-deep);
}

/* Cuerpo legible. */
.news-prose {
  min-width: 0;
  color: #2c4259;
  font-size: 1.09rem;
  line-height: 1.75;
}

.news-prose > section {
  scroll-margin-top: 110px;
}

.news-prose > section + section {
  margin-top: clamp(2.4rem, 4vw, 3.4rem);
}

.news-prose h2 {
  margin: 0 0 1rem;
  color: var(--story-ink);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 760;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

.news-prose h3 {
  margin: 1.8rem 0 0.6rem;
  color: var(--story-ink);
  font-size: 1.2rem;
  font-weight: 750;
}

.news-prose p {
  margin: 0 0 1.1rem;
}

.news-prose ul,
.news-prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.3rem;
}

.news-prose li {
  margin: 0.35rem 0;
}

.news-prose li::marker {
  color: var(--news-rose-deep);
  font-weight: 700;
}

.news-prose strong {
  color: var(--story-ink);
}

.news-prose a {
  color: var(--story-blue);
  font-weight: 650;
  text-underline-offset: 3px;
}

.news-prose figure {
  margin: 1.8rem 0;
}

.news-prose figure img {
  width: 100%;
  height: auto;
  border-radius: 22px;
}

.news-prose figcaption {
  margin-top: 0.5rem;
  color: #7d8ea2;
  font-size: 0.85rem;
}

/* Pasos numerados: el agente los marca con <ol class="news-steps">. */
.news-prose ol.news-steps {
  display: grid;
  gap: 0.9rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.news-prose ol.news-steps > li {
  position: relative;
  margin: 0;
  padding: 1.1rem 1.2rem 1.1rem 4rem;
  border-radius: 20px;
  background: var(--news-soft);
  counter-increment: step;
}

.news-prose ol.news-steps > li::before {
  content: counter(step);
  position: absolute;
  top: 1rem;
  left: 1.1rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--story-navy);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
}

/* Nota destacada: <aside class="news-note">. */
.news-prose .news-note {
  margin: 1.6rem 0;
  padding: 1.1rem 1.3rem;
  border: 1px solid #f3d6a2;
  border-radius: 20px;
  background: #fff8ea;
  color: #6b4a12;
  font-size: 1rem;
}

.news-prose .news-note p:last-child {
  margin: 0;
}

/* Tabla comparativa: <div class="news-table"><table>…</table></div>. */
.news-prose .news-table {
  margin: 1.6rem 0;
  overflow-x: auto;
  border: 1px solid var(--news-line);
  border-radius: 20px;
}

.news-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.news-prose th,
.news-prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--news-line);
  text-align: left;
  vertical-align: top;
}

.news-prose th {
  background: var(--news-soft);
  color: var(--story-ink);
  font-weight: 750;
}

.news-prose tr:last-child td {
  border-bottom: 0;
}

/* Bloques del final del artículo. */
.news-article__after {
  display: grid;
  gap: clamp(2.4rem, 5vw, 4rem);
  width: min(100% - 2 * var(--story-gutter), 1100px);
  margin: clamp(3rem, 6vw, 5rem) auto 0;
}

.news-block h2 {
  margin: 0 0 1.2rem;
  color: var(--story-ink);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 760;
  letter-spacing: -0.03em;
}

.news-sources {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-sources a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--news-line);
  border-radius: 18px;
  color: var(--story-ink);
  text-decoration: none;
  transition: border-color 200ms var(--story-ease), background-color 200ms var(--story-ease);
}

.news-sources a:hover {
  border-color: rgba(18, 49, 84, 0.25);
  background: var(--news-soft);
}

.news-sources__badge {
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  background: #e7f4f1;
  color: var(--news-teal);
  font-size: 0.76rem;
  font-weight: 800;
}

.news-sources strong {
  display: block;
  font-size: 0.98rem;
}

.news-sources small {
  color: #7d8ea2;
  font-size: 0.82rem;
}

.news-sources svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: #7d8ea2;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* «Cómo se mantiene esta guía». */
.news-care {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1.1rem;
  padding: 1.3rem 1.5rem;
  border-radius: 24px;
  background: var(--news-soft);
  color: var(--story-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.news-care p {
  margin: 0;
}

.news-care strong {
  color: var(--story-ink);
}

.news-care__eyes {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 30%, #1d2a36, #0b1219 70%);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.8);
}

.news-care__eyes::before,
.news-care__eyes::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 11px;
  height: 3.5px;
  border-radius: 2px;
  background: #5ee6e0;
  box-shadow: 0 0 8px rgba(94, 230, 224, 0.85);
  transform: translateY(-50%);
}

.news-care__eyes::before { left: 11px; }
.news-care__eyes::after { right: 11px; }

/* Siguientes pasos: curso de Nedland, empleos y CV. */
.news-next {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.news-next a {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  min-height: 190px;
  padding: 1.5rem;
  border-radius: 26px;
  background: var(--story-navy);
  color: #ffffff;
  text-decoration: none;
  transition: translate 300ms var(--story-ease), box-shadow 300ms var(--story-ease);
}

.news-next a:hover {
  translate: 0 -4px;
  box-shadow: 0 30px 50px -30px rgba(13, 35, 54, 0.8);
}

.news-next a:nth-child(1) {
  background: linear-gradient(135deg, #b53a7f, #e0457f);
}

.news-next a:nth-child(3) {
  background: linear-gradient(135deg, #11766b, #1a9a8b);
}

.news-next small {
  opacity: 0.8;
  font-size: 0.85rem;
  font-weight: 700;
}

.news-next strong {
  font-size: 1.3rem;
  line-height: 1.2;
}

.news-next span {
  opacity: 0.86;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-article__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-toc {
    position: static;
    padding: 1.1rem 1.2rem;
    border-radius: 22px;
    background: var(--news-soft);
  }
}

@media (max-width: 760px) {
  .news-faq__grid,
  .news-grid,
  .news-next {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-card--feature {
    grid-column: auto;
    flex-direction: column;
  }

  .news-card--feature .news-card__media {
    width: 100%;
    aspect-ratio: 16 / 10;
  }

  .news-search__bar {
    min-height: 58px;
    padding-left: 1.1rem;
  }

  .news-search__go {
    width: 46px;
    height: 46px;
  }

  .news-quick {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-quick__icon {
    grid-row: auto;
  }

  .news-care {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-sources a {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .news-sources__badge {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-card,
  .news-card__media img,
  .news-next a,
  .news-faq__item summary::after {
    transition: none;
  }
}

/* Páginas legales: cabecera corta sin foto y enlaces entre documentos. */
.news-article-hero--plain {
  min-height: auto;
  padding-top: clamp(8rem, 16vh, 10rem);
  padding-bottom: clamp(5rem, 9vh, 6.5rem);
  background:
    radial-gradient(70% 90% at 90% 0%, rgba(181, 58, 127, 0.28), transparent 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(31, 99, 177, 0.35), transparent 60%),
    linear-gradient(135deg, #0d2336, #123154);
}

.news-article-hero--plain::after {
  display: none;
}

.legal-lead {
  max-width: 60ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.5;
}

.legal-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--news-line);
}

.legal-docs a {
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--news-line);
  border-radius: 999px;
  color: var(--story-navy);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-docs a[aria-current="page"] {
  border-color: var(--story-navy);
  background: var(--story-navy);
  color: #ffffff;
}

/* Guía con un solo apartado: sin índice, el texto se centra. */
.news-article__layout:not(:has(.news-toc)) {
  grid-template-columns: minmax(0, var(--news-reading));
}

/* --------------------------------------------------------------------------
   Cabecera flotante integrada en Noticias, guías y páginas legales:
   se coloca sobre la foto como en Tripulantes y Empresas y reaparece al subir
   (scroll-header.js).
   -------------------------------------------------------------------------- */
.news-body .secondary-floating-header,
.legal-body .secondary-floating-header {
  position: absolute;
  top: clamp(1rem, 2vw, 2rem);
  left: 50%;
  z-index: 11000;
  width: min(calc(100% - 3rem), 1520px);
  margin: 0;
  transform: translateX(-50%);
  animation: newsHeaderDrop 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes newsHeaderDrop {
  from { opacity: 0; transform: translate(-50%, -24px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

body.news-body,
body.legal-body {
  background: #0d2336;
}

@media (max-width: 640px) {
  .news-body .secondary-floating-header,
  .legal-body .secondary-floating-header {
    width: calc(100% - 1.5rem);
    top: max(0.75rem, env(safe-area-inset-top));
  }
}

/* --------------------------------------------------------------------------
   Hero de Noticias con el asistente (misma carcasa que Tripulantes y Empresas)
   -------------------------------------------------------------------------- */
.home-hero.news-hero-agent {
  display: flex;
  min-height: max(100svh, 760px);
  flex-direction: column;
  padding: calc(clamp(1rem, 2vw, 2rem) + 72px + 1.8rem) 1.5rem 6.5rem;
  background: #0d2336;
  isolation: isolate;
}

.news-hero-agent__media,
.news-hero-agent__media img {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: 70% center;
}

.news-hero-agent .home-hero-overlay {
  background:
    linear-gradient(90deg, rgba(4, 20, 36, 0.62) 0%, rgba(4, 20, 36, 0.36) 42%, rgba(4, 20, 36, 0.08) 75%),
    linear-gradient(180deg, rgba(4, 20, 36, 0.28) 0%, transparent 40%, rgba(4, 20, 36, 0.45) 100%);
}

.news-hero-agent .home-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 0;
}

.news-hero-agent .home-hero-copy h1 {
  white-space: normal;
  text-wrap: balance;
}

.news-hero-agent .home-agent-bar input {
  min-width: 0;
}

.news-hero-agent .home-agent-quick {
  margin-top: auto;
  padding-top: 0.38rem;
}

.news-hero-agent .home-scroll-cue {
  position: relative;
  z-index: 2;
}

/* En móvil home.css pinta la flecha en azul (hero claro de la portada); aquí va sobre foto. */
.news-hero-agent .home-scroll-cue,
.news-hero-agent .home-scroll-cue svg {
  color: #ffffff;
}

.news-hero-quick a.news-hero-quick__primary {
  border-color: rgba(181, 58, 127, 0.2);
  background: #b53a7f;
  color: #ffffff;
}

.news-hero-quick a.news-hero-quick__primary:hover {
  background: #9f2d6d;
}

.news-agent .home-agent-expanded {
  margin-top: 1.1rem;
}

.news-agent .home-agent-chat {
  height: auto;
  min-height: 0;
  max-height: min(52svh, 520px);
  padding: 1.1rem;
}

.news-agent .home-agent-thread {
  display: grid;
  gap: 0.9rem;
}

.news-agent .home-agent-message.is-thinking .home-agent-bubble-text {
  color: #5d7189;
  font-style: italic;
}

.news-agent-results {
  display: grid;
  gap: 0.45rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.news-agent-results a {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(31, 99, 177, 0.16);
  border-radius: 14px;
  background: #f5f8fb;
  color: #123154;
  text-decoration: none;
}

.news-agent-results a:hover {
  border-color: #1f63b1;
  background: #ffffff;
}

.news-agent-results strong {
  font-size: 0.98rem;
  line-height: 1.3;
}

.news-agent-results small {
  display: -webkit-box;
  overflow: hidden;
  color: #4b6079;
  font-size: 0.86rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.news-agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.news-agent-actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0.66rem 1.2rem;
  border-radius: 999px;
  color: #1f63b1;
  font-weight: 800;
  text-decoration: none;
}

.news-agent-actions button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.home-tool-button.is-listening {
  background: #b53a7f;
  color: #ffffff;
}

.news-hero-agent.news-agent-active .home-agent-quick {
  margin-top: 1.4rem;
}

@media (max-width: 860px) {
  .home-hero.news-hero-agent {
    min-height: 100svh;
    padding: calc(max(0.75rem, env(safe-area-inset-top)) + 60px + 1.4rem) 1rem 1.5rem;
    background: #0d2336;
  }

  .home-hero.news-hero-agent::before {
    display: none;
  }

  .news-hero-agent__media img {
    object-position: center top;
  }

  .news-hero-agent .home-hero-overlay {
    background: linear-gradient(180deg, rgba(4, 20, 36, 0.62) 0%, rgba(4, 20, 36, 0.2) 38%, rgba(4, 20, 36, 0.25) 62%, rgba(4, 20, 36, 0.72) 100%);
  }

  .news-hero-agent .home-agent {
    margin-top: 1.4rem;
  }

  .news-hero-agent .home-agent-quick {
    margin-top: auto;
  }
}

/* --------------------------------------------------------------------------
   Páginas legales: foto en la cabecera y franja final con la tripulación
   -------------------------------------------------------------------------- */
.news-article-hero--plain.legal-hero {
  position: relative;
  padding-top: calc(clamp(1rem, 2vw, 2rem) + 72px + clamp(4rem, 9vh, 6rem));
  background:
    linear-gradient(90deg, rgba(8, 24, 40, 0.92) 0%, rgba(8, 24, 40, 0.72) 45%, rgba(8, 24, 40, 0.25) 100%),
    url('/assets/img/hero-legal.webp?v=2') 70% center / cover no-repeat,
    #0d2336;
}

@media (max-width: 760px) {
  .news-article-hero--plain.legal-hero {
    padding-top: calc(max(0.75rem, env(safe-area-inset-top)) + 60px + 3rem);
    background:
      linear-gradient(180deg, rgba(8, 24, 40, 0.82) 0%, rgba(8, 24, 40, 0.88) 100%),
      url('/assets/img/hero-legal-movil.webp?v=2') center / cover no-repeat,
      #0d2336;
  }
}

.legal-port.story-port {
  height: auto;
}

.legal-port .story-port__sticky {
  position: relative;
  height: min(100svh, 860px);
  min-height: 600px;
  clip-path: none;
}

.legal-port .story-port__media {
  scale: 1;
}

.legal-port .story-port__media::before {
  background-image: url('/assets/img/footer-legal.webp');
}

/* Burbujas del asistente: texto, resultados y acciones en columna. */
.news-agent .home-agent-bubble-assistant {
  flex-direction: column;
  align-items: stretch;
  max-width: 92%;
}

.news-agent-results a {
  font-weight: 600;
}

.news-agent-actions {
  margin-top: 0.35rem;
}

.news-agent-actions a {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
}

.news-agent-actions a:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Encuadre de la foto de la ruta «Títulos y cursos» (los dos alumnos quedan a la izquierda). */
.story-voyage__media img[src*="noticias-ruta-titulos"] {
  object-position: 28% center;
}
