/* ===== Single news article (Framer-style) ===== */
body.news-article-page {
  background: #fff;
  color: #050505;
  min-height: 100vh;
}

.news-article-page .header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.news-article-page .logo,
.news-article-page .nav a {
  color: #050505;
}

.news-article-page .nav a:hover {
  color: rgba(5, 5, 5, 0.55);
}

.news-article-page main {
  padding-top: 5.5rem;
}

.news-article {
  font-family: var(--font-sans, 'General Sans', system-ui, sans-serif);
}

.news-article__header {
  background: #fff;
  /* Room under nav + airy masthead */
  padding: clamp(4.25rem, 11vw, 7rem) clamp(1.25rem, 4vw, 2rem) clamp(2.5rem, 5vw, 3.5rem);
}

.news-article__header-inner {
  max-width: min(100vw - 2.5rem, 960px);
  margin: 0 auto;
  text-align: center;
}

/* Centered hero headline (above tags + author) */
.news-article__title {
  --article-title-size: clamp(2.35rem, 4.85vw, 3.65rem);

  margin: 0 auto clamp(1.5rem, 3.2vw, 2.25rem);
  font-family: var(--font-display, 'Apfel Grotezk', sans-serif);
  font-size: var(--article-title-size);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: #0a0a0a;
  text-align: center;
  max-width: min(100%, 42rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Long headlines: room for two full-width lines at the same font size */
.news-article__title--wide {
  max-width: min(100%, 78rem);
  padding-inline: clamp(0.5rem, 2vw, 1rem);
}

/* Explicit row = exactly two lines when viewport is wide enough */
.news-article__title-line {
  display: block;
  max-width: 100%;
}

/* Only lock to one row per line when there’s enough width for this font size */
@media (min-width: 1100px) {
  .news-article__title--wide .news-article__title-line {
    white-space: nowrap;
  }
}

.news-article__labels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.6rem;
  margin-bottom: clamp(1.85rem, 3.5vw, 2.65rem);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  font-weight: 500;
  color: #050505;
}

.news-article__labels span {
  display: inline;
}

.news-article__sep {
  color: #050505;
  font-weight: 600;
  opacity: 0.85;
}

.news-article__author {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.news-article__author-avatar {
  width: clamp(56px, 4.5vw, 68px);
  height: clamp(56px, 4.5vw, 68px);
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #eee;
}

.news-article__author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-article__author-name {
  margin: 0;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  font-weight: 600;
  color: #171717;
}

.news-article__author-role {
  margin: 0.2rem 0 0;
  font-size: clamp(0.875rem, 1.05vw, 0.9375rem);
  color: rgba(23, 23, 23, 0.62);
}

/* Extra air between masthead (author) and full-bleed hero */
.news-article__hero {
  width: 100%;
  margin-top: clamp(1.5rem, 4vw, 3rem);
  aspect-ratio: 2400 / 1600;
  max-height: min(78vh, 900px);
  background: #e8e8e8;
  position: relative;
  overflow: hidden;
}

/* Portrait hero (e.g. web dev article) */
.news-article__hero--portrait {
  aspect-ratio: 960 / 1200;
  max-height: min(85vh, 960px);
}

/* Square banner hero (Framer rebel-design article) */
.news-article__hero--square {
  aspect-ratio: 1 / 1;
  max-height: min(88vh, min(100vw, 1100px));
}

.news-article__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Scroll-linked zoom (same as Studio / case studies — studio-hero-zoom.js) */
.news-article__hero img.studio-scroll-zoom-img {
  transform: scale3d(var(--studio-scroll-zoom, 1.12), var(--studio-scroll-zoom, 1.12), 1);
  transform-origin: center center;
  will-change: transform;
  backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .news-article__hero img.studio-scroll-zoom-img {
    transform: none !important;
    will-change: auto;
  }
}

/* Anchor hook (Framer parity) */
.news-article__banner-trigger {
  height: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}

/* Main column (~62%) left, sidebar (~38%) right — matches Framer reference */
.news-article__layout {
  width: 100%;
  max-width: min(100vw - 2.5rem, 1320px);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.25rem, 4vw, 2rem) clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 3.5rem);
  box-sizing: border-box;
  overflow-x: clip;
}

@media (min-width: 1000px) {
  .news-article__layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
    column-gap: clamp(2.5rem, 5vw, 4.5rem);
    row-gap: 2rem;
    align-items: start;
  }

  .news-article__sidebar {
    position: sticky;
    top: calc(5.5rem + 1.25rem);
    align-self: start;
  }
}

.news-article__sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.news-article__sidebar-title {
  margin: 0 0 1.5rem;
  font-size: clamp(0.875rem, 1vw, 0.9375rem);
  font-weight: 700;
  color: rgba(10, 10, 10, 0.55);
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.news-article__related {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2vw, 1.65rem);
}

.news-article__related-card {
  display: flex;
  gap: clamp(1rem, 1.5vw, 1.2rem);
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  padding: 0.35rem 0;
  border-radius: 12px;
  transition: color 0.25s ease;
  min-width: 0;
}

.news-article__related-card > div:last-child {
  flex: 1;
  min-width: 0;
}

