/* ==========================================================================
   Homepage — Editorial Newsroom Design
   Scoped entirely under .nhp to avoid conflicts with parent theme.
   ========================================================================== */

/* ---------- Design tokens ---------- */
.nhp {
  --nhp-text: #111827;
  --nhp-text-secondary: #6b7280;
  --nhp-accent: #1e40af;
  --nhp-accent-hover: #1e3a8a;
  --nhp-bg: #ffffff;
  --nhp-bg-subtle: #f8f8f6;
  --nhp-border: #e5e7eb;
  --nhp-border-dark: #d1d5db;
  --nhp-separator: #000000;
  --nhp-font-heading: 'PT Serif', 'Assistant', serif;
  --nhp-font-body: 'PT Serif', 'Assistant', serif;
  --nhp-font-links: 'PT Serif', 'Assistant', serif;
  --nhp-radius: 4px;
  --nhp-section-gap: 80px;
  --nhp-pad-x: 20px;
}

/* ---------- Base reset inside homepage ---------- */
.nhp {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px var(--nhp-pad-x) 0;
  font-family: var(--nhp-font-body);
  color: var(--nhp-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.nhp *,
.nhp *::before,
.nhp *::after {
  box-sizing: border-box;
}

.nhp img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------- Links (PT Serif) ---------- */
.nhp a,
.nhp span {
  font-family: 'PT Serif', 'Assistant', serif !important;
}

.nhp a {
  color: var(--nhp-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nhp a:hover {
  color: var(--nhp-accent-hover);
}

/* Override general link hover for title links */
.nhp h2 a:hover,
.nhp h3 a:hover,
.nhp h4 a:hover,
.nhp .nhp-title-clamp a:hover,
.nhp-posts-left-title a:hover,
.nhp-posts-hero-title a:hover,
.nhp-posts-right-title a:hover,
.nhp-posts-ajax-title a:hover,
.nhp-hero-title a:hover,
.nhp-digest-title a:hover,
.nhp-news-title a:hover,
.nhp-opinion-title a:hover,
.nhp-analytics-title a:hover,
.nhp-podcast-title a:hover {
  color: var(--nhp-text) !important;
  text-decoration: underline !important;
  text-decoration-color: #000 !important;
  text-decoration-thickness: 1.5px !important;
  text-underline-offset: 1px;
}

.nhp a:focus-visible {
  outline: 2px solid var(--nhp-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Primary buttons: match cah-btn-primary exactly (override .nhp a color) */
.nhp .cah-btn-primary,
.nhp .cah-btn-primary:hover {
  color: #fff !important;
  font-weight: 600;
  font-family: 'PT Serif', 'Assistant', serif !important;
}

/* Title links: underline on hover, no color change (multi-line support) */
.nhp h2 a,
.nhp h3 a,
.nhp h4 a,
.nhp .nhp-title-clamp a,
.nhp-posts-left-title a,
.nhp-posts-hero-title a,
.nhp-posts-right-title a,
.nhp-posts-ajax-title a,
.nhp-hero-title a,
.nhp-digest-title a,
.nhp-news-title a,
.nhp-opinion-title a,
.nhp-analytics-title a,
.nhp-podcast-title a {
  color: var(--nhp-text) !important;
  text-decoration: none;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5px;
  transition: text-decoration 0.2s ease;
  /* Reserve space for underline to prevent layout shift */
  padding-bottom: 2px;
  margin-bottom: -2px;
}


/* ---------- Typography ---------- */
.nhp h2,
.nhp h3 {
  font-family: var(--nhp-font-heading);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  color: var(--nhp-text);
}

.nhp p {
  margin: 0;
  font-family: var(--nhp-font-body) !important;
}

/* ---------- Shared utilities ---------- */

/* Section wrapper */
.nhp-section {
  padding-bottom: var(--nhp-section-gap);
}

.nhp-section:last-child {
  padding-bottom: 48px;
}

/* ---------- Section separator: hr + section name (left) + slider arrows (right) ---------- */
.nhp-section-separator {
  margin-bottom: 28px;
}

.nhp-separator-line {
  border: none;
  border-top: 2px solid var(--nhp-separator);
  margin: 0 0 12px 0;
}

.nhp-section-separator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.nhp-section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--nhp-font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--nhp-text);
  text-transform: uppercase;
  transition: color 0.2s ease, gap 0.2s ease;
}

.nhp-section-link:hover {
  color: var(--nhp-accent);
  gap: 8px;
}

.nhp-link-arrow {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nhp-section-link:hover .nhp-link-arrow,
.nhp-posts-left-all:hover .nhp-link-arrow,
.nhp-posts-right-all:hover .nhp-link-arrow {
  transform: translateX(3px);
}

.nhp-slider-arrows {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nhp-slider-prev,
.nhp-slider-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--nhp-text);
  cursor: pointer;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nhp-slider-prev svg,
.nhp-slider-next svg {
  width: 20px;
  height: 20px;
  stroke-width: 3;
  stroke: currentColor;
  fill: none;
}

.nhp-slider-prev:hover:not(.inactive),
.nhp-slider-next:hover:not(.inactive) {
  color: var(--nhp-accent);
}

.nhp-slider-prev.inactive,
.nhp-slider-next.inactive {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- CPT Sliders (3 per view, move 1 per click) ---------- */
.nhp-cpt-slider {
  margin-bottom: 24px;
}

.nhp-cpt-slider-viewport {
  overflow: hidden;
  margin-bottom: 24px;
}

.nhp-cpt-slider-track {
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.35s ease;
  will-change: transform;
  /* 6 items, 3 visible: track = 200% of viewport; each item = 100/6 % of track */
  width: 200%;
  gap: 0;
}

/* Weekly Digest, Opinions, Podcast: add gap between items using CSS gap */
#nhp-slider-digest.nhp-cpt-slider-track,
#nhp-slider-opinions.nhp-cpt-slider-track,
#nhp-slider-podcast.nhp-cpt-slider-track {
  gap: 15px;
}

/* Analytics hero slider: always shows 1 item per slide (6 items total) */
#nhp-slider-analytics-hero.nhp-cpt-slider-track {
  width: 600%;
  /* 6 items * 100% each */
}

.nhp-cpt-slider-item {
  flex: 0 0 16.666%;
  min-width: 0;
  padding: 0 12px;
  box-sizing: border-box;
}

/* Analytics hero slider items: each takes full viewport width */
#nhp-slider-analytics-hero .nhp-cpt-slider-item {
  flex: 0 0 16.666%;
  /* 100/6 = 16.666% of 600% track = 100% viewport */
}

/* Weekly Digest, Opinions, Podcast: adjust item sizing to account for gaps */
#nhp-slider-digest .nhp-cpt-slider-item,
#nhp-slider-opinions .nhp-cpt-slider-item,
#nhp-slider-podcast .nhp-cpt-slider-item {
  /* Reduce flex-basis slightly to account for gaps (15px * 2 gaps between 3 items = 30px total) */
  /* Each item should be slightly smaller: calc(16.666% - 10px) to fit 3 items + 2 gaps */
  flex: 0 0 calc(16.666% - 10px);
  min-width: 0;
}

/* Slider item card styles */
.nhp-digest-slide {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 28px;
  border: 1px solid var(--nhp-border);
  border-radius: var(--nhp-radius);
  background: var(--nhp-bg-subtle);
  min-height: 200px;
  gap: 20px;
  box-sizing: border-box;
}

/* Ensure ALL slide content has proper padding (including first item) */
#nhp-slider-digest .nhp-cpt-slider-item .nhp-digest-slide,
#nhp-slider-opinions .nhp-cpt-slider-item .nhp-opinion-slide,
#nhp-slider-podcast .nhp-cpt-slider-item .nhp-podcast-slide {
  width: 100%;
  box-sizing: border-box;
}

/* First item: ensure slide content padding is maintained */
#nhp-slider-digest .nhp-cpt-slider-item:first-child .nhp-digest-slide {
  padding: 32px 28px !important;
}

