/*
Theme Name: The French Castle
Theme URI: https://thefrenchcastle.com
Author: Pauline Bernier
Description: A very simple theme — centered logo, and a homepage featured section showing the latest post with title, excerpt, and a playable audio player.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thefrenchcastle
*/

:root {
  --tfc-bg: #ffffff;
  --tfc-text: #1a1a1a;
  --tfc-muted: #666666;
  --tfc-border: #e6e6e6;
  --tfc-accent: #1a1a1a;
  --tfc-blue: #2872fa;
  --tfc-surface: #ffffff;    /* cards, inputs, buttons */
  --tfc-surface-2: #f2f2f2;  /* subtle fills, placeholders, hovers */
  --tfc-max: 720px;
}

/* Dark theme */
:root[data-theme="dark"] {
  --tfc-bg: #121214;
  --tfc-text: #e8e8ea;
  --tfc-muted: #9a9aa0;
  --tfc-border: #2e2e33;
  --tfc-accent: #e8e8ea;
  --tfc-surface: #1c1c1f;
  --tfc-surface-2: #26262b;
}
/* Dark-mode fixes for spots that use the orange accent instead of black */
:root[data-theme="dark"] .badge-level { border-color: var(--tfc-text); color: var(--tfc-text); }
:root[data-theme="dark"] .filter-btn.is-active,
:root[data-theme="dark"] .pagination .page-numbers.current {
  background: var(--tfc-blue);
  border-color: var(--tfc-blue);
  color: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--tfc-bg);
  color: var(--tfc-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}

a { color: inherit; }

/* ── Header (slim dark bar: brand + menu) ── */
.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 0 36px;
  background: #fff;
  transition: background-color .15s;
}
:root[data-theme="dark"] .site-header { background: #1b1b1d; }

/* Logo — far left */
.header-logo { justify-self: start; }
.header-logo a { display: flex; align-items: center; text-decoration: none; }
.header-logo img { display: block; max-height: 52px; width: auto; }
.header-logo-text {
  color: #111;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}
:root[data-theme="dark"] .header-logo-text { color: #fff; }

/* Center nav — Podcast / Foundations */
.header-center-nav { justify-self: center; }

/* Shared nav-list styles (center nav + right-side pages nav) */
.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-menu li { margin: 0; }
.nav-menu a {
  color: #111;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a { color: var(--tfc-blue); }
:root[data-theme="dark"] .nav-menu a { color: #fff; }

/* Right cluster — other pages, search, social, theme toggle */
.header-right { justify-self: end; display: flex; align-items: center; gap: 24px; }
.header-social { display: flex; align-items: center; gap: 14px; }
.header-social-link { display: inline-flex; color: #d42741; transition: color .15s; }
.header-social-link svg { width: 18px; height: 18px; fill: currentColor; }
.header-social-link:hover { color: #e2506a; }

.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 0;
  background: none;
  color: #111;
  cursor: pointer;
  line-height: 0;
  transition: color .15s;
}
.search-toggle:hover { color: var(--tfc-blue); }
.search-toggle svg { width: 18px; height: 18px; fill: currentColor; }
:root[data-theme="dark"] .search-toggle { color: #fff; }
.header-search {
  position: absolute;
  top: 100%;
  right: 36px;
  margin-top: 10px;
  z-index: 30;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
  padding: 10px;
}
.header-search form { display: flex; align-items: center; gap: 8px; }
.header-search input[type="search"] {
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--tfc-border);
  border-radius: 8px;
  width: 220px;
  background: #fff;
  color: #111;
}
.header-search input[type="search"]:focus { outline: none; border-color: var(--tfc-blue); }
.header-search button[type="submit"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: var(--tfc-blue);
  color: #fff;
  cursor: pointer;
}
.header-search button[type="submit"] svg { width: 16px; height: 16px; fill: currentColor; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 0;
  background: none;
  color: #111;
  cursor: pointer;
  line-height: 0;
  transition: color .15s;
}
.theme-toggle:hover { color: var(--tfc-blue); }
:root[data-theme="dark"] .theme-toggle { color: #fff; }
.theme-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.theme-icon { display: inline-flex; }
.theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: inline-flex; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }
@media (max-width: 768px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
    height: auto;
    padding: 16px;
    gap: 14px;
  }
  .header-logo,
  .header-center-nav,
  .header-right { justify-self: center; }
  .header-logo img { max-height: 40px; }
  .nav-menu { flex-wrap: wrap; justify-content: center; gap: 16px 20px; }
  .header-right { flex-wrap: wrap; justify-content: center; gap: 16px; }
  .header-search { left: 50%; right: auto; transform: translateX(-50%); }
}


/* ── Layout ── */
.site-main {
  max-width: var(--tfc-max);
  margin: 0 auto;
  padding: 48px 20px 80px;
}
/* Wider content area for the homepage grid, archives and search */
.home .site-main,
.archive .site-main,
.search .site-main,
.blog .site-main { max-width: 1080px; }

/* Archive / search header */
.archive-header { margin-bottom: 36px; }
.archive-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}
.archive-title .wp-block-heading,
.archive-description { color: var(--tfc-muted); }
.archive-description { margin-top: 10px; font-size: 15px; }

/* Pagination */
.pagination { margin-top: 48px; }
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--tfc-border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--tfc-text);
  font-size: 14px;
}
.pagination .page-numbers:hover { border-color: var(--tfc-muted); }
.pagination .page-numbers.current {
  background: var(--tfc-accent);
  border-color: var(--tfc-accent);
  color: #fff;
}

/* ── Featured section (homepage) ── */
.featured-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--tfc-muted);
  margin: 0 0 16px;
}
.featured-post {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  border: 1px solid var(--tfc-border);
  border-radius: 12px;
  padding: 32px;
}
.featured-thumb {
  flex: 0 0 42%;
  max-width: 42%;
  display: block;
  line-height: 0;
}
.featured-thumb img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}
.featured-body {
  flex: 1 1 auto;
  min-width: 0;
}
@media (max-width: 600px) {
  .featured-post { flex-direction: column; }
  .featured-thumb { flex-basis: auto; max-width: 100%; width: 100%; }
}
.featured-post .entry-title {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.2;
}
.featured-post .entry-title a { text-decoration: none; }
.featured-post .entry-title a:hover { text-decoration: underline; }
.featured-post .entry-meta {
  font-size: 13px;
  color: var(--tfc-muted);
  margin-bottom: 18px;
}
.featured-post .entry-excerpt {
  font-size: 17px;
  color: #333;
  margin-bottom: 22px;
}

