/*
Theme Name: Fin AlpaOne v3
Template: fin
Author: Andrii Khimich
Version: 1.0.0
Description: Card-first editorial skin for the Fin skeleton theme — redesigned post cards (floating tag, reading time, arrow action, overlay featured, numbered list) on top of the AlpaOne structure.
Text Domain: fin
*/

/* Colors here are variables only (--primary-color, --secondary-color,
   --text-color, --bg-color, --surface-color, --border-color, plus shades
   derived from them via color-mix()) — never a hardcoded value. See
   THEME-DEV.md in the parent theme. Fallback values below match the
   defaults functions.php seeds on activation; the Customizer's own inline
   <style> (printed after this file) always wins in practice. */
:root {
  --primary-color: #f2545b;
  --secondary-color: #1b2a4a;
  --text-color: #1f2430;
  --text-muted: #7a8087;
  --bg-color: #ffffff;
  --surface-color: #ffffff;
  --bg-light: #f6f4f1;
  --border-color: #ececec;

  /* Dark sections (footer, promo banners) invert text/bg rather than
     introducing new tokens — same trick as .page__header in v1, just run
     the other direction since this theme's base direction is light. */
  --dark-surface: var(--text-color);
  --dark-text: var(--bg-color);
  --dark-text-muted: color-mix(in srgb, var(--bg-color) 65%, var(--text-color));
}
form {
  position: relative;
}
/* Search form — same rounded input + filled button language as
   .v3-newsletter__inline-form, so search and newsletter signup read as one
   consistent style instead of two unrelated form designs. Covers the
   header overlay search AND the inline form (page-search.php,
   .no-results), since both reuse the same .search__form/.search__input/
   .search__button_submit classes from the parent theme. */
.search__wrapper {
  background-color: var(--surface-color);
  border-top: none;
  border-radius: 16px;
}

.search__title {
  border-bottom-color: var(--border-color);
}

.search__title h3 {
  color: var(--text-color);
}

.search__title p {
  color: var(--text-muted);
}

.search__button_close {
  border-radius: 50%;
  border-color: var(--border-color);
  color: var(--text-muted);
}

.search__button_close:hover {
  background: var(--primary-color);
  color: var(--bg-color);
}

.search__form {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
}

.search__input {
  height: 48px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-light);
  color: var(--text-color);
}

.search__input::placeholder {
  color: var(--text-muted);
  font-style: normal;
}

.search__input:focus {
  background: var(--bg-light);
  border-color: var(--primary-color);
  box-shadow: none;
}

.search__button_submit {
  height: 48px;
  padding: 0 24px;
  border-radius: 8px;
  background: var(--primary-color);
  color: var(--bg-color);
  border: none;
}

.search__button_submit:hover {
  background: color-mix(in srgb, var(--primary-color) 85%, black);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ─── Podcast Hero (Section 0) ────────────────────────────────────────────
   Split layout: big headline on a soft tinted background, and a dark
   "player deck" card (cover art, now playing, player, numbered queue).
   The hero image from the Customizer is used as the deck's cover art.
   Colors: variables only. ─────────────────────────────────────────────── */
.v3-podcast-hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: center;
  background: var(--secondary-color);
  color: var(--bg-color);
}

.v3-podcast-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  animation: v3-kenburns 24s ease-in-out infinite alternate;
}

@keyframes v3-kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.v3-podcast-hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--text-color) 88%, transparent) 0%, color-mix(in srgb, var(--text-color) 55%, transparent) 55%, color-mix(in srgb, var(--text-color) 35%, transparent) 100%);
}

/* Decorations — sit above the photo, below the content */
.v3-podcast-hero__decor {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.v3-decor-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: v3-float 14s ease-in-out infinite;
}

.v3-decor-orb--1 {
  top: -120px;
  right: 8%;
  width: 420px;
  height: 420px;
  background: var(--primary-color);
}

.v3-decor-orb--2 {
  bottom: -160px;
  left: 4%;
  width: 360px;
  height: 360px;
  background: var(--secondary-color);
  animation-delay: -6s;
}

.v3-decor-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--bg-color) 28%, transparent);
  animation: v3-spin 40s linear infinite;
}

.v3-decor-ring::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-color);
}