.news-article__related-thumb {
  width: clamp(104px, 9vw, 124px);
  min-width: clamp(104px, 9vw, 124px);
  aspect-ratio: 1 / 1;
  border-radius: clamp(14px, 1.2vw, 18px);
  overflow: hidden;
  background: #eee;
  isolation: isolate;
}

/* Thumbnail zoom on hover — same motion language as .news-card in news-section.css */
.news-article__related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transform-origin: center center;
  backface-visibility: hidden;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.news-article__related-card:hover .news-article__related-thumb img,
.news-article__related-card:focus-visible .news-article__related-thumb img {
  transform: scale(1.09);
}

@media (prefers-reduced-motion: reduce) {
  .news-article__related-thumb img {
    transition: none;
  }

  .news-article__related-card:hover .news-article__related-thumb img,
  .news-article__related-card:focus-visible .news-article__related-thumb img {
    transform: none;
  }
}

.news-article__related-title {
  margin: 0;
  font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
  font-weight: 600;
  line-height: 1.32;
  color: #0a0a0a;
  transition: color 0.25s ease;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-article__related-card:hover .news-article__related-title,
.news-article__related-card:focus-visible .news-article__related-title {
  color: #000;
}

.news-article__related-desc {
  margin: 0.4rem 0 0;
  font-size: clamp(0.8125rem, 0.95vw, 0.875rem);
  line-height: 1.5;
  color: rgba(23, 23, 23, 0.58);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-article__main {
  min-width: 0;
  max-width: min(44rem, 100%);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-article__meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.35rem;
}

.news-article__meta-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(10, 10, 10, 0.4);
  text-decoration: none;
  transition: color 0.15s ease;
}

.news-article__meta-back:hover {
  color: rgba(10, 10, 10, 0.7);
}

.news-article__meta-date {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(10, 10, 10, 0.55);
  letter-spacing: 0.02em;
}

.news-article__prose {
  font-size: 1.0625rem;
  line-height: 1.72;
  color: rgba(10, 10, 10, 0.58);
  max-width: min(42rem, 100%);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-article__prose h3 {
  margin: 2.25rem 0 0.75rem;
  font-family: var(--font-display, 'Apfel Grotezk', sans-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: #0a0a0a;
  letter-spacing: -0.02em;
}

.news-article__prose h3:first-of-type {
  margin-top: 1.75rem;
}

.news-article__prose p {
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-article__prose ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.news-article__prose li {
  margin-bottom: 0.5rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-article__prose strong {
  font-weight: 600;
  color: rgba(10, 10, 10, 0.78);
}

.news-article__prose a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-article__sidebar-back {
  margin: clamp(2.25rem, 3vw, 2.75rem) 0 0;
  padding-top: clamp(1.5rem, 2vw, 1.85rem);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.news-article__sidebar-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: clamp(1rem, 1.1vw, 1.0625rem);
  font-weight: 500;
  color: #0a0a0a;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.news-article__sidebar-back-link:hover {
  opacity: 0.75;
}

.news-article__sidebar-back-icon {
  flex-shrink: 0;
  color: rgb(91, 240, 158);
}

.news-article__sidebar-back-text {
  text-decoration: none;
}

.news-article__share {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.news-article__share-label {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #050505;
}

.news-article__share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.news-article__share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  color: #050505;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.news-article__share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.news-article__share-btn svg {
  width: 22px;
  height: 22px;
}

/* More news strip */
.news-article-more {
  --news-text: rgb(20, 20, 20);
  --news-text-soft: rgba(20, 20, 20, 0.6);
  --news-accent-arrow: rgb(91, 240, 158);
  --news-radius-outer: clamp(22px, 2.5vw, 28px);
  --news-radius-img: clamp(18px, 2vw, 24px);
  --news-font: var(--font-sans, 'General Sans', system-ui, sans-serif);

  background: #fafafa;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: clamp(3rem, 7vw, 5rem) clamp(1.25rem, 4vw, 2rem) clamp(4rem, 9vw, 6rem);
  font-family: var(--news-font);
}

.news-article-more__inner {
  max-width: 1580px;
  margin: 0 auto;
}

.news-article-more__title {
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  font-family: var(--font-display, 'Apfel Grotezk', sans-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.03em;
  color: #171717;
  line-height: 1.05;
}

.news-article-more__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 20px);
}

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

@media (max-width: 640px) {
  .news-article-more__grid {
    grid-template-columns: 1fr;
  }
}

/* Stronger thumbnail zoom on article “More news” cards (aligns with sidebar related links) */
.news-article-more .news-card:hover .news-card-img-wrap img,
.news-article-more .news-card:focus-visible .news-card-img-wrap img {
  transform: scale(1.09);
}

/* CMS-published articles (single column when no “related” yet) */
.news-article__layout--single {
  grid-template-columns: 1fr !important;
}

.news-article__hero--empty {
  min-height: clamp(10rem, 28vw, 16rem);
  background: linear-gradient(165deg, #ececec 0%, #dedede 100%);
}

.news-article__related-thumb--empty {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 6.5rem;
  background: #e8e8e8;
}

.news-card-img-wrap--empty {
  display: block;
  width: 100%;
  min-height: 140px;
  background: #eaeaea;
}