/* ── Audio player ── */
.entry-audio { margin-top: 8px; }
.entry-audio audio {
  width: 100%;
  display: block;
}
/* SoundCloud (and other oEmbed) players */
.entry-audio iframe {
  width: 100%;
  border: 0;
  display: block;
}
.entry-audio .wp-embed-aspect-16-9,
.entry-audio .wp-block-embed__wrapper { width: 100%; }

/* ── Hero (podcast-style) ── */
:root { --tfc-blue: #2872fa; }
html, body { overflow-x: hidden; }

.hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: -48px; /* cancels .site-main top padding so it meets the header */
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  padding: 90px 6vw;
  color: #fff;
  background: #1a0a08 center/cover no-repeat;
}
.hero::after { /* neutral darkening for text contrast — no color tint */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.1) 75%),
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.15) 40%, rgba(0,0,0,.45));
  z-index: 1;
}
.hero-inner { position: relative; z-index: 2; max-width: 560px; }
.hero-heading {
  margin: 0 0 14px;
  font-size: clamp(32px, 4.4vw, 54px);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: break-word;
}
.hero-heading a { text-decoration: none; }
.hero-heading a:hover { text-decoration: underline; text-underline-offset: 6px; }
.hero-tagline {
  margin: 0 0 22px;
  font-size: 19px;
  font-weight: 600;
  color: rgba(255, 255, 255, .92);
}
.hero-text {
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .85);
}
.hero-excerpt {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .85);
}
.hero-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
  margin-top: 36px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 30px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.hero-cta:hover { background: #f1f1f1; transform: translateY(-1px); }
.hero-cta svg { width: 20px; height: 20px; fill: #111; }
.platform-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--tfc-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.platform-btn:hover { background: #e0440f; transform: translateY(-1px); }
.platform-ico { display: inline-flex; }

/* "Listen to us" (Apple / Spotify / Amazon Music / SoundCloud) */
.platform-apple, .platform-spotify, .platform-amazon, .platform-soundcloud {
  background: #2872fa;
}
.platform-apple:hover, .platform-spotify:hover, .platform-amazon:hover, .platform-soundcloud:hover {
  background: #2161d4;
}
/* "Follow us" / social links (X / Instagram / YouTube) */
.platform-x, .platform-instagram, .platform-youtube {
  background: #d42741;
}
.platform-x:hover, .platform-instagram:hover, .platform-youtube:hover {
  background: #b42137;
}
.platform-ico svg { width: 20px; height: 20px; fill: #fff; }

/* Now-playing card overlapping the hero's bottom edge (podcast archive hero) */
.hero-player {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  z-index: 5;
  width: min(1080px, calc(100% - 40px));
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 28px;
  background: #fff;
  color: #111;
  border-radius: 14px;
  box-shadow: 0 30px 60px rgba(0,0,0,.28);
}
.hero-player--embed { flex-direction: column; align-items: stretch; gap: 12px; }
.hero-player--embed .hp-info { max-width: none; }

/* .hp-* below are the shared player control styles — used by both the
   archive hero's overlapping card and .post-player (single episode page). */
.hp-play {
  flex: 0 0 auto;
  width: 72px; height: 72px;
  border: 0; border-radius: 50%;
  background: #2872fa;
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.hp-play:hover { background: #2161d4; }
.hp-play svg { width: 26px; height: 26px; fill: #fff; display: block; }
.hp-icon-pause { display: none; }
.is-playing .hp-icon-play { display: none; }
.is-playing .hp-icon-pause { display: inline-flex; }
.hp-info { flex: 0 0 auto; max-width: 220px; text-align: left; }
.hp-title {
  display: block;
  font-size: 18px; font-weight: 800; line-height: 1.2;
  color: #111; text-decoration: none;
}
.hp-title:hover { color: #2872fa; }
.hp-meta { margin-top: 6px; font-size: 13px; font-weight: 600; color: #2872fa; }
.hp-controls { flex: 1 1 auto; display: flex; align-items: center; gap: 16px; }
.hp-back15, .hp-fwd15 {
  flex: 0 0 auto;
  border: 1px solid #e4e4e4; background: #fff;
  border-radius: 999px; padding: 8px 12px;
  font-size: 12px; color: #333; cursor: pointer; white-space: nowrap;
}
.hp-back15:hover, .hp-fwd15:hover { border-color: #bbb; }
.hp-progress {
  flex: 1 1 auto; height: 4px; min-width: 60px;
  background: #e6e6e6; border-radius: 999px; position: relative; cursor: pointer;
}
.hp-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: #111; border-radius: 999px;
}
.hp-time { flex: 0 0 auto; font-size: 13px; color: #666; white-space: nowrap; }
.hp-vol {
  flex: 0 0 auto;
  width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: none; color: #111; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.hp-vol svg { width: 22px; height: 22px; fill: #111; }
.hp-vol:hover { background: #f2f2f2; }
.is-muted .hp-vol svg { fill: #bbb; }
.hp-embed { position: absolute; width: 1px; height: 1px; left: -9999px; overflow: hidden; }

.hero + .filter-bar,
.hero + .more-posts { margin-top: 48px; }

/* Any hero with an overlapping card (player, newsletter…) needs extra room below it */
.hero--overlap { padding-bottom: 90px; }
.hero--overlap + .filter-bar,
.hero--overlap + .more-posts { margin-top: 96px; }

/* Archive hero: centered content */
.hero--archive {
  min-height: 560px;
  justify-content: center;
  text-align: center;
}
.hero--archive .hero-inner { max-width: 640px; }
.hero--archive .hero-platforms { justify-content: center; }

/* Newsletter card overlapping the homepage hero */
.hero-newsletter {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  z-index: 5;
  width: min(1080px, calc(100% - 40px));
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 32px;
  background: #fff;
  color: #111;
  border-radius: 14px;
  box-shadow: 0 30px 60px rgba(0,0,0,.28);
  text-align: left;
}
.hero-newsletter-text { flex: 1 1 320px; }
.hero-newsletter-heading {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  color: #2872fa;
}
.hero-newsletter-sub {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #d42741;
}
.hero-newsletter-form { flex: 1 1 320px; min-width: 260px; }
.hero-newsletter-form img { max-width: 100%; }

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 56px 20px;
    flex-direction: column; /* stack .hero-inner above the overlapping card instead of side by side */
  }
  .hero-inner { max-width: 100%; }
  .hero-player,
  .hero-newsletter {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 22px;
    flex-wrap: wrap;
  }
  .hero--overlap + .filter-bar,
  .hero--overlap + .more-posts { margin-top: 36px; }
  .hp-info { max-width: none; }
  .hp-controls { order: 3; width: 100%; flex-wrap: wrap; gap: 10px; }
  .hp-progress { order: -1; flex-basis: 100%; min-width: 0; }
}

/* ── Term badges ── */
.entry-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
}
.badge {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--tfc-border);
  color: var(--tfc-muted);
  white-space: nowrap;
}
.badge:hover { color: var(--tfc-text); border-color: var(--tfc-muted); }
.badge-level {
  border-color: #1a1a1a;
  color: #1a1a1a;
  font-weight: 600;
  letter-spacing: .5px;
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--tfc-border);
}
.filter-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-group-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--tfc-muted);
  min-width: 70px;
}
.filter-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  font: inherit;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--tfc-border);
  background: var(--tfc-surface);
  color: var(--tfc-text);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.filter-btn:hover { border-color: var(--tfc-muted); }
.filter-btn.is-active {
  background: var(--tfc-accent);
  border-color: var(--tfc-accent);
  color: #fff;
}
.filter-reset {
  align-self: flex-start;
  font: inherit;
  font-size: 13px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--tfc-muted);
  text-decoration: underline;
  cursor: pointer;
}
.filter-reset:hover { color: var(--tfc-text); }

/* ── More posts grid ── */
.more-posts { margin-top: 48px; }
.blog-section {
  padding-top: 40px;
  border-top: 1px solid var(--tfc-border);
}
.blog-section-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--tfc-blue);
  font-weight: 600;
  text-decoration: none;
}
.blog-section-link:hover { text-decoration: underline; }
.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--tfc-muted);
  margin: 0 0 20px;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 32px;
}
@media (max-width: 780px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .post-grid { grid-template-columns: 1fr; } }
.post-card .card-thumb {
  display: block;
  line-height: 0;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--tfc-surface-2);
}
.post-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card .card-thumb-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(45deg, var(--tfc-surface-2), var(--tfc-surface-2) 10px, var(--tfc-border) 10px, var(--tfc-border) 20px);
}
.post-card .card-title {
  margin: 14px 0 10px;
  font-size: 20px;
  line-height: 1.3;
}
.post-card .card-title a { text-decoration: none; }
.post-card .card-title a:hover { text-decoration: underline; }
.post-card .entry-badges { margin-bottom: 0; }