.v3-decor-ring--1 {
  top: 8%;
  right: -120px;
  width: 520px;
  height: 520px;
}

.v3-decor-ring--2 {
  bottom: -140px;
  left: 30%;
  width: 340px;
  height: 340px;
  animation-direction: reverse;
  animation-duration: 55s;
}

.v3-decor-dots {
  position: absolute;
  top: 56px;
  left: 4%;
  width: 140px;
  height: 140px;
  background-image: radial-gradient(color-mix(in srgb, var(--bg-color) 45%, transparent) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  animation: v3-float 10s ease-in-out infinite;
}

.v3-decor-chip {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 800;
  color: var(--bg-color);
  background: color-mix(in srgb, var(--bg-color) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--bg-color) 35%, transparent);
  backdrop-filter: blur(6px);
  animation: v3-float 7s ease-in-out infinite;
}

.v3-decor-chip--1 { top: 18%; left: 46%; }
.v3-decor-chip--2 { bottom: 16%; left: 40%; width: 44px; height: 44px; font-size: 18px; animation-delay: -2.5s; }
.v3-decor-chip--3 { top: 12%; right: 6%; width: 48px; height: 48px; background: var(--primary-color); border-color: transparent; animation-delay: -4s; }

.v3-decor-chart {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 160px;
  opacity: 0.5;
}

.v3-decor-chart__line {
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: v3-draw 6s ease-in-out infinite;
}

@keyframes v3-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, -22px); }
}

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

@keyframes v3-draw {
  0% { stroke-dashoffset: 1400; }
  60%, 85% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1400; }
}

.v3-podcast-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 64px;
  width: 100%;
  max-width: 1360px;
  padding-top: 96px;
  padding-bottom: 96px;
}

.v3-podcast-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 7px 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-color) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--bg-color) 30%, transparent);
  backdrop-filter: blur(6px);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bg-color);
}

.v3-podcast-hero__live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  animation: v3-pulse 1.8s ease-out infinite;
}

@keyframes v3-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary-color) 55%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent; }
}

.v3-podcast-hero__title {
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--bg-color);
  margin: 0 0 20px;
}

.v3-podcast-hero__subtitle {
  font-size: var(--text-md);
  color: color-mix(in srgb, var(--bg-color) 82%, transparent);
  max-width: 46ch;
  line-height: 1.65;
  margin: 0 0 32px;
}

.v3-podcast-hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.v3-podcast-hero__button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-color);
  color: var(--bg-color);
  border-radius: 999px;
  padding: 16px 30px;
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.v3-podcast-hero__button:hover {
  background: color-mix(in srgb, var(--primary-color) 85%, black);
  transform: translateY(-2px);
}

.v3-podcast-hero__link {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--bg-color);
  text-decoration: none;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 2px;
}

.v3-podcast-hero__link:hover {
  color: var(--primary-color);
}

/* Deck — dark card with the player */
.v3-podcast-hero__deck {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border-radius: 32px;
  background: color-mix(in srgb, var(--text-color) 82%, transparent);
  backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--bg-color) 18%, transparent);
  color: var(--bg-color);
  box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--text-color) 60%, transparent);
}

.v3-podcast-hero__cover {
  position: relative;
  height: 180px;
  border-radius: 20px;
  overflow: hidden;
  background-color: var(--secondary-color);
  background-size: cover;
  background-position: center;
}

.v3-podcast-hero__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--text-color) 70%, transparent), transparent 60%);
}

.v3-podcast-hero__eq {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 0 18px;
}

.v3-podcast-hero__eq i {
  display: block;
  flex: 1;
  height: 100%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--primary-color) 85%, transparent), color-mix(in srgb, var(--bg-color) 35%, transparent));
  transform-origin: bottom;
  animation: v3-eq 1.1s ease-in-out infinite;
}

.v3-podcast-hero__eq i:nth-child(2) { animation-delay: -0.3s; }
.v3-podcast-hero__eq i:nth-child(3) { animation-delay: -0.6s; }
.v3-podcast-hero__eq i:nth-child(4) { animation-delay: -0.9s; }

