/* =====================================================================
   Home Page — BTF (Below the Fold) CSS
   Sections: Categories · Section Header · Posts Grid · World News ·
             Latest News · Three-Col Posts · Stories Slider
   Loaded via loadCSS defer pattern — not render-blocking.
   ===================================================================== */

/* =====================================================================
   Home Page — Categories Grid  (.cat-*)
   Card layout: portrait overlay — image fills card, text at bottom
   Container: adaptive max-width via --cat-max-w (set inline from PHP)
   Desktop: N-col portrait · Tablet <=1024: 2-col · Mobile <=640: 2-col square
   ===================================================================== */

/* ── CSS Variables ──────────────────────────────────────────────────── */
:root {
  --cat-sec-pad:       15px;
  --cat-gap:           20px;
  --cat-card-radius:   14px;
  --cat-section-bg:    #ffffff;
  --cat-card-shadow:   0 2px 12px rgba(0, 0, 0, 0.12), 0 4px 20px rgba(0, 0, 0, 0.07);
  --cat-card-shadow-h: 0 8px 28px rgba(0, 0, 0, 0.22);
  --cat-name-size:     20px;
}

body.dark-mode {
  --cat-section-bg:    #000000;
  --cat-card-shadow:   0 2px 14px rgba(0, 0, 0, 0.45), 0 4px 20px rgba(0, 0, 0, 0.35);
  --cat-card-shadow-h: 0 8px 32px rgba(0, 0, 0, 0.65);
}

/* ── Section wrapper ────────────────────────────────────────────────── */
.cat-section {
  background:  var(--cat-section-bg);
  padding:     var(--cat-sec-pad) 0;
  transition:  background-color 0.25s ease;
}

/* ── Inner container: full-width (matches header / pgrid) ───────────── */
.cat-outer {
  width:      100%;
  max-width:  1180px;
  margin:     0 auto;
  padding:    0 20px;
}

/* ── Grid ────────────────────────────────────────────────────────────── */
.cat-grid {
  display:               grid;
  grid-template-columns: repeat(var(--cat-col-count, 2), 1fr);
  gap:                   var(--cat-gap);
  list-style:            none;
  margin:                0;
  padding:               0;
}

/* ── Category card: landscape overlay ───────────────────────────────── */
.cat-card {
  display: flex;
}

.cat-card__link {
  position:        relative;
  display:         block;
  width:           100%;
  aspect-ratio:    5 / 3;
  border-radius:   var(--cat-card-radius);
  overflow:        hidden;
  text-decoration: none;
  box-shadow:      var(--cat-card-shadow);
  transition:      box-shadow 0.3s ease,
                   transform  0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cat-card__link:hover {
  box-shadow: var(--cat-card-shadow-h);
  transform:  translateY(-3px);
}

/* ── Thumbnail: absolute fill ────────────────────────────────────────── */
.cat-card__thumb {
  position:   absolute;
  inset:      0;
  display:    block;
  width:      100%;
  height:     100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cat-card__link:hover .cat-card__thumb {
  transform: scale(1.06);
}

/* ── Dark gradient overlay ───────────────────────────────────────────── */
.cat-card__overlay {
  position:   absolute;
  inset:      0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.42) 52%,
    rgba(0, 0, 0, 0)    72%
  );
  transition: opacity 0.3s ease;
}

.cat-card__link:hover .cat-card__overlay {
  opacity: 0.88;
}

/* ── Text body: bottom of overlay ───────────────────────────────────── */
.cat-card__body {
  position:       absolute;
  bottom:         0;
  left:           0;
  right:          0;
  padding:        20px 18px;
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            5px;
  pointer-events: none;
  text-align:     center;
}

/* ── Category name ───────────────────────────────────────────────────── */
.cat-card__name {
  color:       #ffffff;
  font-size:   var(--cat-name-size, 20px);
  font-weight: 700;
  line-height: 1.25;
}

/* ── Category excerpt ────────────────────────────────────────────────── */
.cat-card__excerpt {
  color:                  rgba(255, 255, 255, 0.65);
  font-size:              12px;
  font-weight:            400;
  line-height:            1.45;
  margin:                 0;
  display:                -webkit-box;
  -webkit-line-clamp:     2;
  -webkit-box-orient:     vertical;
  overflow:               hidden;
}

/* ── Post count ──────────────────────────────────────────────────────── */
.cat-card__count {
  color:       rgba(255, 255, 255, 0.70);
  font-size:   13px;
  font-weight: 500;
  line-height: 1;
}

/* ── Responsive — Tablet (<=1024px): 2-col landscape ────────────────── */
@media (max-width: 1024px) {
  :root {
    --cat-gap:       18px;
    --cat-sec-pad:   15px;
    --cat-name-size: 18px;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Responsive — Mobile (<=640px): single col landscape ────────────── */
@media (max-width: 640px) {
  :root {
    --cat-gap:       14px;
    --cat-sec-pad:   15px;
    --cat-name-size: 16px;
  }

  .cat-grid {
    grid-template-columns: 1fr;
  }

  .cat-card__link {
    aspect-ratio: 5 / 3;
  }

  .cat-card__body {
    padding: 16px 18px;
  }

  .cat-card__count {
    font-size: 12px;
  }
}

/* ── Responsive — Small mobile (<=400px): wider landscape ───────────── */
@media (max-width: 400px) {
  :root {
    --cat-gap:     12px;
    --cat-sec-pad: 15px;
  }

  .cat-card__link {
    aspect-ratio: 16 / 9;
  }

  .cat-card__body {
    padding: 14px 16px;
  }
}

/* =====================================================================
   Reusable Section Header  (.sec-hdr)
   Used by posts-grid and all future homepage sections.
   Left: title + inline chevron · Right: "Find more" link + red circle btn
   ===================================================================== */

:root {
  --sec-hdr-title-size:  22px;
  --sec-hdr-title-color: #111827;
  --sec-hdr-more-color:  #374151;
  --sec-hdr-btn-bg:      #e71d36;
  --sec-hdr-btn-size:    26px;
  --sec-hdr-mb:          24px;
}

body.dark-mode {
  --sec-hdr-title-color: rgba(255, 255, 255, 0.92);
  --sec-hdr-more-color:  rgba(255, 255, 255, 0.72);
}

.sec-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sec-hdr-mb);
}