/* Opinions slide has no padding - content padding is handled by .nhp-opinion-content */
#nhp-slider-opinions .nhp-cpt-slider-item:first-child .nhp-opinion-slide {
  padding: 0 !important;
}

#nhp-slider-podcast .nhp-cpt-slider-item:first-child .nhp-podcast-slide {
  padding: 20px 16px !important;
}

.nhp-digest-slide .nhp-digest-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nhp-digest-slide .nhp-digest-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: var(--nhp-text);
}

.nhp-digest-slide .nhp-digest-title a {
  color: var(--nhp-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nhp-digest-slide .nhp-digest-title a:hover {
  color: var(--nhp-accent);
}

.nhp-digest-slide .nhp-digest-date {
  font-size: 14px;
  color: var(--nhp-text-secondary);
  display: block;
  margin: 0;
}

.nhp-digest-slide .nhp-digest-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin-top: auto;
  font-size: 16px;
  font-weight: 500;
  color: var(--nhp-text);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, gap 0.2s ease;
  width: fit-content;
}

.nhp-digest-slide .nhp-digest-btn:hover {
  color: var(--nhp-accent);
  gap: 12px;
}

.nhp-digest-slide .nhp-digest-btn .nhp-link-arrow {
  transition: transform 0.2s ease;
}

.nhp-digest-slide .nhp-digest-btn:hover .nhp-link-arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   OPINIONS SECTION — Unique card design with featured images
   ========================================================================== */

.nhp-opinion-slide {
  padding: 0;
  height: 100%;
  display: flex;
  min-height: 480px;
}

.nhp-opinion-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 480px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8e8e8;
}

