/* ==========================================================================
   News Page — Edge Pharma
   The nav, footer, Contact CTA strip, and News Card are all shared
   components (see css/layout/footer.css, css/components/contact-strip.css,
   css/components/news-card.css). This file covers what's unique to this
   page: the static News Hero banner, the Featured Article, and the News
   Grid section header.
   ========================================================================== */

/* ==========================================================================
   News Hero — static banner (no carousel)
   Reuses .hero__label / .hero__title / .hero__subtitle from
   css/components/hero.css for identical typography — only the banner
   shell (media, overlay, min-height) is new. Mirrors .product-hero from
   css/pages/product-details.css so both static banners feel identical.
   ========================================================================== */

.news-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 420px;
  overflow: hidden;
  background-color: var(--color-primary-dark);
}

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

.news-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 8, 40, 0.82) 0%, rgba(2, 8, 40, 0.55) 55%, rgba(2, 8, 40, 0.4) 100%);
}

.news-hero__content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-10);
}

/* The reused .hero__label/__title/__subtitle (css/components/hero.css)
   start hidden and only fade in once a Swiper ancestor gets
   `.swiper-slide-active` — this banner has no carousel, so reveal them
   unconditionally. */
.news-hero .hero__label,
.news-hero .hero__title,
.news-hero .hero__subtitle {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Featured Article
   A single, full-width article that reads as more important than the
   grid below it: large image, generous spacing, rounded corners, soft
   shadow, and the same hover lift used across every other card.
   ========================================================================== */

.featured-news {
  background-color: var(--color-white);
  padding-block: var(--space-12); /* 80px mobile base */
}

.featured-article {
  display: grid;
  grid-template-columns: 1fr;
  background-color: var(--color-white);
  border: 1px solid #e8eef6;
  border-radius: var(--radius-sharp);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 300ms var(--ease-default), box-shadow 300ms var(--ease-default);
}

.featured-article:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.featured-article__media {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  background-color: var(--color-surface);
}

.featured-article__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-default);
}

.featured-article:hover .featured-article__image {
  transform: scale(1.05);
}

.featured-article__badge {
  position: absolute;
  top: var(--space-5);
  left: var(--space-5);
  padding: 6px 14px;
  background-color: var(--color-secondary);
  color: var(--color-white);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}

.featured-article__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--space-7); /* 32px mobile base */
}

.featured-article__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  font-weight: var(--fw-medium);
  color: var(--color-primary);
}

.featured-article__title {
  margin-top: var(--space-3);
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  line-height: 1.25;
  color: var(--color-text-primary);
}

.featured-article__excerpt {
  margin-top: var(--space-4);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  color: var(--color-text-secondary);
}

/* .featured-article__link reuses .news-card__link's color/underline/arrow
   treatment (css/components/news-card.css); only the hover trigger below
   is re-declared since this card isn't a .news-card. */
.featured-article__link {
  margin-top: var(--space-6);
}

.featured-article:hover .featured-article__link .news-card__link-text,
.featured-article__link:focus-visible .news-card__link-text {
  text-decoration-color: currentColor;
}

.featured-article:hover .featured-article__link .news-card__arrow,
.featured-article__link:focus-visible .news-card__arrow {
  transform: translateX(4px);
}

.featured-article__link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------------
   Scroll animation — fade up
   --------------------------------------------------------------------- */

.featured-article {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-default), transform 600ms var(--ease-default);
}

.featured-news.is-visible .featured-article {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .featured-article {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------------------------------------------------------------------
   Tablet (≥768px)
   --------------------------------------------------------------------- */

@media (min-width: 768px) {
  .featured-article__media {
    min-height: 320px;
  }

  .featured-article__body {
    padding: var(--space-8);
  }
}

/* ---------------------------------------------------------------------
   Desktop (≥992px) — side-by-side image + content
   --------------------------------------------------------------------- */

@media (min-width: 992px) {
  .featured-news {
    padding-block: var(--space-14); /* 120px */
  }

  .featured-article {
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
  }

  .featured-article__media {
    min-height: 100%;
  }

  .featured-article__body {
    padding: var(--space-9) var(--space-10);
    justify-content: center;
  }
}

/* ==========================================================================
   News Grid
   Label/heading/description (centered), then the shared News Card
   (css/components/news-card.css) laid out with the .grid.grid--3 utility
   — 1 column mobile, 2 tablet, 3 desktop.
   ========================================================================== */

.news-listing {
  background-color: #f8fbff;
  padding-block: var(--space-12); /* 80px mobile base */
}

.news-listing__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.news-listing__label {
  font-size: 14px;
  font-weight: var(--fw-semibold);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary);
}

.news-listing__divider {
  display: block;
  width: 48px;
  height: 3px;
  margin-top: var(--space-3);
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
}

.news-listing__heading {
  max-width: 760px;
  margin-top: var(--space-4);
  font-family: var(--font-family-heading);
  font-weight: var(--fw-regular);
  line-height: 1.2;
  background: var(--gradient-h2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.625rem); /* 28px → 42px */
}

.news-listing__description {
  max-width: 700px;
  margin-top: var(--space-5);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.125rem); /* 16px → 18px */
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
  color: var(--color-text-secondary);
}

.news-listing__grid {
  margin-top: var(--space-10);
  gap: var(--space-7); /* 32px */
  text-align: left;
}

/* ---------------------------------------------------------------------
   Scroll animation — fade up
   --------------------------------------------------------------------- */

.news-listing__header,
.news-listing__grid {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-default), transform 600ms var(--ease-default);
}

.news-listing.is-visible .news-listing__header { transition-delay: 0ms; }
.news-listing.is-visible .news-listing__grid { transition-delay: 120ms; }

.news-listing.is-visible .news-listing__header,
.news-listing.is-visible .news-listing__grid {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .news-listing__header,
  .news-listing__grid {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------------------------------------------------------------------
   Desktop (≥992px) — full section padding
   --------------------------------------------------------------------- */

@media (min-width: 992px) {
  .news-listing {
    padding-block: var(--space-14); /* 120px */
  }
}