.sec-hdr__left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.sec-hdr__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--sec-hdr-title-size);
  font-weight: 700;
  line-height: 1.2;
  color: var(--sec-hdr-title-color);
}

/* jli-tarrow glyph next to section title */
.sec-hdr__chevron {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: var(--sec-hdr-title-color);
  opacity: 0.45;
}

.sec-hdr__right {
  flex-shrink: 0;
  margin-left: 16px;
}

.sec-hdr__more {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--sec-hdr-more-color);
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.sec-hdr__more:hover {
  color: var(--sec-hdr-btn-bg);
}

/* jli-tarrow icon inside red circle — <i> element */
.sec-hdr__more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--sec-hdr-btn-size);
  height: var(--sec-hdr-btn-size);
  border-radius: 999px;
  background: var(--sec-hdr-btn-bg);
  color: #ffffff;
  font-size: 13px;
  font-style: normal;
  line-height: 1;
  transition: transform 0.22s ease, background-color 0.22s ease;
}

.sec-hdr__more-btn::before {
  display: block;
  font-size: 13px;
  line-height: 1;
}

.sec-hdr__more:hover .sec-hdr__more-btn {
  transform: translateX(3px);
  background: #c0152a;
}

body.dark-mode .sec-hdr__more:hover .sec-hdr__more-btn {
  background: #ff4d6d;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  :root {
    --sec-hdr-title-size: 18px;
    --sec-hdr-mb:         18px;
    --sec-hdr-btn-size:   24px;
  }
}

/* =====================================================================
   Home Page — Posts Grid  (.pgrid-* / .pcard-*)
   Container: .pgrid-outer  max-width 1180px (same as hero/header)
   4-column card grid on desktop · 2-col tablet · 2-col/1-col mobile
   ===================================================================== */

/* ── CSS Variables ──────────────────────────────────────────────────── */
:root {
  --pgrid-bg:          #ffffff;
  --pgrid-sec-pad:     15px;
  --pgrid-gap:         18px;

  --pcard-title-color: #111827;
  --pcard-meta-color:  #6b7280;
  --pcard-meta-link:   #374151;
  --pcard-img-radius:  8px;
  --pcard-body-pt:     12px;
  --pcard-rating-bg:   #111827;
  --pcard-rating-fg:   #ffffff;
}

body.dark-mode {
  --pgrid-bg:          #000000;
  --pcard-title-color: rgba(255, 255, 255, 0.92);
  --pcard-meta-color:  rgba(255, 255, 255, 0.50);
  --pcard-meta-link:   rgba(255, 255, 255, 0.72);
}

/* ── Section wrapper ────────────────────────────────────────────────── */
.pgrid-section {
  background: var(--pgrid-bg);
  padding: var(--pgrid-sec-pad) 0;
  transition: background-color 0.25s ease;
}

/* ── Inner container: 1180px ────────────────────────────────────────── */
.pgrid-outer {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Grid: 4 equal columns ──────────────────────────────────────────── */
.pgrid-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--pgrid-gap);
}

/* ── Post card ──────────────────────────────────────────────────────── */
.pcard {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Thumbnail wrapper ──────────────────────────────────────────────── */
.pcard__img-wrap {
  display: block;
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: var(--pcard-img-radius);
  overflow: hidden;
  background: #e5e7eb;
  text-decoration: none;
  flex-shrink: 0;
}

body.dark-mode .pcard__img-wrap {
  background: rgba(255, 255, 255, 0.08);
}

.pcard__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pcard:hover .pcard__img {
  transform: scale(1.05);
}

/* ── Rating badge (absolute top-right of image) ─────────────────────── */
.pcard__rating {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--pcard-rating-bg);
  color: var(--pcard-rating-fg);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  line-height: 1;
}

/* ── Card body ──────────────────────────────────────────────────────── */
.pcard__body {
  display: flex;
  flex-direction: column;
  padding-top: var(--pcard-body-pt);
  flex: 1 0 auto;
}

/* ── Category badge ─────────────────────────────────────────────────── */
.pcard__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 7px;
  border-radius: 999px;
  background: hsla(var(--badge-hue, 258), 70%, 55%, 0.12);
  text-decoration: none;
  margin-bottom: 8px;
  width: fit-content;
  max-width: 100%;
  transition: background-color 0.2s ease;
}

.pcard__badge:hover {
  background: hsla(var(--badge-hue, 258), 70%, 55%, 0.22);
}

.pcard__badge-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: hsl(var(--badge-hue, 258), 70%, 50%);
}

.pcard__badge-text {
  color: hsl(var(--badge-hue, 258), 58%, 36%);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-mode .pcard__badge-text {
  color: hsl(var(--badge-hue, 258), 70%, 72%);
}

/* ── Title ──────────────────────────────────────────────────────────── */
.pcard__title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--pcard-title-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pcard__title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.pcard__title-link:hover {
  color: #e71d36;
}

body.dark-mode .pcard__title-link:hover {
  color: #ff4d6d;
}

/* ── Meta row ───────────────────────────────────────────────────────── */
.pcard__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  margin-top: auto;
}

.pcard__av-wrap {
  flex-shrink: 0;
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  overflow: hidden;
  text-decoration: none;
}

.pcard__avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.pcard__author {
  flex-shrink: 0;
  color: var(--pcard-meta-link);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
  transition: color 0.2s ease;
}

.pcard__author:hover {
  color: #e71d36;
}

body.dark-mode .pcard__author:hover {
  color: #ff4d6d;
}

