/* ============================================================
   Sastena — News & Insights (v3)
   Faithful Fairatmos news-page layout, Sastena green/dark theme.
   Flow: dark hero -> cream "Featured" carousel -> light "Our Insights".
   Prefix: .n-*   (shared tokens/utilities come from styles.css)
   ============================================================ */

/* ---------- Light-section tokens (scoped) ---------- */
.n-hero,
.n-featured,
.n-insights {
  --n-heading: #14241a;
  --n-body: #43564c;
  --n-muted: #6b7d73;
  --n-btn: #2f5740;        /* dark forest-green CTA (Fairatmos-style, on light bg) */
  --n-btn-2: #3a6b50;      /* hover */
  --n-chip-border: rgba(20, 36, 26, 0.22);
  --n-card-shadow: 0 18px 44px rgba(18, 38, 24, 0.10);
}

/* Active "News & Insights" item inside the Explore nav dropdown */
.s-pop-item.is-current .s-pop-title { color: var(--leaf); }

/* ============================================================
   1. HERO  (dark, full-bleed photo + green overlay)
   ============================================================ */
.n-hero {
  position: relative;
  min-height: 84vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--deep);
}
.n-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.n-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 20, 13, 0.62) 0%, rgba(8, 20, 13, 0.20) 30%, rgba(8, 20, 13, 0.30) 56%, rgba(8, 20, 13, 0.82) 100%),
    linear-gradient(90deg, rgba(8, 20, 13, 0.55) 0%, rgba(8, 20, 13, 0.05) 58%);
}
.n-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 160px;
  padding-bottom: clamp(72px, 13vh, 150px);
}
.n-hero-title {
  font-size: clamp(2.6rem, 6.2vw, 5.1rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}
.n-hero-title .is-accent { color: var(--leaf); }
.n-hero-lede {
  margin-top: 20px;
  max-width: 44ch;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  color: rgba(255, 255, 255, 0.9);
}
.n-hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.n-hero-scroll-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.n-hero-scroll-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
}

/* ============================================================
   2. FEATURED CAROUSEL  (cream)
   ============================================================ */
.n-featured {
  background: var(--cream);
  padding: clamp(56px, 8vw, 110px) 0;
}
.n-featured-carousel { position: relative; }
.n-featured-viewport { overflow: hidden; }
.n-featured-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.n-featured-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 26px;
  align-items: stretch;
  padding: 4px;
}

/* --- media (image with baked-on title) --- */
.n-featured-media {
  position: relative;
  min-height: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 44px 34px;
}
.n-featured-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 18, 11, 0.18) 0%, rgba(6, 18, 11, 0.42) 52%, rgba(6, 18, 11, 0.78) 100%);
}
.n-media-text { position: relative; z-index: 2; max-width: 32ch; }
.n-media-title {
  display: block;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--leaf);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}
.n-media-title .is-accent { color: var(--leaf); }
.n-featured-media .n-media-title { font-size: clamp(1.55rem, 2.5vw, 2.3rem); }
.n-media-sub {
  display: block;
  margin-top: 12px;
  font-weight: 600;
  color: #fff;
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}
.n-media-brand {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 2;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
}

/* --- detail card --- */
.n-featured-detail {
  background: #fff;
  border-radius: var(--radius);
  padding: clamp(24px, 2.4vw, 38px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--n-card-shadow);
}
.n-date {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--n-muted);
}
.n-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.n-tag {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--n-body);
  border: 1px solid var(--n-chip-border);
  border-radius: 6px;
  padding: 4px 10px;
}
.n-featured-detail-title {
  margin-top: 18px;
  font-size: clamp(1.3rem, 1.9vw, 1.7rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--n-heading);
}
.n-featured-detail-excerpt {
  margin-top: 14px;
  color: var(--n-body);
  font-size: 0.98rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- dark-green CTA (shared by featured + cards) --- */
.n-readmore {
  align-self: flex-start;
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--n-btn);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: var(--radius-btn);
  transition: background 0.18s ease, transform 0.18s ease;
}
.n-featured-detail .n-readmore { margin-top: auto; }
.n-readmore:hover { background: var(--n-btn-2); transform: translateY(-2px); }
.n-readmore span { transition: transform 0.18s ease; }
.n-readmore:hover span { transform: translateX(3px); }

