/* "As Featured in the Media" section: a full-bleed breakout (matches the
   hero's approach — .site-main constrains to --max-width, which this
   section needs to escape). Each story is itself full-viewport-width,
   edge to edge, with no card chrome — a pinned video pane (where one
   exists) beside a continuously auto-scrolling photo marquee (pure CSS
   animation, no JS), and an outlet-link bar underneath. Text keeps a
   little breathing room via --nr-pad; the media row and the outlet bar
   go all the way to the viewport edge. */

.newsroom {
  /* Warm cream instead of near-white/grey — plain white read too harsh
     against the hero photo and the site's warm accent palette. */
  --news-bg: #f7f1e4;
  --news-story-bg: #efe4cc;
}

.newsroom {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 2rem 0 0 0;
  background: var(--news-bg);
  scroll-margin-top: 5rem;
}

.newsroom-header,
.nr-story-head,
.nr-outlets-bar {
  padding-left: var(--nr-pad, clamp(0rem, 2vw, 2rem));
  padding-right: var(--nr-pad, clamp(0rem, 2vw, 2rem));
}

.newsroom-header {
  /* max-width: 640px; */
  /* margin: 0 0 2.5rem; */
}

.nr-eyebrow-top {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* margin: 0 0 0.5rem; */
  margin: 0;
}

.newsroom-header h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
}

.newsroom-subtitle {
  color: var(--muted);
  margin: 0;
}

/* ---------- Story ---------- */

.nr-story {
  /* Darker than the site-wide --border — the light grey read as barely
     there against the warm cream section backgrounds. */
  border-top: 1px solid #c9b791;
  border-bottom: 1px solid #c9b791;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  background-color: var(--news-story-bg);
  
  font-family: "Lora", serif;
}

.nr-story-right {
  text-align: right;
}

.nr-story-head {
  margin: 0 0 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nr-eyebrow {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
  font-weight: 400;
}

.nr-story-head h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  line-height: 1.25;
  font-weight: 600;
  
  font-optical-sizing: auto;
  font-style: normal;
}

.nr-story-head p {
  margin: 0;
  color: var(--fg);
  font-size: 0.95rem;
}

/* ---------- Media row: pinned video + auto-scrolling marquee ---------- */

.nr-story-media {
  display: flex;
  align-items: stretch;
  width: 100%;
  /* Fixed (not vw-based) height: the marquee images size themselves off
     this row's height (height: 100% on the track), so a fluid clamp()
     here meant every pixel of window resize forced every image to
     re-layout continuously — visible as images flashing black mid-drag
     while the browser scrambled to repaint. A height that only changes
     at breakpoints, not continuously, avoids that. */
  height: 320px;
  background: #000;
  overflow: hidden;
}

.nr-video-pane {
  /* Percentage width (scales with the row on medium/large screens),
     capped at exactly 40% — flex-grow: 0 keeps it from expanding into
     the marquee's space, and flex-shrink: 0 keeps it from being
     squeezed by the marquee's own sizing (see .nr-marquee below). */
  flex: 0 0 40%;
  height: 100%;
}

.nr-video-pane iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.nr-marquee {
  flex: 1 1 auto;
  /* Flex items default to min-width: auto, which means the marquee's own
     minimum size is dictated by its content — and .nr-marquee-track is
     deliberately width: max-content (thousands of px, so the loop has
     something to scroll through). Without this override, that oversized
     min-content forced the marquee to claim far more than its share of
     the row, squeezing .nr-video-pane down to a sliver regardless of its
     own flex-basis. overflow: hidden below is what actually clips the
     excess once the marquee is allowed to shrink to its real box size. */
  min-width: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.nr-marquee-track {
  display: flex;
  height: 100%;
  width: max-content;
  animation: nr-marquee-scroll 40s linear infinite;
  /* Promotes the track to its own compositor layer up front instead of
     on first animation frame, which was the other half of the
     resize-flicker bug — without it, a mid-drag layout pass could catch
     an image between layers and paint black for a frame. */
  will-change: transform;
}

.nr-marquee-repeat {
  display: flex;
  height: 100%;
}

.nr-marquee-track img {
  height: 100%;
  width: auto;
  max-width: none;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
}

@keyframes nr-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nr-marquee-track {
    animation: none;
  }
}

/* ---------- Outlets bar ---------- */

.nr-outlets-bar {
  /* background: #f0f0f0; */
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.nr-outlets-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-right: 0.25rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.nr-outlets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.nr-outlets a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--fg);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 0.35rem 0.45rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nr-outlet-logo {
  height: 16px;
  width: auto;
  max-width: 72px;
  object-fit: contain;
  display: block;
}

.nr-outlets a:hover {
  background: #e4e9ff;
  border-color: var(--accent);
  color: var(--accent);
}

/* Language icon: same visual technique as iconify's icon-park-solid:english
   (solid rounded-square badge, letters cut through via an SVG mask) —
   custom-built here for az/es/de since that set only ships "english". */
.nr-lang-icon {
  height: 18px;
  width: 18px;
  color: #000;
  flex-shrink: 0;
  display: block;
}

/* Video badge: filled and bright, so a video link reads at a glance
   without needing to parse the outlet name. Height matches
   .nr-lang-icon exactly so the two badge types sit flush together. */
.nr-video-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  flex-shrink: 0;
  height: 18px;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 0 0.32rem;
  border-radius: 6px;
  background: #0066ff;
  /* background: rgba(0,0,0,0); */
  /* color: #0066ff; */
  color: white;
  /* margin-top: 0.5px; */
}

.nr-video-badge svg {
  flex-shrink: 0;
}

.nr-ext-icon {
  flex-shrink: 0;
  opacity: 0.6;
}

.nr-outlets a:hover .nr-ext-icon {
  opacity: 1;
}

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

@media (max-width: 760px) {
  .nr-story-media {
    flex-direction: column;
    height: auto;
  }

  .nr-video-pane {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .nr-marquee {
    flex: 0 0 auto;
    height: 180px;
  }
}

@media (max-width: 600px) {
  .newsroom {
    /* padding: 3rem 0; */
  }
}