.pcard__sep {
  flex-shrink: 0;
  color: var(--pcard-meta-color);
  font-size: 11px;
  line-height: 1;
}

.pcard__clock {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  color: var(--pcard-meta-color);
  line-height: 1;
}

.pcard__readtime {
  flex-shrink: 0;
  color: var(--pcard-meta-color);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.pcard__share {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: none;
  border: none;
  padding: 0;
  color: var(--pcard-meta-color);
  cursor: pointer;
  margin-left: auto;
  transition: color 0.2s ease;
}

.pcard__share:hover {
  color: #e71d36;
}

body.dark-mode .pcard__share:hover {
  color: #ff4d6d;
}

/* ── Responsive — Tablet (≤1024px): stay 4-col but tighter gap ──────── */
@media (max-width: 1024px) {
  :root {
    --pgrid-gap:     14px;
    --pgrid-sec-pad: 15px;
  }
}

/* ── Responsive — Tablet narrow (≤900px): 2 columns ────────────────── */
@media (max-width: 900px) {
  .pgrid-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Responsive — Mobile (≤767px) ──────────────────────────────────── */
@media (max-width: 767px) {
  :root {
    --pgrid-sec-pad: 15px;
    --pgrid-gap:     12px;
  }

  .pgrid-outer {
    padding: 0 12px;
  }

  .pgrid-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pcard__title {
    font-size: 13px;
  }
}

/* ── Responsive — Small mobile (≤480px): single column ─────────────── */
@media (max-width: 480px) {
  .pgrid-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   Home Page — World News Grid  (.wng-* / .ocard)
   Container: .wng-outer  max-width 1180px (same as hero/pgrid)
   Layout: left big (50%) | right 2-col (50%)
     Right: col-sm 2 stacked (50%) | col-tall full-height (50%)
   All cards: overlay style — image fills card, gradient bottom→top
   ===================================================================== */

/* ── CSS Variables ──────────────────────────────────────────────────── */
:root {
  --wng-bg:          #ffffff;
  --wng-sec-pad:     15px;
  --wng-gap:         10px;
  --wng-radius:      12px;
  --wng-grid-h:      450px;
}

body.dark-mode {
  --wng-bg: #000000;
}

/* ── Section wrapper ────────────────────────────────────────────────── */
.wng-section {
  background: var(--wng-bg);
  padding: var(--wng-sec-pad) 0;
  transition: background-color 0.25s ease;
}

/* ── Inner container: 1180px — same as hero/pgrid ───────────────────── */
.wng-outer {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Main 2-col grid: left 50% | right 50% ──────────────────────────── */
.wng-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--wng-gap);
  height: var(--wng-grid-h);
}

.wng-left {
  height: 100%;
}

/* ── Right side: 2-col grid (col-sm | col-tall) ─────────────────────── */
.wng-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--wng-gap);
  height: 100%;
}

/* ── Column with 2 small cards stacked ─────────────────────────────── */
.wng-col-sm {
  display: flex;
  flex-direction: column;
  gap: var(--wng-gap);
  height: 100%;
}

/* ── Tall column (single full-height card) ──────────────────────────── */
.wng-col-tall {
  height: 100%;
}

/* =====================================================================
   Overlay Card  (.ocard)
   Reusable: image fills card absolutely, gradient overlay at bottom,
   content (badge + title + excerpt + meta) positioned at bottom.
   ===================================================================== */

.ocard {
  position: relative;
  border-radius: var(--wng-radius);
  overflow: hidden;
  width: 100%;
  height: 100%;
  display: block;
}

/* Small stacked cards each take equal share of col-sm height */
.wng-col-sm .ocard {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
}

/* ── Background image: fills card absolutely ────────────────────────── */
.ocard__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ocard:hover .ocard__img {
  transform: scale(1.05);
}

/* ── Gradient overlay: dark bottom → transparent ────────────────────── */
.ocard__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.84) 0%,
    rgba(0, 0, 0, 0.32) 52%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 22px;
  pointer-events: none;
}

/* Small card: tighter overlay padding */
.ocard--small .ocard__overlay {
  padding: 14px 16px;
}

/* ── Category badge: white pill, colored dot ────────────────────────── */
.ocard__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  margin-bottom: 10px;
  width: fit-content;
  max-width: 100%;
  pointer-events: all;
  transition: background-color 0.18s ease;
}

.ocard__badge:hover {
  background: #ffffff;
}

.ocard--small .ocard__badge {
  margin-bottom: 7px;
}

.ocard__badge-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: hsl(var(--badge-hue, 258), 70%, 50%);
}

.ocard__badge-text {
  color: #111827;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* ── Title ──────────────────────────────────────────────────────────── */
.ocard__title {
  margin: 0 0 8px;
  font-weight: 700;
  line-height: 1.32;
  color: #ffffff;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.50);
}

.ocard--big .ocard__title {
  font-size: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ocard--small .ocard__title {
  font-size: 14px;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ocard--tall .ocard__title {
  font-size: 17px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stretch link: makes entire card area clickable via title link */
.ocard__title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ocard__title-link:hover {
  color: #e71d36;
}

body.dark-mode .ocard__title-link:hover {
  color: #ff4d6d;
}

.ocard__title-link::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: auto;
}

/* Badge, author, share sit above stretch link */
.ocard__badge,
.ocard__meta {
  position: relative;
  z-index: 2;
}

/* ── Excerpt (big card only) ────────────────────────────────────────── */
.ocard__excerpt {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.80);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.40);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Meta row ───────────────────────────────────────────────────────── */
.ocard__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}

.ocard__av-wrap {
  flex-shrink: 0;
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  overflow: hidden;
  text-decoration: none;
  position: relative;
  z-index: 2;
}

.ocard__avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.ocard__author {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.90);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
  pointer-events: all;
  position: relative;
  z-index: 2;
  transition: color 0.2s ease;
}