/* --- arrows --- */
.n-featured-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: var(--n-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(18, 38, 24, 0.16);
  transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease;
}
.n-featured-arrow svg { width: 16px; height: 16px; }
.n-featured-arrow:hover { background: var(--n-btn); color: #fff; transform: translateY(-50%) scale(1.06); }
.n-featured-arrow-prev { left: -12px; }
.n-featured-arrow-next { right: -12px; }

/* --- dots --- */
.n-featured-dots { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.n-featured-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(18, 38, 24, 0.2);
  transition: background 0.2s ease, transform 0.2s ease;
}
.n-featured-dot.is-active { background: var(--n-btn); transform: scale(1.25); }

/* ============================================================
   3. OUR INSIGHTS  (light: filters + search + grid)
   ============================================================ */
.n-insights {
  background: var(--cream-2);
  padding: clamp(50px, 7vw, 96px) 0 clamp(74px, 9vw, 124px);
}

/* --- filter tabs --- */
.n-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  border-bottom: 1px solid rgba(18, 38, 24, 0.12);
  margin-bottom: clamp(34px, 4vw, 52px);
}
.n-filter {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--n-body);
  padding: 14px 22px;
  border-radius: 8px 8px 0 0;
  transition: color 0.18s ease, background 0.18s ease;
}
.n-filter:hover { color: var(--n-heading); }
.n-filter.is-active { color: #fff; background: var(--n-btn); }

/* --- head: title + search --- */
.n-insights-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 3vw, 42px);
}
.n-insights-title {
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--n-heading);
}
.n-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(18, 38, 24, 0.16);
  border-radius: var(--pill);
  padding: 6px 6px 6px 16px;
  min-width: min(360px, 90vw);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.n-search:focus-within { border-color: var(--leaf); box-shadow: 0 0 0 3px var(--leaf-soft); }
.n-search-icon { color: var(--n-muted); display: flex; }
.n-search-icon svg { width: 18px; height: 18px; }
.n-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--n-heading);
  padding: 8px 0;
}
.n-search-input::placeholder { color: var(--n-muted); }
.n-search-btn {
  background: var(--n-btn);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 18px;
  border-radius: var(--pill);
  transition: background 0.18s ease;
}
.n-search-btn:hover { background: var(--n-btn-2); }

/* --- card grid --- */
.n-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.2vw, 30px);
}
.n-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--n-card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.6s ease;
}
.n-card:hover { transform: translateY(-6px); box-shadow: 0 26px 56px rgba(18, 38, 24, 0.16); }
.n-card[data-reveal] { transition-delay: calc(var(--i, 0) * 90ms); }
.n-card.is-hidden { display: none; }

.n-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px 22px;
  overflow: hidden;
}
.n-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 18, 11, 0.20) 0%, rgba(6, 18, 11, 0.42) 55%, rgba(6, 18, 11, 0.74) 100%);
}
.n-card-media .n-media-title { font-size: clamp(1.05rem, 1.4vw, 1.3rem); }
.n-card-media .n-media-sub { font-size: 0.85rem; margin-top: 8px; }
.n-card-media .n-media-brand { bottom: 14px; font-size: 0.8rem; }

.n-card-body {
  padding: clamp(20px, 1.8vw, 26px);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.n-card-body .n-date { order: -1; }
.n-card-title {
  margin-top: 16px;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--n-heading);
}
.n-card-title a { color: inherit; }
.n-card-title a:hover { color: var(--n-btn); }
.n-card-excerpt {
  margin-top: 12px;
  color: var(--n-body);
  font-size: 0.94rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.n-card .n-readmore { margin-top: 20px; }

/* --- empty state --- */
.n-empty { text-align: center; padding: 60px 20px; color: var(--n-body); }
.n-empty-mark { color: var(--n-muted); display: inline-flex; }
.n-empty-mark svg { width: 54px; height: 54px; }
.n-empty h3 { margin-top: 16px; font-size: 1.3rem; font-weight: 800; color: var(--n-heading); }
.n-empty p { margin-top: 8px; max-width: 42ch; margin-left: auto; margin-right: auto; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .n-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .n-featured-slide { grid-template-columns: 1fr; }
  .n-featured-media { min-height: 320px; }
  .n-featured-arrow-prev { left: 6px; }
  .n-featured-arrow-next { right: 6px; }
}
@media (max-width: 760px) {
  .n-grid { grid-template-columns: 1fr; }
  .n-insights-head { flex-direction: column; align-items: flex-start; }
  .n-search { width: 100%; }
  .n-filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; }
  .n-filter { white-space: nowrap; }
}
@media (max-width: 520px) {
  .n-hero { min-height: 78vh; }
  .n-hero-inner { padding-top: 132px; }
  .n-featured-arrow { width: 38px; height: 38px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .n-featured-track { transition: none !important; }
  .n-card:hover,
  .n-readmore:hover,
  .n-readmore:hover span,
  .n-featured-arrow:hover { transform: none !important; }
  .n-featured-arrow:hover { transform: translateY(-50%) !important; }
}