/* Image section */
.nhp-opinion-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f5f5f5;
}

.nhp-opinion-image-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.nhp-opinion-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.nhp-opinion-card:hover .nhp-opinion-image {
  transform: scale(1.05);
}

.nhp-opinion-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
}

/* Content section */
.nhp-opinion-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 12px;
}

.nhp-opinion-author-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f8f8f8;
  border-radius: 20px;
  width: fit-content;
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
}

.nhp-opinion-author-icon {
  font-size: 14px;
  line-height: 1;
}

.nhp-opinion-author-name {
  font-weight: 500;
  color: #333;
}

.nhp-opinion-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: var(--nhp-text);
}

.nhp-opinion-title a {
  color: var(--nhp-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nhp-opinion-title a:hover {
  color: var(--nhp-accent);
}

.nhp-opinion-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #666;
  margin: 0;
  -webkit-line-clamp: 3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.nhp-opinion-read-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--nhp-accent);
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
  width: fit-content;
  border-top: 1px solid #e8e8e8;
}

.nhp-opinion-read-link:hover {
  color: var(--nhp-text);
  gap: 12px;
}

.nhp-opinion-read-link .nhp-link-arrow {
  transition: transform 0.2s ease;
}

.nhp-opinion-read-link:hover .nhp-link-arrow {
  transform: translateX(4px);
}

.nhp-analytics-slide .nhp-analytics-article {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 16px;
  border: 1px solid var(--nhp-border);
  border-radius: var(--nhp-radius);
  background: var(--nhp-bg-subtle);
}

.nhp-analytics-slide .nhp-analytics-title {
  font-size: 16px;
}

.nhp-analytics-slide .nhp-analytics-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: var(--nhp-radius);
}

.nhp-podcast-slide {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 16px;
  border: 1px solid var(--nhp-border);
  border-radius: var(--nhp-radius);
  background: var(--nhp-bg-subtle);
}

.nhp-podcast-slide .nhp-podcast-title {
  font-size: 16px;
}

.nhp-podcast-slide .nhp-podcast-description {
  font-size: 13px;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Section header row: title left, "View all" right */
.nhp-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--nhp-border);
  padding-bottom: 12px;
}

.nhp-section-title {
  font-family: var(--nhp-font-heading);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--nhp-text-secondary);
  margin: 0;
}

.nhp-view-all {
  font-size: 13px;
  font-weight: 500;
  color: var(--nhp-text-secondary);
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nhp-view-all:hover {
  color: var(--nhp-accent);
}

/* Label / badge */
.nhp-label {
  display: inline-block;
  font-family: var(--nhp-font-heading);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--nhp-text-secondary);
  margin-bottom: 10px;
}

/* Region indicator */
.nhp-region {
  font-size: 12px;
  font-weight: 500;
  color: var(--nhp-text-secondary);
  letter-spacing: 0.2px;
}