@keyframes v3-eq {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .v3-podcast-hero__live,
  .v3-podcast-hero__eq i,
  .v3-podcast-hero__bg,
  .v3-podcast-hero__decor * {
    animation: none !important;
  }

  .v3-decor-chart__line {
    stroke-dashoffset: 0;
  }
}

.v3-podcast-hero__now-playing {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 6px;
}

.v3-podcast-hero__now-playing-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-color);
}

.v3-podcast-hero__now-playing-title {
  font-size: var(--text-lg, 20px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--bg-color);
  text-decoration: none;
}

.v3-podcast-hero__now-playing-title:hover {
  text-decoration: underline;
}

.v3-podcast-hero__now-playing-guest {
  font-size: var(--text-sm);
  color: color-mix(in srgb, var(--bg-color) 65%, transparent);
}

.v3-podcast-hero__deck .podcast-player {
  background: color-mix(in srgb, var(--bg-color) 10%, transparent);
  border-color: color-mix(in srgb, var(--bg-color) 15%, transparent);
}

.v3-podcast-hero__deck .podcast-player__progress {
  background: color-mix(in srgb, var(--bg-color) 22%, transparent);
}

.v3-podcast-hero__deck .podcast-player__time {
  color: color-mix(in srgb, var(--bg-color) 75%, transparent);
}

.v3-podcast-hero__list {
  list-style: none;
  margin: 0;
  padding: 14px 6px 0;
  border-top: 1px solid color-mix(in srgb, var(--bg-color) 15%, transparent);
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: v3-queue;
}

.v3-podcast-hero__list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  counter-increment: v3-queue;
}

.v3-podcast-hero__list-item::before {
  content: counter(v3-queue, decimal-leading-zero);
  font-size: var(--text-xs);
  font-weight: 700;
  min-width: 2ch;
  color: color-mix(in srgb, var(--bg-color) 45%, transparent);
}

.v3-podcast-hero__list-title {
  flex: 1;
  min-width: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--bg-color);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-podcast-hero__list-title:hover {
  color: var(--primary-color);
}

.v3-podcast-hero__list-item .podcast-player--sm {
  flex-shrink: 0;
}

/* ─── Podcast Player (shared, sm/lg via modifier) — same structure as
   fin-alpaOne_v1's, restyled automatically since it only uses generic
   tokens (surface/border/primary/white/muted), already correct for this
   theme's light palette. ────────────────────────────────────────────── */
.podcast-player {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 8px 20px 8px 8px;
}

.podcast-player__audio {
  display: none;
}

.podcast-player__toggle {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.podcast-player__toggle:hover {
  background: color-mix(in srgb, var(--primary-color) 85%, black);
}

.podcast-player__icon {
  width: 18px;
  height: 18px;
}

.podcast-player__icon-pause {
  display: none;
}

.podcast-player.is-playing .podcast-player__icon-play {
  display: none;
}

.podcast-player.is-playing .podcast-player__icon-pause {
  display: block;
}

.podcast-player__progress {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--border-color);
  cursor: pointer;
  position: relative;
  min-width: 60px;
}

.podcast-player__progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--primary-color);
}

.podcast-player__time {
  flex-shrink: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}

.podcast-player--lg {
  padding: 10px 28px 10px 10px;
  gap: 18px;
}

.podcast-player--lg .podcast-player__toggle {
  width: 56px;
  height: 56px;
}

.podcast-player--lg .podcast-player__icon {
  width: 22px;
  height: 22px;
}

.podcast-player--lg .podcast-player__progress {
  height: 8px;
}

.podcast-player--lg .podcast-player__time {
  font-size: var(--text-sm);
}

@media (max-width: 991px) {
  .v3-podcast-hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .v3-podcast-hero {
    min-height: 0;
  }

  .v3-decor-chip--1,
  .v3-decor-chip--2 {
    display: none;
  }
}

/* ─── Archive header (archive.php) — plain light banner by default, or a
   photo hero (same vignette trick as the podcast hero, no customizable
   overlay needed here) when the category has a background image set. ─── */
.v3-archive-header {
  background: var(--bg-light);
  padding: 56px 0;
  text-align: center;
}

.v3-archive-header__title {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--text-color);
  margin: 0;
}