.ocard__author:hover {
  color: #ffffff;
}

.ocard__sep {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  line-height: 1;
}

.ocard__clock {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1;
}

.ocard__readtime {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.ocard__share {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  margin-left: auto;
  padding: 0;
  pointer-events: all;
  position: relative;
  z-index: 2;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.ocard__share:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

/* Small card: compact meta text */
.ocard--small .ocard__author {
  font-size: 11px;
}

.ocard--small .ocard__readtime {
  font-size: 10px;
}

.ocard--small .ocard__share {
  width: 24px;
  height: 24px;
}

/* ── Responsive — Tablet (≤1024px) ─────────────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --wng-grid-h:  400px;
    --wng-sec-pad: 15px;
  }
}

/* ── Responsive — Mobile (≤767px): stack main grid, keep right 2-col ── */
@media (max-width: 767px) {
  :root {
    --wng-sec-pad: 15px;
    --wng-gap:     8px;
  }

  .wng-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .wng-left {
    height: 280px;
  }

  .wng-right {
    height: 320px;
    grid-template-columns: 1fr 1fr;
  }

  .wng-outer {
    padding: 0 12px;
  }

  .ocard--big .ocard__title {
    font-size: 18px;
  }
}

/* ── Responsive — Small mobile (≤480px): single column ─────────────── */
@media (max-width: 480px) {
  .wng-right {
    grid-template-columns: 1fr;
    height: auto;
  }

  .wng-col-sm {
    flex-direction: row;
    height: 170px;
  }

  .wng-col-tall {
    height: 200px;
  }

  .ocard--small .ocard__title {
    font-size: 13px;
  }
}

/* =====================================================================
   Home Page — Latest News  (.lnews-* / .lcard / .lsoc-* / .lexpl-*)
   Layout: scrollable 2-col cards (7fr) | sticky sidebar (3fr)
   Sidebar: social boxes grid + "Explore more" featured + compact list
   ===================================================================== */

/* ── CSS Variables ──────────────────────────────────────────────────── */
:root {
  --lnews-bg:        #ffffff;
  --lnews-sec-pad:   15px;
  --lnews-gap:       24px;
  --lnews-scroll-h:  680px;
  --lnews-card-gap:  18px;

  --lcard-bg:        #ffffff;
  --lcard-border:    rgba(0, 0, 0, 0.06);
  --lcard-radius:    12px;
  --lcard-title-col: #111827;
  --lcard-expt-col:  #6b7280;
  --lcard-shadow:    0 1px 4px rgba(0, 0, 0, 0.07);

  --lsoc-box-radius: 10px;
  --lsoc-box-pad:    12px 14px;

  --lexpl-border:    rgba(0, 0, 0, 0.08);
  --lexpl-cat-col:   #374151;
  --lexpl-title-col: #111827;
  --lexpl-read-col:  #9ca3af;
}

body.dark-mode {
  --lnews-bg:        #000000;
  --lcard-bg:        #111827;
  --lcard-border:    rgba(255, 255, 255, 0.06);
  --lcard-title-col: rgba(255, 255, 255, 0.92);
  --lcard-expt-col:  rgba(255, 255, 255, 0.50);
  --lcard-shadow:    0 1px 4px rgba(0, 0, 0, 0.40);
  --lexpl-border:    rgba(255, 255, 255, 0.08);
  --lexpl-cat-col:   rgba(255, 255, 255, 0.65);
  --lexpl-title-col: rgba(255, 255, 255, 0.90);
  --lexpl-read-col:  rgba(255, 255, 255, 0.42);
}

/* ── Section wrapper ────────────────────────────────────────────────── */
.lnews-section {
  background: var(--lnews-bg);
  padding: var(--lnews-sec-pad) 0;
  transition: background-color 0.25s ease;
}

/* ── Inner container: 1180px ────────────────────────────────────────── */
.lnews-outer {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Main 7fr / 3fr grid ────────────────────────────────────────────── */
.lnews-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) 3fr;
  gap: var(--lnews-gap);
  align-items: start;
}

/* ── Left: scroll container ─────────────────────────────────────────── */
.lnews-content-wrap {
  position: relative;
  min-width: 0;
}

.lnews-content-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: linear-gradient(to bottom, transparent, var(--lnews-bg));
  pointer-events: none;
  z-index: 1;
  border-radius: 0 0 var(--lcard-radius) var(--lcard-radius);
}

.lnews-content {
  max-height: var(--lnews-scroll-h);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.lnews-content::-webkit-scrollbar {
  display: none;
}

/* ── 2-column cards grid ────────────────────────────────────────────── */
.lnews-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--lnews-card-gap);
  padding-bottom: 60px; /* room for fade mask */
}

/* ── Post card (.lcard) ─────────────────────────────────────────────── */
.lcard {
  display: flex;
  flex-direction: column;
  background: var(--lcard-bg);
  border-radius: var(--lcard-radius);
  overflow: hidden;
  box-shadow: var(--lcard-shadow);
  border: 1px solid var(--lcard-border);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.lcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

body.dark-mode .lcard:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.50);
}

/* ── Thumbnail wrapper: 16:9 ────────────────────────────────────────── */
.lcard__img-wrap {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
  text-decoration: none;
}

body.dark-mode .lcard__img-wrap {
  background: rgba(255, 255, 255, 0.08);
}

.lcard__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lcard:hover .lcard__img {
  transform: scale(1.05);
}

/* ── Donut progress rating badge ────────────────────────────────────── */
.lcard__rating {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--lcard-bg) 55%, transparent 56%),
    conic-gradient(
      #f59e0b calc(var(--rating-pct)),
      rgba(0, 0, 0, 0.45) calc(var(--rating-pct))
    );
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  pointer-events: none;
  line-height: 1;
}

/* ── Card body ──────────────────────────────────────────────────────── */
.lcard__body {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  padding: 14px 16px 16px;
}