/* Date */
.nhp-date {
  font-size: 13px;
  color: var(--nhp-text-secondary);
}

/* Read link */
.nhp-read-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9375rem;
  min-height: 44px;
  padding: 10px 20px;
}

.nhp-read-link::after {
  content: '\2192';
  font-size: 16px;
  transition: transform 0.15s ease;
}

.nhp-read-link:hover::after {
  transform: translateX(3px);
}

/* Excerpt clamping */
.nhp-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: var(--nhp-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Title clamping */
.nhp-title-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stretched link (makes entire container clickable) */
.nhp-stretched::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Meta row */
.nhp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: 12px;
}


/* ==========================================================================
   1. POSTS HERO — BBC-style 3-column: Left posts | Center hero | Right Short News
   ========================================================================== */

.nhp-posts-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.8fr 0.85fr;
  gap: 32px 40px;
  align-items: start;
}

.nhp-posts-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nhp-posts-left-item {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--nhp-border);
}

.nhp-posts-left-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.nhp-posts-left-image {
  overflow: hidden;
  border-radius: var(--nhp-radius);
  margin-bottom: 12px;
  aspect-ratio: 16 / 10;
  background: var(--nhp-border);
}

.nhp-posts-left-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nhp-posts-left-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
}

.nhp-posts-left-title a {
  color: var(--nhp-text);
}

.nhp-posts-left-item .nhp-excerpt {
  font-size: 13px;
  color: var(--nhp-text-secondary);
  -webkit-line-clamp: 2;
}

.nhp-posts-left-item .nhp-date {
  font-size: 12px;
  margin-top: 8px;
}

.nhp-posts-left-all {
  font-size: 16px;
  font-weight: 500;
  color: var(--nhp-accent);
  margin-top: 8px;
}

.nhp-posts-left-all:hover {
  color: var(--nhp-accent-hover);
}

/* Center: hero post */
.nhp-posts-center {
  min-width: 0;
}

.nhp-posts-hero-article {
  position: relative;
}

.nhp-posts-hero-image {
  overflow: hidden;
  border-radius: var(--nhp-radius);
  margin-bottom: 16px;
}

.nhp-posts-hero-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.nhp-posts-hero-text .nhp-label {
  margin-bottom: 8px;
}

.nhp-posts-hero-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 12px;
}

.nhp-posts-hero-title a {
  color: var(--nhp-text);
}

.nhp-posts-hero .nhp-excerpt {
  font-size: 15px;
  -webkit-line-clamp: 3;
}

.nhp-posts-hero .nhp-meta {
  margin-top: 12px;
}

/* Right: Short News — smaller, compact */
.nhp-posts-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nhp-posts-right .nhp-label {
  margin-bottom: 2px;
  font-size: 11px;
}

.nhp-posts-right-item {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--nhp-border);
}

.nhp-posts-right-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.nhp-posts-right-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 2px;
}

.nhp-posts-right-title a {
  color: var(--nhp-text);
}

.nhp-posts-right-item .nhp-excerpt {
  font-size: 12px;
  color: var(--nhp-text-secondary);
  -webkit-line-clamp: 2;
}

.nhp-posts-right-item .nhp-date {
  font-size: 11px;
  margin-top: 4px;
}

.nhp-posts-right-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--nhp-accent);
  margin-top: 2px;
}

.nhp-posts-right-all:hover {
  color: var(--nhp-accent-hover);
}

.nhp-empty {
  font-size: 14px;
  color: var(--nhp-text-secondary);
}

/* Load More Button */
.nhp-load-more-wrapper {
  text-align: center;
  margin-top: 48px;
  margin-bottom: 32px;
}

.nhp-load-more-spinner {
  text-align: center;
  padding: 20px;
  color: var(--nhp-text-secondary);
  font-size: 14px;
}

/* AJAX-loaded posts grid (3 columns) */
.nhp-posts-ajax-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
  margin-top: 48px;
}

.nhp-posts-ajax-item {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--nhp-border);
}

.nhp-posts-ajax-item:nth-last-child(-n+3) {
  border-bottom: none;
  padding-bottom: 0;
}