.v3-archive-header__description {
  color: var(--text-muted);
  max-width: 60ch;
  margin: 12px auto 0;
}

.v3-archive-header--has-image {
  position: relative;
  overflow: hidden;
  padding: 100px 0;
}

.v3-archive-header__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.v3-archive-header__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--secondary-color) 55%, transparent) 0%,
    color-mix(in srgb, var(--secondary-color) 80%, transparent) 100%
  );
}

.v3-archive-header--has-image .v3-archive-header__inner {
  position: relative;
  z-index: 1;
}

.v3-archive-header--has-image .v3-archive-header__title {
  color: var(--bg-color);
}

.v3-archive-header--has-image .v3-archive-header__description {
  color: color-mix(in srgb, var(--bg-color) 85%, transparent);
}

/* ─── Single post — same rounded-card visual language as the rest of the
   site (see .v3-card__thumb, .v3-card__badge) instead of the parent's
   plain default look. Pure CSS on the parent's existing classes, no
   markup changes needed. ────────────────────────────────────────────── */
.single .single__image {
  border-radius: 20px;
  border: none;
  overflow: hidden;
}

.single .breadcrumbs {
  color: var(--text-muted);
  border-bottom-color: var(--border-color);
}

.single .breadcrumbs__link {
  color: var(--text-muted);
}

.single .breadcrumbs__link:hover {
  color: var(--primary-color);
}

.single .breadcrumbs__current {
  color: var(--text-color);
}

.single .title-2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
}

.single .single__meta {
  display: flex;
  width: fit-content;
  background: var(--bg-light);
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  margin: 0 auto 40px;
}

.single .single__meta-item {
  color: var(--text-muted);
}

.single .single__meta-item svg {
  display: none;
}

.single .single__meta-item_category {
  background: var(--primary-color);
  border-radius: 999px;
  padding: 4px 14px;
  margin-left: -6px;
}

.single .single__meta-item_category a {
  color: var(--bg-color);
}

.single .single__text {
  color: var(--text-color);
}

/* ─── Section headings — shared across V3's section blocks ──────────────── */
.v3-featured__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.v3-view-all {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  white-space: nowrap;
}

.v3-view-all:hover {
  text-decoration: underline;
}

/* ─── Post card (shared: grid / featured / list-sm) ─────────────────────────
   v3 design: bordered tile, image inset with rounded corners, plain-text
   category tag with a dot, reading-time footer and a round arrow that fills
   with the primary color on hover. Colors: variables only. */
.v3-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 10px 10px 18px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.v3-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary-color) 40%, var(--border-color));
  box-shadow: 0 18px 36px -18px color-mix(in srgb, var(--text-color) 28%, transparent);
}

.v3-card__thumb {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-light);
  aspect-ratio: 16 / 11;
}

.v3-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.v3-card:hover .v3-card__thumb img {
  transform: scale(1.06);
}

.v3-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 0 10px;
}

.v3-card__tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
  text-decoration: none;
}

.v3-card__tag::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
}

.v3-card__title {
  font-size: var(--text-md);
  line-height: 1.3;
  margin: 0;
}

.v3-card__title a {
  color: var(--text-color);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.3s ease;
}

.v3-card:hover .v3-card__title a {
  background-size: 100% 2px;
}

.v3-card__excerpt {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.v3-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--border-color);
}

.v3-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.v3-card__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

.v3-card__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.v3-card:hover .v3-card__arrow {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--bg-color);
  transform: rotate(45deg);
}

/* Featured variant — full-bleed image with the text over a gradient */
.v3-card--featured {
  padding: 0;
  gap: 0;
  min-height: 420px;
  overflow: hidden;
  border: none;
  background: var(--text-color);
}

.v3-card--featured .v3-card__thumb {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  border-radius: 0;
}

.v3-card--featured .v3-card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--text-color) 92%, transparent) 8%, transparent 70%);
}

.v3-card--featured .v3-card__body {
  position: relative;
  z-index: 1;
  justify-content: flex-end;
  padding: 28px;
  pointer-events: none;
}

.v3-card--featured .v3-card__body a {
  pointer-events: auto;
}

.v3-card--featured .v3-card__tag {
  padding: 6px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-color) 18%, transparent);
  backdrop-filter: blur(8px);
  color: var(--bg-color);
}