/* ── Title ──────────────────────────────────────────────────────────── */
.lcard__title {
  margin: 0 0 7px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.42;
  color: var(--lcard-title-col);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lcard__title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.lcard__title-link:hover {
  color: #e71d36;
}

body.dark-mode .lcard__title-link:hover {
  color: #ff4d6d;
}

/* ── Excerpt ────────────────────────────────────────────────────────── */
.lcard__excerpt {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.58;
  color: var(--lcard-expt-col);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Meta row: reuse pcard__meta; push to bottom ────────────────────── */
.lcard__meta {
  margin-top: auto;
}

/* ── Sticky sidebar ─────────────────────────────────────────────────── */
.lnews-sidebar {
  position: sticky;
  top: calc(var(--hdr-height, 65px) + 16px);
  align-self: start;
  min-width: 0;
  overflow-y: auto;
  max-height: calc(100vh - var(--hdr-height, 65px) - 32px);
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.lnews-sidebar::-webkit-scrollbar {
  display: none;
}

/* ── Social boxes grid: 2 columns ───────────────────────────────────── */
.lsoc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
}

/* ── Individual social box ──────────────────────────────────────────── */
.lsoc-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--lsoc-box-pad);
  border-radius: var(--lsoc-box-radius);
  background: var(--lsoc-color, #1877f2);
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  min-width: 0;
}

.lsoc-box:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.lsoc-box__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: #ffffff;
  width: 20px;
  height: 20px;
}

.lsoc-box__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lsoc-box__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.lsoc-box__name {
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lsoc-box__count {
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── "Explore more" section header ──────────────────────────────────── */
.lexpl-hdr {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--sec-hdr-title-color);
  display: flex;
  align-items: center;
  gap: 4px;
}

.lexpl-hdr__chevron {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.45;
  display: inline-flex;
  align-items: center;
}

/* ── Featured explore card: reuse ocard ─────────────────────────────── */
.lexpl-feat {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 4px;
}

.lexpl-feat .ocard {
  position: absolute;
  inset: 0;
  border-radius: 0;
  height: 100%;
}

/* ── Compact explore list ───────────────────────────────────────────── */
.lexpl-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lexpl-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--lexpl-border);
}

/* ── Item thumbnail ─────────────────────────────────────────────────── */
.lexpl-item__thumb-wrap {
  flex-shrink: 0;
  display: block;
  width: 120px;
  aspect-ratio: 3 / 2;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e7eb;
  text-decoration: none;
}

body.dark-mode .lexpl-item__thumb-wrap {
  background: rgba(255, 255, 255, 0.08);
}

.lexpl-item__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lexpl-item:hover .lexpl-item__thumb {
  transform: scale(1.06);
}

/* ── Item body ──────────────────────────────────────────────────────── */
.lexpl-item__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── Category indicator ─────────────────────────────────────────────── */
.lexpl-item__cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}

.lexpl-item__cat-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: hsl(var(--badge-hue, 258), 70%, 50%);
}

.lexpl-item__cat-name {
  color: hsl(var(--badge-hue, 258), 58%, 42%);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

body.dark-mode .lexpl-item__cat-name {
  color: hsl(var(--badge-hue, 258), 70%, 68%);
}

/* ── Item title ─────────────────────────────────────────────────────── */
.lexpl-item__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.40;
  color: var(--lexpl-title-col);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lexpl-item__title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.lexpl-item__title-link:hover {
  color: #e71d36;
}

body.dark-mode .lexpl-item__title-link:hover {
  color: #ff4d6d;
}

/* ── Item read time ─────────────────────────────────────────────────── */
.lexpl-item__read {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--lexpl-read-col);
  font-size: 11px;
  line-height: 1;
}

/* ── Responsive — Tablet (≤1024px) ─────────────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --lnews-sec-pad:  15px;
    --lnews-gap:      20px;
    --lnews-card-gap: 14px;
    --lnews-scroll-h: 620px;
  }

  .lnews-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

/* ── Responsive — Tablet narrow (≤900px): stack sidebar below ───────── */
@media (max-width: 900px) {
  .lnews-grid {
    grid-template-columns: 1fr;
  }

  .lnews-content {
    max-height: 520px;
  }

  .lnews-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .lsoc-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .lexpl-feat {
    aspect-ratio: 16 / 6;
  }
}

/* ── Responsive — Mobile (≤767px) ──────────────────────────────────── */
@media (max-width: 767px) {
  :root {
    --lnews-sec-pad:  15px;
    --lnews-gap:      16px;
    --lnews-card-gap: 12px;
    --lnews-scroll-h: 440px;
  }

  .lnews-outer {
    padding: 0 12px;
  }

  .lsoc-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lcard__title {
    font-size: 14px;
  }

  .lcard__excerpt {
    display: none;
  }
}

/* ── Responsive — Small mobile (≤480px): single column cards ────────── */
@media (max-width: 480px) {
  .lnews-cards {
    grid-template-columns: 1fr;
  }

  .lcard__excerpt {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   LOAD MORE BUTTON
   Sits inside .lnews-cards (2-col grid) as the last child.
   grid-column: 1 / -1 makes it span both columns so it centres properly.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --lnews-more-btn-border: #e5e7eb;
  --lnews-more-btn-color:  #374151;
  --lnews-more-btn-hover:  #e71d36;
}

body.dark-mode {
  --lnews-more-btn-border: rgba(255, 255, 255, 0.15);
  --lnews-more-btn-color:  rgba(255, 255, 255, 0.80);
  --lnews-more-btn-hover:  #ff4d6d;
}

.lnews-loadmore-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

/* Fade-in animation for AJAX-appended lcards */
@keyframes lcard-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lcard.is-entering {
  animation: lcard-fade-in 0.28s ease both;
}

.lnews-loadmore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 40px;
  border: 2px solid var(--lnews-more-btn-border);
  border-radius: 100px;
  background: transparent;
  color: var(--lnews-more-btn-color);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease,
              transform 0.18s ease;
  letter-spacing: 0.01em;
}