.nhp-posts-ajax-image {
  overflow: hidden;
  border-radius: var(--nhp-radius);
  margin-bottom: 12px;
  aspect-ratio: 16 / 10;
  background: var(--nhp-border);
}

.nhp-posts-ajax-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nhp-posts-ajax-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
}

.nhp-posts-ajax-title a {
  color: var(--nhp-text);
}

.nhp-posts-ajax-item .nhp-excerpt {
  font-size: 14px;
  color: var(--nhp-text-secondary);
  -webkit-line-clamp: 2;
  margin-bottom: 8px;
}

.nhp-posts-ajax-item .nhp-date {
  font-size: 12px;
  color: var(--nhp-text-secondary);
}

.nhp-no-more,
.nhp-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px;
  color: var(--nhp-text-secondary);
  font-size: 14px;
}


/* ==========================================================================
   2. TOP STORY — Hero
   ========================================================================== */

.nhp-hero-article {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  cursor: pointer;
}

.nhp-hero-text {
  display: flex;
  flex-direction: column;
}

.nhp-hero-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.nhp-hero-title a {
  color: var(--nhp-text);
}

.nhp-hero .nhp-excerpt {
  font-size: 17px;
  margin-bottom: 4px;
}

.nhp-hero-image {
  overflow: hidden;
  border-radius: var(--nhp-radius);
}

.nhp-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.nhp-hero .nhp-meta {
  margin-top: 16px;
}


/* ==========================================================================
   2. WEEKLY DIGEST
   ========================================================================== */

.nhp-digest-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 32px;
  background: var(--nhp-bg-subtle);
  border: 1px solid var(--nhp-border);
  border-radius: var(--nhp-radius);
}

.nhp-digest-text {
  flex: 1;
  min-width: 0;
}

.nhp-digest-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--nhp-text);
}

.nhp-digest-title a {
  color: var(--nhp-text);
}

.nhp-digest-date {
  font-size: 13px;
  color: var(--nhp-text-secondary);
}

.nhp-digest-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 0.9375rem;
  white-space: nowrap;
  min-height: 44px;
  transition: background 0.15s ease, color 0.15s ease;
}


/* ==========================================================================
   3. LATEST NEWS — Grid
   ========================================================================== */

.nhp-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
}

.nhp-news-item {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--nhp-border);
}

.nhp-news-item:nth-last-child(-n+3) {
  border-bottom: none;
  padding-bottom: 0;
}

.nhp-news-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
}

.nhp-news-title a {
  color: var(--nhp-text);
}

.nhp-news-item .nhp-excerpt {
  font-size: 14px;
  color: var(--nhp-text-secondary);
  -webkit-line-clamp: 2;
  margin-bottom: 0;
}

.nhp-news-item .nhp-meta {
  margin-top: 10px;
  gap: 4px 12px;
}


/* ==========================================================================
   4. EDITORIAL OPINION
   ========================================================================== */

.nhp-opinion-block {
  padding: 32px 0 32px 32px;
  border-left: 3px solid var(--nhp-accent);
  max-width: 720px;
}

.nhp-opinion-title {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
}

.nhp-opinion-title a {
  color: var(--nhp-text);
}

.nhp-opinion-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--nhp-text);
  margin-bottom: 12px;
}

.nhp-opinion-block .nhp-excerpt {
  -webkit-line-clamp: 3;
  margin-bottom: 4px;
}


/* ==========================================================================
   5. WEEKLY ANALYTICS
   ========================================================================== */

.nhp-analytics-article {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  cursor: pointer;
}

.nhp-analytics-text {
  display: flex;
  flex-direction: column;
}

.nhp-analytics-title {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 12px;
}

.nhp-analytics-title a {
  color: var(--nhp-text);
}

.nhp-analytics-image {
  overflow: hidden;
  border-radius: var(--nhp-radius);
}

.nhp-analytics-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}


/* ==========================================================================
   6. PODCAST
   ========================================================================== */

.nhp-podcast-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 32px;
  border: 1px solid var(--nhp-border);
  border-radius: var(--nhp-radius);
}

.nhp-podcast-text {
  flex: 1;
  min-width: 0;
}

.nhp-podcast-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
}

.nhp-podcast-title a {
  color: var(--nhp-text);
}