.no-results {
  color: var(--tfc-muted);
  font-size: 15px;
  margin: 8px 0 0;
}

/* ── Single post & pages ── */
.single .site-main,
.page .site-main { max-width: 1080px; } /* wider for the two-column layout */
.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}
.single-post .entry-title {
  font-size: 36px;
  line-height: 1.2;
  margin: 0 0 12px;
}
.single-post .entry-meta {
  font-size: 13px;
  color: var(--tfc-muted);
  margin-bottom: 16px;
}
.single-post .entry-content {
  font-size: 18px;
  margin-top: 32px;
}
.page-thumb { margin: 20px 0 8px; line-height: 0; }
.page-thumb img { width: 100%; height: auto; border-radius: 12px; }
.single-post .entry-content p { margin: 0 0 20px; }
.single-post .entry-content img { max-width: 100%; height: auto; }

/* Static player card on the single page (reuses .hp-* controls) */
.post-player {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  padding: 16px 22px;
  background: var(--tfc-surface);
  border: 1px solid var(--tfc-border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}
/* Dark-mode adjustments for the in-article player (hero player stays light on the hero) */
:root[data-theme="dark"] .post-player .hp-title { color: var(--tfc-text); }
:root[data-theme="dark"] .post-player .hp-progress { background: var(--tfc-border); }
:root[data-theme="dark"] .post-player .hp-progress-fill { background: var(--tfc-text); }
:root[data-theme="dark"] .post-player .hp-time { color: var(--tfc-muted); }
:root[data-theme="dark"] .post-player .hp-back15,
:root[data-theme="dark"] .post-player .hp-fwd15 { background: var(--tfc-surface-2); color: var(--tfc-text); border-color: var(--tfc-border); }
:root[data-theme="dark"] .post-player .hp-vol svg { fill: var(--tfc-text); }
:root[data-theme="dark"] .post-player .hp-vol:hover { background: var(--tfc-surface-2); }

/* Episode "Also available on" (Apple / Spotify / YouTube buttons) */
.episode-platforms { margin: 24px 0; display: flex; flex-wrap: wrap; gap: 12px; }
.episode-platforms-label {
  width: 100%;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--tfc-muted);
  margin: 0 0 4px;
}