.lnews-loadmore-btn:hover:not(:disabled) {
  background: var(--lnews-more-btn-hover);
  border-color: var(--lnews-more-btn-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.lnews-loadmore-btn:active:not(:disabled) {
  transform: translateY(0);
}

.lnews-loadmore-btn:disabled {
  cursor: default;
  opacity: 0.45;
}

/* ── Loading spinner ─────────────────────────────────────────────────── */

.lnews-loadmore-btn__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  flex-shrink: 0;
  animation: lnews-spin 0.65s linear infinite;
}

.lnews-loadmore-btn.is-loading .lnews-loadmore-btn__spinner {
  display: block;
}

.lnews-loadmore-btn.is-loading .lnews-loadmore-btn__text {
  opacity: 0.65;
}

@keyframes lnews-spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 767px) {
  .lnews-loadmore-btn {
    width: 100%;
    max-width: 320px;
  }
}


/* =====================================================================
   Home Page — Three-Column Posts  (.tcol-* / .tcard / .tcmp-*)
   Layout: 3 equal columns, each: mini-header + featured card + compact list
   Container: .tcol-outer  max-width 1180px (same as all other sections)
   ===================================================================== */

/* ── CSS Variables ──────────────────────────────────────────────────── */
:root {
  --tcol-bg:          #ffffff;
  --tcol-sec-pad:     15px;
  --tcol-gap:         20px;

  --tcol-hdr-size:    16px;
  --tcol-hdr-color:   #111827;
  --tcol-hdr-mb:      16px;

  --tcard-bg:         #ffffff;
  --tcard-border:     rgba(0, 0, 0, 0.07);
  --tcard-radius:     12px;
  --tcard-shadow:     0 1px 4px rgba(0, 0, 0, 0.07);
  --tcard-title-col:  #111827;
  --tcard-expt-col:   #6b7280;

  --tcmp-thumb-w:     104px;
  --tcmp-gap:         16px;
  --tcmp-title-col:   #111827;
  --tcmp-read-col:    #9ca3af;
  --tcmp-cat-col:     #374151;
  --tcmp-border:      rgba(0, 0, 0, 0.07);
}

body.dark-mode {
  --tcol-bg:          #000000;
  --tcol-hdr-color:   rgba(255, 255, 255, 0.92);
  --tcard-bg:         #111827;
  --tcard-border:     rgba(255, 255, 255, 0.07);
  --tcard-shadow:     0 1px 4px rgba(0, 0, 0, 0.40);
  --tcard-title-col:  rgba(255, 255, 255, 0.92);
  --tcard-expt-col:   rgba(255, 255, 255, 0.50);
  --tcmp-title-col:   rgba(255, 255, 255, 0.90);
  --tcmp-read-col:    rgba(255, 255, 255, 0.42);
  --tcmp-cat-col:     rgba(255, 255, 255, 0.65);
  --tcmp-border:      rgba(255, 255, 255, 0.07);
}

/* ── Section wrapper ────────────────────────────────────────────────── */
.tcol-section {
  background: var(--tcol-bg);
  padding: var(--tcol-sec-pad) 0;
  transition: background-color 0.25s ease;
}

/* ── Inner container: 1180px — matches all other sections ───────────── */
.tcol-outer {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Three-column equal grid ────────────────────────────────────────── */
.tcol-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--tcol-gap);
  align-items: start;
}

/* ── Single column ──────────────────────────────────────────────────── */
.tcol-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Column mini-header: title + chevron (no Find More) ─────────────── */
.tcol-hdr {
  margin-bottom: var(--tcol-hdr-mb);
}

.tcol-hdr__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--tcol-hdr-size);
  font-weight: 700;
  line-height: 1.2;
  color: var(--tcol-hdr-color);
}

.tcol-hdr__chevron {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  color: var(--tcol-hdr-color);
  opacity: 0.45;
}

/* =====================================================================
   Featured card  (.tcard)
   Image on top (16:9), content below — NOT overlay style.
   ===================================================================== */

.tcard {
  display: flex;
  flex-direction: column;
  background: var(--tcard-bg);
  border-radius: var(--tcard-radius);
  overflow: hidden;
  border: 1px solid var(--tcard-border);
  box-shadow: var(--tcard-shadow);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  margin-bottom: 14px;
}

.tcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

body.dark-mode .tcard:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.50);
}

/* ── Thumbnail wrapper: 16:9 ────────────────────────────────────────── */
.tcard__img-wrap {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
  text-decoration: none;
}

body.dark-mode .tcard__img-wrap {
  background: rgba(255, 255, 255, 0.08);
}

.tcard__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tcard:hover .tcard__img {
  transform: scale(1.05);
}

/* ── Card body ──────────────────────────────────────────────────────── */
.tcard__body {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  padding: 13px 15px 15px;
}

/* ── Category badge ─────────────────────────────────────────────────── */
.tcard__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  margin-bottom: 8px;
  width: fit-content;
  text-decoration: none;
  background: hsl(calc(var(--badge-hue, 258) * 1deg) 85% 94% / 0.9);
}

body.dark-mode .tcard__badge {
  background: hsl(calc(var(--badge-hue, 258) * 1deg) 60% 30% / 0.50);
}

.tcard__badge-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: hsl(calc(var(--badge-hue, 258) * 1deg) 70% 48%);
}

.tcard__badge-text {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: hsl(calc(var(--badge-hue, 258) * 1deg) 70% 38%);
  text-decoration: none;
}

body.dark-mode .tcard__badge-text {
  color: hsl(calc(var(--badge-hue, 258) * 1deg) 80% 72%);
}