.nhp-podcast-description {
  font-size: 14px;
  color: var(--nhp-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nhp-podcast-duration {
  font-size: 13px;
  color: var(--nhp-text-secondary);
  margin-top: 8px;
}

.nhp-podcast-cta {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 10px 24px;
  font-size: 0.9375rem;
  white-space: nowrap;
  min-height: 44px;
  transition: background 0.15s ease, color 0.15s ease;
}

/* Play icon (pure CSS triangle) */
.nhp-podcast-cta .nhp-play-icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
  flex-shrink: 0;
  margin: 0;
  /* Center the triangle icon vertically */
  align-self: center;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* ---- Tablet (< 1024px) ---- */
@media (max-width: 1024px) {
  .nhp {
    --nhp-section-gap: 64px;
    --nhp-pad-x: 24px;
  }

  .nhp-posts-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 32px;
  }

  .nhp-posts-right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 32px;
  }

  /* AJAX grid: 2 columns on tablet */
  .nhp-posts-ajax-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 32px;
  }

  .nhp-posts-ajax-item:nth-last-child(-n+3) {
    border-bottom: 1px solid var(--nhp-border);
    padding-bottom: 24px;
  }

  .nhp-posts-ajax-item:nth-last-child(-n+2) {
    border-bottom: none;
    padding-bottom: 0;
  }

  .nhp-posts-hero-title {
    font-size: 24px;
  }

  .nhp-hero-article {
    gap: 32px;
  }

  .nhp-hero-title {
    font-size: 30px;
  }

  .nhp-news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 32px;
  }

  /* Recount border removal for 2 cols */
  .nhp-news-item:nth-last-child(-n+3) {
    border-bottom: 1px solid var(--nhp-border);
    padding-bottom: 24px;
  }

  .nhp-news-item:nth-last-child(-n+2) {
    border-bottom: none;
    padding-bottom: 0;
  }

  .nhp-analytics-title {
    font-size: 22px;
  }

  /* Weekly Digest slider: adjust for tablet */
  .nhp-digest-slide {
    padding: 28px 24px;
    min-height: 180px;
  }

  .nhp-digest-slide .nhp-digest-title {
    font-size: 20px;
  }

  /* Opinions: adjust for tablet */
  .nhp-opinion-slide {
    min-height: 420px;
  }

  .nhp-opinion-card {
    min-height: 420px;
  }

  .nhp-opinion-image-wrapper {
    height: 180px;
  }

  .nhp-opinion-content {
    padding: 20px;
  }

  .nhp-opinion-title {
    font-size: 18px;
  }

  /* CPT slider: 2 visible on tablet */
  .nhp-cpt-slider-track {
    width: 300%;
  }

  /* Analytics hero slider: always 1 item per slide */
  #nhp-slider-analytics-hero.nhp-cpt-slider-track {
    width: 600%;
  }

  .nhp-cpt-slider-item {
    flex: 0 0 16.666%;
  }

  /* Weekly Digest, Opinions, Podcast: adjust for tablet (2 visible, 1 gap) */
  #nhp-slider-digest .nhp-cpt-slider-item,
  #nhp-slider-opinions .nhp-cpt-slider-item,
  #nhp-slider-podcast .nhp-cpt-slider-item {
    flex: 0 0 calc(16.666% - 7.5px);
    /* Account for 1 gap between 2 items */
  }
}