.v3-card--featured .v3-card__tag::before {
  background: var(--bg-color);
}

.v3-card--featured .v3-card__title {
  font-size: var(--text-xl);
}

.v3-card--featured .v3-card__title a,
.v3-card--featured .v3-card__excerpt,
.v3-card--featured .v3-card__meta {
  color: var(--bg-color);
}

.v3-card--featured .v3-card__dot {
  background: var(--bg-color);
}

.v3-card--featured .v3-card__footer {
  border-top-color: color-mix(in srgb, var(--bg-color) 30%, transparent);
}

.v3-card--featured .v3-card__arrow {
  color: var(--bg-color);
  border-color: color-mix(in srgb, var(--bg-color) 50%, transparent);
}

/* List-sm variant — numbered compact row */
.v3-card--list-sm {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
  counter-increment: v3-rank;
}

.v3-card--list-sm::before {
  content: counter(v3-rank, decimal-leading-zero);
  font-size: var(--text-lg, 20px);
  font-weight: 800;
  line-height: 1;
  color: var(--border-color);
  min-width: 2ch;
  transition: color 0.25s ease;
}

.v3-card--list-sm:hover {
  transform: translateX(4px);
}

.v3-card--list-sm:hover::before {
  color: var(--primary-color);
}

.v3-card--list-sm .v3-card__thumb {
  width: 72px;
  height: 72px;
  aspect-ratio: auto;
  flex-shrink: 0;
  border-radius: 14px;
}

.v3-card--list-sm .v3-card__body {
  padding: 0;
  gap: 4px;
}

.v3-card--list-sm .v3-card__title {
  font-size: var(--text-sm);
}

.v3-card--list-sm .v3-card__tag,
.v3-card--list-sm .v3-card__arrow,
.v3-card--list-sm .v3-card__read,
.v3-card--list-sm .v3-card__dot {
  display: none;
}

.v3-card--list-sm .v3-card__footer {
  padding: 0;
  border: none;
}

.v3-popular-list,
.v3-featured__list,
.v3-weekly__list {
  counter-reset: v3-rank;
}

/* ─── Section 1: Hero grid ───────────────────────────────────────────────── */
.v3-hero__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ─── Section 2: Newsletter bar ─────────────────────────────────────────── */
.v3-newsletter {
  background: var(--bg-light);
  padding: 36px 0;
}

.v3-newsletter__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.v3-newsletter__title {
  font-size: var(--text-lg);
  margin: 0;
}

.v3-newsletter__inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.v3-newsletter__input {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: var(--text-sm);
  color: var(--text-color);
  min-width: 180px;
}

.v3-newsletter__input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.v3-newsletter__submit {
  background: var(--primary-color);
  color: var(--bg-color);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.v3-newsletter__submit:hover {
  background: color-mix(in srgb, var(--primary-color) 85%, black);
}

/* ─── Section 3: Explore Latest News + sidebar ──────────────────────────── */

/* Two direct children only: the featured card, and a .v3-featured__list
   wrapper for the rest — NOT one flat list of cards. A plain 2-column grid
   with implicit auto-placement would wrap the 2nd list-sm item back into
   column 1 underneath the featured card instead of stacking it in column
   2, leaving a blank gap (exactly the bug this structure avoids). */
.v3-featured__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

.v3-featured__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.v3-social-widget {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 24px;
}

.v3-social-widget__title {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
}

.v3-social-widget__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v3-social-widget__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  text-decoration: none;
}

.v3-social-widget__platform {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-color);
}

.v3-social-widget__count {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ─── Section 4: Our Top Categories ─────────────────────────────────────────
   Bento grid of image tiles: the first tile is large, the rest fill around
   it. Each tile shows a rank number, name, article count and an arrow. */
.v3-categories {
  background: var(--bg-light);
  padding: 72px 0;
}

.v3-categories__heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 32px;
}

.v3-categories__heading h2 {
  margin: 0;
}

.v3-categories__heading p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin: 0;
}

.v3-categories__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 170px;
  gap: 16px;
}