/* Social share rows */
.post-share {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--tfc-border);
  border-bottom: 1px solid var(--tfc-border);
}
.entry-content + .post-share { margin-top: 8px; }
.post-share-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--tfc-muted);
}
.post-share-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.share-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--tfc-border);
  background: var(--tfc-surface);
  color: var(--tfc-muted);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.share-btn svg { width: 18px; height: 18px; fill: currentColor; }
.share-btn:hover { background: var(--tfc-blue); border-color: var(--tfc-blue); color: #fff; }
.share-copied {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1b1b1d;
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.share-copy.is-copied .share-copied { opacity: 1; }

/* Glossary words + bubble */
.gloss {
  font: inherit;
  color: #d42741;
  background: rgba(212, 39, 65, .1);
  border: 0;
  border-bottom: 2px solid #d42741;
  border-radius: 3px;
  padding: 0 2px;
  cursor: pointer;
}
.gloss:hover,
.gloss.is-open { background: rgba(212, 39, 65, .22); }
.gloss-bubble {
  position: absolute;
  z-index: 60;
  max-width: 260px;
  background: #1b1b1d;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
}
.gloss-bubble strong { color: #d42741; }
.gloss-bubble::after { /* pointer */
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1b1b1d;
  border-bottom: 0;
}
.gloss-bubble.is-below::after {
  bottom: auto;
  top: -6px;
  border-top: 0;
  border-bottom: 6px solid #1b1b1d;
}

/* Sidebar */
.single-sidebar { display: flex; flex-direction: column; gap: 32px; }
.sidebar-block {}
.sidebar-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--tfc-muted);
  margin: 0 0 14px;
}
.next-story {
  display: block;
  text-decoration: none;
  color: var(--tfc-text);
  border: 1px solid var(--tfc-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .15s;
}
.next-story:hover { border-color: var(--tfc-muted); }
.next-story-thumb { display: block; line-height: 0; }
.next-story-thumb img { width: 100%; height: 150px; object-fit: cover; display: block; }
.next-story-title { display: block; padding: 12px 14px; font-weight: 700; font-size: 16px; line-height: 1.3; }
.browse-group + .browse-group { margin-top: 16px; }
.browse-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--tfc-muted);
  margin-bottom: 8px;
}
.single-sidebar .hero-platforms {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 0;
}
.single-sidebar .platform-btn { justify-content: center; }