/* ---- Mobile (< 768px) ---- */
@media (max-width: 767px) {
  .nhp {
    --nhp-section-gap: 56px;
    --nhp-pad-x: 16px;
    padding-top: 32px;
  }

  /* Posts grid: stacked single column */
  .nhp-posts-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .nhp-posts-right {
    grid-column: auto;
    display: flex;
    flex-direction: column;
  }

  /* AJAX grid: single column on mobile */
  .nhp-posts-ajax-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .nhp-posts-ajax-item {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--nhp-border);
  }

  .nhp-posts-ajax-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .nhp-posts-ajax-item:nth-last-child(-n+3) {
    border-bottom: 1px solid var(--nhp-border);
    padding-bottom: 20px;
  }

  .nhp-posts-hero-title {
    font-size: 22px;
  }

  .nhp-section-separator {
    margin-bottom: 20px;
  }

  /* CPT slider: 1 visible on mobile (same as analytics — no empty space at end) */
  .nhp-cpt-slider-track {
    width: 600%;
  }

  /* Ensure viewport clips perfectly on mobile */
  .nhp-cpt-slider-viewport {
    overflow: hidden;
    width: 100%;
  }

  /* Remove gap on mobile so track is exactly 600% and last item has no empty space */
  #nhp-slider-digest.nhp-cpt-slider-track,
  #nhp-slider-opinions.nhp-cpt-slider-track,
  #nhp-slider-podcast.nhp-cpt-slider-track {
    gap: 0;
  }

  .nhp-cpt-slider-item {
    flex: 0 0 16.666%;
  }

  /* Weekly Digest, Opinions, Podcast: 1 item full width on mobile (like analytics) */
  /* Remove horizontal padding from items so they fill exactly 100% viewport with no overflow */
  #nhp-slider-digest .nhp-cpt-slider-item,
  #nhp-slider-opinions .nhp-cpt-slider-item,
  #nhp-slider-podcast .nhp-cpt-slider-item {
    flex: 0 0 16.666%;
    min-width: 0;
  }

  /* Ensure slide content fills item and has proper padding on mobile */
  #nhp-slider-digest .nhp-cpt-slider-item .nhp-digest-slide,
  #nhp-slider-opinions .nhp-cpt-slider-item .nhp-opinion-slide,
  #nhp-slider-podcast .nhp-cpt-slider-item .nhp-podcast-slide {
    width: 100%;

  }

  .nhp-section-separator-row {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Hero: stacked, image first */
  .nhp-hero-article {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .nhp-hero-image {
    order: -1;
  }

  .nhp-hero-title {
    font-size: 26px;
  }

  .nhp-hero .nhp-excerpt {
    font-size: 15px;
  }

  /* Weekly Digest slider: adjust for mobile */
  .nhp-digest-slide {
    padding: 24px 20px;
    min-height: 160px;
  }

  .nhp-digest-slide .nhp-digest-title {
    font-size: 18px;
  }

  .nhp-digest-slide .nhp-digest-date {
    font-size: 13px;
  }

  .nhp-digest-slide .nhp-digest-btn {
    font-size: 15px;
  }

  /* Opinions: adjust for mobile */
  .nhp-opinion-slide {
    min-height: 400px;
  }

  .nhp-opinion-card {
    min-height: 400px;
  }

  .nhp-opinion-image-wrapper {
    height: 240px;
  }

  .nhp-opinion-content {
    padding: 18px;
    gap: 10px;
  }

  .nhp-opinion-title {
    font-size: 17px;
  }

  .nhp-opinion-excerpt {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }

  .nhp-opinion-read-link {
    font-size: 14px;
    padding-top: 10px;
  }

  /* Digest: stacked */
  .nhp-digest-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
  }

  .nhp-digest-btn {
    width: 100%;
    justify-content: center;
  }

  /* News: single column */
  .nhp-news-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .nhp-news-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--nhp-border);
  }

  .nhp-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .nhp-news-item:first-child {
    padding-top: 0;
  }

  /* Reset tablet overrides */
  .nhp-news-item:nth-last-child(-n+3) {
    border-bottom: 1px solid var(--nhp-border);
    padding-bottom: 20px;
  }

  .nhp-news-item:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--nhp-border);
    padding-bottom: 20px;
  }

  .nhp-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  /* Opinion */
  .nhp-opinion-block {
    padding: 24px 0 24px 20px;
  }

  .nhp-opinion-title {
    font-size: 22px;
  }

  /* Analytics: stacked */
  .nhp-analytics-article {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .nhp-analytics-title {
    font-size: 22px;
  }

  /* Podcast: stacked */
  .nhp-podcast-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
  }

  .nhp-podcast-cta {
    width: 100%;
    justify-content: center;
  }
}

/* ---- Small mobile (< 480px) ---- */
@media (max-width: 479px) {
  .nhp-hero-title {
    font-size: 22px;
  }

  .nhp-section-header {
    flex-direction: column;
    gap: 4px;
  }

  .nhp-view-all {
    min-height: auto;
    padding-bottom: 0;
  }
}