.v3-categories__item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 18px 20px;
  border-radius: 24px;
  text-decoration: none;
  background: var(--bg-light);
  color: var(--text-color);
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.v3-categories__item:first-child {
  grid-column: span 2;
  grid-row: span 2;
  padding: 28px;
}

.v3-categories__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -18px color-mix(in srgb, var(--text-color) 45%, transparent);
}

.v3-categories__item:not(.v3-categories__item--has-image) {
  background: var(--primary-color);
}

.v3-categories__item:not(.v3-categories__item--has-image):nth-child(even) {
  background: var(--secondary-color);
}

.v3-categories__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}

.v3-categories__item:hover .v3-categories__bg {
  transform: scale(1.08);
}

/* Bottom-up gradient keeps the label readable over any photo. */
.v3-categories__item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, color-mix(in srgb, var(--bg-color) 92%, transparent) 0%, color-mix(in srgb, var(--bg-color) 40%, transparent) 45%, transparent 75%);
}

.v3-categories__num {
  align-self: flex-start;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-color) 70%, transparent);
  backdrop-filter: blur(6px);
}

.v3-categories__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 48px;
}

.v3-categories__name {
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.2;
}

.v3-categories__item:first-child .v3-categories__name {
  font-size: var(--text-xl);
}

.v3-categories__count {
  font-size: var(--text-xs);
  opacity: 0.8;
}

.v3-categories__arrow {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--text-color) 55%, transparent);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.v3-categories__item:hover .v3-categories__arrow {
  background: var(--text-color);
  color: var(--bg-color);
  transform: rotate(45deg);
}

@media (max-width: 991px) {
  .v3-categories__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 599px) {
  .v3-categories {
    padding: 48px 0;
  }

  .v3-categories__list {
    grid-auto-rows: 140px;
  }

  .v3-categories__item:first-child {
    grid-column: span 2;
    grid-row: span 1;
    padding: 18px 20px;
  }
}

/* ─── Section 5: Weekly Top Stories ──────────────────────────────────────── */
/* Same two-children structure as .v3-featured__grid — see that comment. */
.v3-weekly__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

.v3-weekly__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ─── Promo banners (Sections 6 & 8) ─────────────────────────────────────── */
.v3-banner {
  padding: 56px 0;
}

.v3-banner--dark {
  background: var(--dark-surface);
  color: var(--dark-text);
}

.v3-banner--light {
  background: var(--bg-light);
}

.v3-banner__inner {
  display: flex;
  align-items: center;
  gap: 40px;
}

.v3-banner__inner--reverse {
  flex-direction: row-reverse;
}

.v3-banner__image {
  flex: 1;
  max-width: 360px;
  border-radius: 16px;
  object-fit: cover;
}

.v3-banner__content {
  flex: 1;
}

.v3-banner--dark .v3-banner__title {
  color: var(--dark-text);
}

.v3-banner__title {
  font-size: var(--text-2xl);
  margin: 0 0 12px;
}

.v3-banner--dark .v3-banner__subtitle {
  color: var(--dark-text-muted);
}

.v3-banner__subtitle {
  color: var(--text-muted);
  margin: 0 0 24px;
  line-height: 1.6;
}

.v3-banner__button {
  display: inline-flex;
  background: var(--primary-color);
  color: var(--bg-color);
  border-radius: 8px;
  padding: 14px 28px;
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
}

.v3-banner--dark .v3-banner__button {
  background: var(--primary-color);
  color: var(--dark-text);
}

.v3-banner__button:hover {
  background: color-mix(in srgb, var(--primary-color) 85%, black);
}

/* ─── Section 7: Latest Articles + Popular sidebar ──────────────────────── */
.v3-articles__layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.v3-articles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.v3-popular-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

@media (max-width: 767px) {
  .v3-popular-list {
    grid-template-columns: 1fr;
  }
}

/* Footer note: no override needed here. The parent's .footer already reads
   background-color: var(--ink) (= var(--text-color)) — since this theme's
   --text-color is dark navy, the footer already renders dark-on-light to
   match the source design automatically, with no extra CSS. */

/* ─── About section ─────────────────────────────────────────────────────── */
.v3-about__inner {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 48px;
  align-items: start;
}

.v3-about__eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-color);
}

.v3-about__title {
  margin: 0 0 20px;
  line-height: 1.2;
}

