/* ================================================================
   Panacea — News & Articles (Homepage)
   Aesthetic: dark editorial · magazine-forward · ink on midnight
   ================================================================ */

/* ════════════════════════════════════════════════════════════════
   SECTION SHELL
   ════════════════════════════════════════════════════════════════ */

.ns-section {
  background: #050c07;
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}

/* Faint radial wash — depth without distraction */
.ns-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(2,166,80,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Header ────────────────────────────────────────────────────── */
.ns-head {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 56px 60px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 80px;
  align-items: end;
}

.ns-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #02a650;
  margin: 0 0 16px;
}
.ns-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: #02a650;
  flex-shrink: 0;
}

.ns-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(48px, 6.5vw, 88px);
  font-weight: 300;
  line-height: 1.0;
  color: #ffffff;
  letter-spacing: -0.035em;
  margin: 0;
}
.ns-title em {
  font-style: italic;
  color: #02a650;
}

.ns-head-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  padding-bottom: 8px;
}

.ns-desc {
  font-family: 'Work Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: rgba(255,255,255,0.42);
  line-height: 1.75;
  margin: 0;
  max-width: 380px;
}

.ns-all-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.22s ease, gap 0.22s ease;
  align-self: flex-start;
}
.ns-all-link span { display: inline-block; transition: transform 0.22s ease; }
.ns-all-link:hover { color: #02a650; gap: 12px; }
.ns-all-link:hover span { transform: translateX(3px); }

/* ── Grid wrapper ──────────────────────────────────────────────── */
.ns-grid-wrap {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 56px;
}

/* ── Footer / more button ──────────────────────────────────────── */
.ns-footer {
  max-width: 1340px;
  margin: 48px auto 0;
  padding: 0 56px;
  display: flex;
  justify-content: center;
}

.ns-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.14);
  padding: 13px 28px;
  border-radius: 999px;
  transition: border-color 0.24s ease, color 0.24s ease, gap 0.24s ease;
}
.ns-more-btn span { display: inline-block; transition: transform 0.24s ease; }
.ns-more-btn:hover {
  border-color: #02a650;
  color: #02a650;
  gap: 14px;
}
.ns-more-btn:hover span { transform: translateX(3px); }

/* ════════════════════════════════════════════════════════════════
   OVERRIDE BOOTSTRAP — JS-injected card grid
   ════════════════════════════════════════════════════════════════ */

/* Turn Bootstrap row into a proper 3-col CSS grid */
#featuredNewsContainer {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

/* Neutralise Bootstrap col padding on each card */
#featuredNewsContainer > * {
  width: auto !important;
  max-width: none !important;
  flex: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ════════════════════════════════════════════════════════════════
   NEWS CARD — JS-generated HTML
   ════════════════════════════════════════════════════════════════ */

.news-card {
  background: #0c1a0f;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
}
.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #02a650, rgba(2,166,80,0));
  opacity: 0;
  transition: opacity 0.28s ease;
}
.news-card:hover {
  border-color: rgba(2,166,80,0.30);
  transform: translateY(-5px);
  box-shadow: 0 12px 48px rgba(0,0,0,0.35), 0 0 0 1px rgba(2,166,80,0.10);
}
.news-card:hover::before {
  opacity: 1;
}

/* ── Image ─────────────────────────────────────────────────────── */
.news-image {
  width: 100% !important;
  height: 220px !important;
  overflow: hidden !important;
  display: block !important;
  background: #0a1a0c !important;
  flex-shrink: 0;
}
.news-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  filter: saturate(0.80) brightness(0.88);
  transition: transform 0.55s cubic-bezier(0.25,0.46,0.45,0.94),
              filter 0.35s ease;
}
.news-card:hover .news-image img {
  transform: scale(1.06);
  filter: saturate(1.0) brightness(0.95);
}

/* ── Content area ──────────────────────────────────────────────── */
.news-content {
  padding: 24px 28px 28px !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
}

/* Date stamp */
.date-stamp {
  font-family: 'Montserrat', sans-serif !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  color: #02a650 !important;
  margin: 0 0 14px !important;
}
.date-stamp i { color: #02a650 !important; opacity: 0.75; }

/* Article title */
.news-content h4 {
  font-family: 'Fraunces', Georgia, serif !important;
  font-size: clamp(18px, 1.8vw, 22px) !important;
  font-weight: 300 !important;
  line-height: 1.22 !important;
  letter-spacing: -0.015em !important;
  margin: 0 0 12px !important;
  transition: color 0.22s ease;
  flex: 1;
}
.news-card:hover .news-content h4 {
  color: #02a650 !important;
}

/* Excerpt */
.news-content p:not(.date-stamp) {
  font-family: 'Work Sans', sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #333333 !important;
  line-height: 1.72 !important;
  margin: 0 0 22px !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Read More button — restyled as pill CTA */
.read-blog-button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
  color: #fff !important;
  background: rgba(2,166,80,0.15) !important;
  border: 1px solid rgba(2,166,80,0.30) !important;
  padding: 9px 18px !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  transition: background 0.22s ease, border-color 0.22s ease, gap 0.22s ease !important;
  align-self: flex-start !important;
}
.read-blog-button:hover {
  background: #02a650 !important;
  border-color: #02a650 !important;
  gap: 12px !important;
}
.read-blog-button .read-icon {
  font-size: 12px !important;
  transition: transform 0.22s ease !important;
}
.read-blog-button:hover .read-icon {
  transform: translateX(3px) !important;
}

/* ── Error/alert state ─────────────────────────────────────────── */
#featuredNewsContainer .alert {
  grid-column: 1 / -1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.60);
  border-radius: 12px;
  text-align: center;
  padding: 40px;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .ns-head      { padding: 0 40px 52px; gap: 0 56px; }
  .ns-grid-wrap { padding: 0 40px; }
  .ns-footer    { padding: 0 40px; }
}

@media (max-width: 900px) {
  .ns-head {
    grid-template-columns: 1fr;
    gap: 20px 0;
    padding: 0 32px 44px;
  }
  .ns-head-right { max-width: 100%; }
  .ns-grid-wrap  { padding: 0 32px; }
  .ns-footer     { padding: 0 32px; }

  #featuredNewsContainer {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 640px) {
  .ns-section    { padding: 64px 0 56px; }
  .ns-head       { padding: 0 24px 36px; }
  .ns-grid-wrap  { padding: 0 24px; }
  .ns-footer     { padding: 0 24px; margin-top: 36px; }

  #featuredNewsContainer {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .news-image { height: 200px !important; }
}