/* ── Title ──────────────────────────────────────────────────────────── */
.tcard__title {
  margin: 0 0 7px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.42;
  color: var(--tcard-title-col);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tcard__title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tcard__title-link:hover {
  color: #e71d36;
}

body.dark-mode .tcard__title-link:hover {
  color: #ff4d6d;
}

/* ── Excerpt ────────────────────────────────────────────────────────── */
.tcard__excerpt {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--tcard-expt-col);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1 1 auto;
}

/* ── Meta row ───────────────────────────────────────────────────────── */
.tcard__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  min-width: 0;
  margin-top: auto;
}

.tcard__av-wrap {
  flex-shrink: 0;
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  text-decoration: none;
}

.tcard__avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.tcard__author {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: var(--tcard-expt-col);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.tcard__author:hover {
  color: #e71d36;
}

body.dark-mode .tcard__author:hover {
  color: #ff4d6d;
}

.tcard__sep {
  color: var(--tcmp-read-col);
  font-size: 11px;
  line-height: 1;
  flex-shrink: 0;
}

.tcard__clock {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: var(--tcmp-read-col);
  line-height: 1;
}

.tcard__clock svg { display: block; }

.tcard__readtime {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1;
  color: var(--tcmp-read-col);
  white-space: nowrap;
}

.tcard__share {
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--tcmp-read-col);
  cursor: pointer;
  border-radius: 999px;
  padding: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.tcard__share:hover {
  background: rgba(231, 29, 54, 0.10);
  color: #e71d36;
}

body.dark-mode .tcard__share:hover {
  background: rgba(255, 77, 109, 0.14);
  color: #ff4d6d;
}

.tcard__share svg { display: block; }

/* =====================================================================
   Compact post list  (.tcmp-*)
   Horizontal item: small thumbnail left + content (badge, title, read) right
   ===================================================================== */

.tcmp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--tcmp-gap);
}

.tcmp-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

/* ── Thumbnail ──────────────────────────────────────────────────────── */
.tcmp__thumb-wrap {
  flex-shrink: 0;
  display: block;
  width: var(--tcmp-thumb-w);
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: #e5e7eb;
  text-decoration: none;
}

body.dark-mode .tcmp__thumb-wrap {
  background: rgba(255, 255, 255, 0.08);
}

.tcmp__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.38s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tcmp-item:hover .tcmp__thumb {
  transform: scale(1.06);
}

/* ── Content ────────────────────────────────────────────────────────── */
.tcmp__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ── Category badge (compact, no bg) ───────────────────────────────── */
.tcmp__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  width: fit-content;
}

.tcmp__badge-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: hsl(calc(var(--badge-hue, 258) * 1deg) 70% 48%);
}