.v3-about__text p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 14px;
}

.v3-about__note {
  font-size: var(--text-sm);
  font-style: italic;
}

.v3-about__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.v3-about__point {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 22px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-color);
  border-radius: 16px;
}

.v3-about__point strong {
  color: var(--text-color);
}

.v3-about__point span {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

@media (max-width: 991px) {
  .v3-about__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .v3-hero__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .v3-featured__layout,
  .v3-articles__layout {
    grid-template-columns: 1fr;
  }

  .v3-featured__grid,
  .v3-weekly__grid {
    grid-template-columns: 1fr;
  }

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

  .v3-banner__inner,
  .v3-banner__inner--reverse {
    flex-direction: column;
    text-align: center;
  }

  .v3-banner__image {
    max-width: 100%;
  }
}

@media (max-width: 599px) {
  .v3-hero__grid,
  .v3-articles__grid {
    grid-template-columns: 1fr;
  }

  .v3-newsletter__inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .v3-newsletter__inline-form {
    flex-direction: column;
  }
}

.wpcf7-not-valid-tip {
  position: absolute;
  left: 0;
  top: -22px;
  font-size: 12px;
  color: tomato;
  width: 100%;
}
.screen-reader-response,
.hidden-fields-container {
  display: none;
}

.wpcf7-response-output {
  position: absolute;
  font-size: 12px;
  left: 0;
}

/* ─── FAQ accordion (Section 9) ──────────────────────────────────────────── */
.v3-faq__inner {
  max-width: 760px;
}

.v3-faq__heading {
  text-align: center;
  margin-bottom: 40px;
}

.v3-faq__eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.v3-faq__heading h2 {
  margin: 0 0 10px;
}

.v3-faq__heading p {
  color: var(--text-muted);
  margin: 0;
}

.v3-faq__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v3-faq__item {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.v3-faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
}

.v3-faq__icon {
  position: relative;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-color);
  transition: transform 0.2s ease;
}

.v3-faq__icon::before,
.v3-faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--bg-color);
  transform: translate(-50%, -50%);
}

.v3-faq__icon::before {
  width: 10px;
  height: 2px;
}

.v3-faq__icon::after {
  width: 2px;
  height: 10px;
}

.v3-faq__item.is-open .v3-faq__icon {
  transform: rotate(45deg);
}

.v3-faq__answer {
  padding: 0 24px 20px;
}

.v3-faq__answer p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Single podcast episode (single-podcast_episode.php) ─────────────────── */
.podcast-episode__header {
  padding: 32px 0;
  text-align: center;
}

.podcast-episode__cover {
  max-width: 260px;
  margin: 0 auto 24px;
  border-radius: 20px;
  overflow: hidden;
}

.podcast-episode__cover img {
  display: block;
  width: 100%;
  height: auto;
}

.podcast-episode__title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  margin: 0 0 12px;
}

.podcast-episode__meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: 28px;
}

.podcast-episode__guest {
  color: var(--primary-color);
  font-weight: 600;
}

.podcast-episode__player {
  max-width: 520px;
  margin: 0 auto;
}

.podcast-episode__notes {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 56px;
}

/* ─── Episodes archive (archive-podcast_episode.php) ──────────────────────── */
.v3-episodes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v3-episodes__item {
  display: grid;
  grid-template-columns: 88px 1fr minmax(220px, 320px);
  align-items: center;
  gap: 20px;
  padding: 12px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
}

.v3-episodes__cover {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-light);
}

.v3-episodes__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v3-episodes__title {
  font-size: var(--text-lg, 18px);
  line-height: 1.3;
  margin: 0 0 6px;
}

.v3-episodes__title a {
  color: var(--text-color);
  text-decoration: none;
}

.v3-episodes__title a:hover {
  color: var(--primary-color);
}

.v3-episodes__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.v3-episodes__guest {
  color: var(--primary-color);
  font-weight: 600;
}

@media (max-width: 768px) {
  .v3-episodes__item {
    grid-template-columns: 72px 1fr;
  }

  .v3-episodes__cover {
    width: 72px;
    height: 72px;
  }

  .v3-episodes__player {
    grid-column: 1 / -1;
  }
}