.back-link {
  display: inline-block;
  margin-top: 40px;
  font-size: 14px;
  color: var(--tfc-muted);
  text-decoration: none;
}
.back-link:hover { color: var(--tfc-text); }

@media (max-width: 860px) {
  .single-layout { grid-template-columns: 1fr; gap: 40px; }
  .post-player { flex-wrap: wrap; }
  .post-player .hp-controls { order: 3; width: 100%; flex-wrap: wrap; gap: 10px; }
  .post-player .hp-progress { order: -1; flex-basis: 100%; }
}

/* ── Footer ── */
.site-footer {
  background: #1b1b1d;
  color: #cfcfcf;
}
.footer-widgets {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 20px 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}
.footer-col .widget + .widget { margin-top: 28px; }
.footer-col .widget-title,
.footer-col h2,
.footer-col h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fff;
  margin: 0 0 16px;
}
.footer-col p { margin: 0 0 12px; line-height: 1.65; }
.footer-col a { color: #cfcfcf; text-decoration: none; }
.footer-col a:hover { color: var(--tfc-blue); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 9px; }
.footer-col img { max-width: 100%; height: auto; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  text-align: center;
  padding: 20px;
  color: #8a8a8a;
  font-size: 13px;
}
.footer-bottom p { margin: 0; }
@media (max-width: 780px) {
  .footer-widgets { grid-template-columns: 1fr; gap: 32px; }
}

.no-posts { color: var(--tfc-muted); }

/* ── Contact Form 7 ── */
.wpcf7 { max-width: 640px; }
.wpcf7-form p { margin: 0 0 18px; }
.wpcf7-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="number"],
.wpcf7-form input[type="date"],
.wpcf7-form textarea,
.wpcf7-form select {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--tfc-text);
  background: var(--tfc-surface);
  border: 1px solid var(--tfc-border);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
  outline: none;
  border-color: var(--tfc-blue);
  box-shadow: 0 0 0 3px rgba(249, 83, 30, .15);
}
.wpcf7-form textarea { min-height: 160px; resize: vertical; }
.wpcf7-form input[type="submit"] {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: var(--tfc-blue);
  border: 0;
  border-radius: 999px;
  padding: 14px 34px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.wpcf7-form input[type="submit"]:hover { background: #e0440f; transform: translateY(-1px); }

/* Validation + response messages */
.wpcf7-form .wpcf7-not-valid { border-color: #d63638; }
.wpcf7-not-valid-tip { color: #d63638; font-size: 13px; margin-top: 6px; }
.wpcf7-response-output {
  margin: 18px 0 0 !important;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
}
.wpcf7 form.sent .wpcf7-response-output {
  border: 1px solid #5a9e3a; background: #f0f8ec; color: #2e6b1f;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
  border: 1px solid #d63638; background: #fdecec; color: #a01b1d;
}
.wpcf7-spinner { margin-left: 10px; }