.tcmp__badge-text {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: hsl(calc(var(--badge-hue, 258) * 1deg) 65% 45%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

body.dark-mode .tcmp__badge-text {
  color: hsl(calc(var(--badge-hue, 258) * 1deg) 75% 68%);
}

/* ── Title ──────────────────────────────────────────────────────────── */
.tcmp__title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.42;
  color: var(--tcmp-title-col);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tcmp__title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tcmp__title-link:hover {
  color: #e71d36;
}

body.dark-mode .tcmp__title-link:hover {
  color: #ff4d6d;
}

/* ── Read time ──────────────────────────────────────────────────────── */
.tcmp__read {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  line-height: 1;
  color: var(--tcmp-read-col);
}

.tcmp__read svg { display: block; flex-shrink: 0; }

/* =====================================================================
   Responsive
   ===================================================================== */

/* Tablet: 2 columns (≤1024px) */
@media (max-width: 1024px) {
  :root {
    --tcol-sec-pad: 15px;
  }

  .tcol-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hide 3rd column at tablet if only 2 fit cleanly */
  .tcol-col:nth-child(3) {
    display: none;
  }
}

/* Tablet-wide: keep 3 but allow wrap (≤960px) — override above on wider tablets */
@media (min-width: 769px) and (max-width: 1024px) {
  .tcol-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tcol-col:nth-child(3) {
    display: none;
  }
}

/* Mobile: single column (≤768px) */
@media (max-width: 768px) {
  :root {
    --tcol-sec-pad: 15px;
    --tcmp-thumb-w: 90px;
  }

  .tcol-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .tcol-col:nth-child(3) {
    display: flex;
  }

  .tcard__body {
    padding: 11px 13px 13px;
  }
}

/* Small mobile: tighten spacing (≤480px) */
@media (max-width: 480px) {
  :root {
    --tcol-sec-pad: 15px;
    --tcmp-thumb-w: 80px;
    --tcmp-gap:     14px;
  }

  .tcard__title {
    font-size: 14px;
  }
}

/* ==========================================================================
   Stories Slider  (.stsl-* / .scard)
   ========================================================================== */

/* ── Section-level CSS variables ── */
:root {
  --stsl-bg:           #ffffff;
  --stsl-sec-pad:      15px;
  --stsl-card-bg:      #f3f4f6;
  --stsl-card-radius:  16px;
  --stsl-card-pad-v:   30px;
  --stsl-card-pad-h:   28px;
  --stsl-col-gap:      24px;
  --stsl-row-gap:      28px;

  --scard-thumb-w:     160px;
  --scard-gap:         18px;

  --scard-title-col:   #111827;
  --scard-hover-col:   #e71d36;
  --scard-meta-col:    #6b7280;
  --scard-border-col:  #e5e7eb;

  --stsl-nav-col:      #374151;
  --stsl-nav-border:   #d1d5db;
  --stsl-nav-hover-bg: #e71d36;
}

body.dark-mode {
  --stsl-bg:           #000000;
  --stsl-card-bg:      #111827;

  --scard-title-col:   rgba(255, 255, 255, 0.92);
  --scard-hover-col:   #ff4d6d;
  --scard-meta-col:    rgba(255, 255, 255, 0.42);
  --scard-border-col:  rgba(255, 255, 255, 0.07);

  --stsl-nav-col:      rgba(255, 255, 255, 0.72);
  --stsl-nav-border:   rgba(255, 255, 255, 0.18);
  --stsl-nav-hover-bg: #ff4d6d;
}

/* ── Section wrapper ── */
.stsl-section {
  background: var(--stsl-bg);
  padding: var(--stsl-sec-pad) 0;
  transition: background-color 0.25s ease;
}

.stsl-outer {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Container card (dark/light box) ── */
.stsl-card {
  background:    var(--stsl-card-bg);
  border-radius: var(--stsl-card-radius);
  padding:       var(--stsl-card-pad-v) var(--stsl-card-pad-h);
  transition: background-color 0.25s ease;
}

/* ── Slider viewport: clips overflow so off-screen slides hide ── */
.stsl-viewport {
  overflow: hidden;
}

/* ── Track: all slides laid out horizontally, translateX switches ── */
.stsl-track {
  display:    flex;
  transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.stsl-slide {
  flex:  0 0 100%;
  width: 100%;
}

/* ── 3-column story card grid ── */
.stsl-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap:            var(--stsl-col-gap);
  row-gap:               var(--stsl-row-gap);
}

/* ── Navigation row ── */
.stsl-nav {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             var(--mega-nav-gap, 6px);
  margin-top:      28px;
}

.stsl-nav__btn {
  width:           var(--mega-nav-size, 30px);
  height:          var(--mega-nav-size, 30px);
  padding:         0;
  border:          0;
  border-radius:   var(--mega-nav-radius, 8px);
  background:      var(--mega-nav-bg, rgb(239, 242, 245));
  color:           var(--mega-nav-color, #0a0a0a);
  display:         flex;
  align-items:     center;
  justify-content: center;
  cursor:          pointer;
  flex-shrink:     0;
  line-height:     0;
  transition:      background-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.stsl-nav__btn svg {
  display: block;
}

.stsl-nav__btn:hover:not(:disabled) {
  background:   var(--mega-nav-bg-hover, var(--hdr-primary, #7118ff));
  color:        var(--mega-nav-color-hover, #ffffff);
}

.stsl-nav__btn:disabled {
  opacity: 0.6;
  cursor:  not-allowed;
}

.stsl-nav__btn:focus-visible {
  outline: 2px solid var(--hdr-primary, #7118ff);
  outline-offset: 2px;
}

/* ── Story card ── */
.scard {
  display:     flex;
  gap:         var(--scard-gap);
  align-items: flex-start;
}

/* ── Thumbnail: landscape 4:3 rectangle ── */
.scard__thumb-wrap {
  flex:          0 0 var(--scard-thumb-w);
  width:         var(--scard-thumb-w);
  aspect-ratio:  4 / 3;
  border-radius: 10px;
  overflow:      hidden;
  display:       block;
  background:    var(--scard-border-col);
}

.scard__thumb {
  width:      100%;
  height:     100%;
  object-fit: cover;
  display:    block;
  transition: transform 0.28s ease;
}

.scard__thumb-wrap:hover .scard__thumb {
  transform: scale(1.04);
}

/* ── Content area ── */
.scard__body {
  flex:           1;
  min-width:      0;
  display:        flex;
  flex-direction: column;
  gap:            8px;
}

/* ── Category badge — reuses --badge-hue from other sections ── */
.scard__badge {
  display:         inline-flex;
  align-items:     center;
  gap:             4px;
  font-size:       12px;
  font-weight:     700;
  color:           hsl(calc(var(--badge-hue, 258) * 1deg) 65% 45%);
  text-decoration: none;
  line-height:     1;
  width:           fit-content;
}

body.dark-mode .scard__badge {
  color: hsl(calc(var(--badge-hue, 258) * 1deg) 75% 68%);
}

.scard__badge-dot {
  width:         5px;
  height:        5px;
  border-radius: 50%;
  background:    currentColor;
  flex-shrink:   0;
}

/* ── Title ── */
.scard__title {
  margin:               0;
  font-size:            14px;
  font-weight:          600;
  line-height:          1.42;
  color:                var(--scard-title-col);
  display:              -webkit-box;
  -webkit-line-clamp:   2;
  line-clamp:           2;
  -webkit-box-orient:   vertical;
  overflow:             hidden;
}

.scard__title-link {
  color:           inherit;
  text-decoration: none;
  transition:      color 0.18s ease;
}

.scard__title-link:hover {
  color: var(--scard-hover-col);
}

/* ── Read time ── */
.scard__read {
  display:     flex;
  align-items: center;
  gap:         4px;
  font-size:   12px;
  color:       var(--scard-meta-col);
}

/* ── Responsive: 2 cols ≤ 1024px ── */
@media (max-width: 1024px) {
  :root {
    --stsl-sec-pad:   15px;
    --stsl-card-pad-v: 24px;
    --stsl-card-pad-h: 22px;
    --stsl-col-gap:   20px;
    --stsl-row-gap:   22px;
    --scard-thumb-w:  130px;
    --scard-gap:      14px;
  }

  .stsl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Responsive: 1 col ≤ 640px ── */
@media (max-width: 640px) {
  :root {
    --stsl-sec-pad:   15px;
    --stsl-card-pad-v: 18px;
    --stsl-card-pad-h: 16px;
    --stsl-col-gap:   14px;
    --stsl-row-gap:   16px;
    --scard-thumb-w:  100px;
    --scard-gap:      12px;
  }

  .stsl-grid {
    grid-template-columns: 1fr;
  }

  /* Remove horizontal padding from card and move it inside each slide.
     This ensures the viewport fills the full card width so adjacent
     slides cannot peek through the card's padding area. */
  .stsl-card {
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
  }

  .stsl-slide {
    padding: 0 var(--stsl-card-pad-h);
    box-sizing: border-box;
  }

  .stsl-nav {
    padding-left: var(--stsl-card-pad-h);
    padding-right: var(--stsl-card-pad-h);
  }
}
