/* ============================================================
   Wise Owl Races — Articles
   Freetrail-inspired: full-width hero banners + image tiles
   with overlaid text. Trail-brand palette (forest/cream/amber).
   ============================================================ */

/* ---------------- Index: category hero banner ---------------- */
.articles-hero {
  position: relative;
  min-height: clamp(240px, 38vh, 400px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--forest-800);
}
.articles-hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.articles-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,31,23,.55), rgba(15,31,23,.72));
}
.articles-hero-inner { position: relative; z-index: 1; padding: 40px var(--pad); }
.articles-hero-eyebrow {
  font-family: var(--font-condensed);
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: 13px;
  color: var(--amber-500);
  margin: 0 0 12px;
}
.articles-hero h1 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-weight: 800;
  font-size: clamp(44px, 8vw, 82px);
  line-height: 1;
  margin: 0;
  color: #fff;
}
.articles-hero p {
  margin: 16px auto 0;
  max-width: 620px;
  color: rgba(255,255,255,.86);
  font-size: clamp(15px, 2vw, 18px);
}

/* ---------------- Tile grids ---------------- */
.articles-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) var(--pad) clamp(56px, 8vw, 100px);
}
.articles-lead {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: clamp(14px, 1.6vw, 20px);
  margin-bottom: clamp(14px, 1.6vw, 20px);
}
.articles-lead-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: clamp(14px, 1.6vw, 20px);
}
.articles-rest {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
}

/* Image tile with overlaid text */
.tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  min-height: 240px;
  background: var(--forest-700);
  isolation: isolate;
}
.tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,31,23,0) 30%, rgba(15,31,23,.35) 55%, rgba(15,31,23,.88) 100%);
  z-index: 1;
}
.tile:hover img { transform: scale(1.05); }
.tile-body {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(18px, 2vw, 26px);
}
.tile-meta {
  font-family: var(--font-condensed);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11.5px;
  color: rgba(255,255,255,.82);
  margin-bottom: 10px;
}
.tile-meta .cat { color: var(--amber-500); }
.tile-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin: 0;
  font-size: 22px;
}
.tile-readmore {
  margin-top: 14px;
  font-family: var(--font-condensed);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 600;
  color: var(--amber-500);
}
.tile-readmore::after { content: " \2197"; }

/* Featured (first) tile — bigger type, taller */
.tile.featured { min-height: clamp(360px, 46vh, 520px); }
.tile.featured .tile-title { font-size: clamp(28px, 3.4vw, 44px); }
.tile.featured .tile-meta { font-size: 12.5px; }

.articles-empty {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(48px, 9vw, 96px) var(--pad);
}
.articles-empty-icon {
  width: 60px; height: 60px;
  margin: 0 auto 22px;
  color: var(--amber-500);
}
.articles-empty h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 12px;
}
.articles-empty p {
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.65;
  margin: 0 0 26px;
}

@media (max-width: 780px) {
  .articles-lead { grid-template-columns: 1fr; }
  .articles-lead-side { grid-template-rows: none; }
  .tile { min-height: 260px; }
  .tile.featured { min-height: 320px; }
}

/* ============================================================
   Single article — Freetrail-style hero with title overlaid
   ============================================================ */
.post-hero {
  position: relative;
  min-height: clamp(340px, 56vh, 560px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--forest-800);
}
.post-hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.post-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,31,23,.45), rgba(15,31,23,.68));
}
.post-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: clamp(48px, 8vw, 96px) var(--pad);
}
.post-meta {
  font-family: var(--font-condensed);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: 13px;
  color: rgba(255,255,255,.85);
  margin-bottom: 18px;
}
.post-meta .cat { color: var(--amber-500); }
.post-hero h1 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-weight: 800;
  font-size: clamp(32px, 5.4vw, 60px);
  line-height: 1.04;
  margin: 0;
  color: #fff;
}
.post-byline {
  margin-top: 20px;
  font-family: var(--font-condensed);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 13px;
  color: rgba(255,255,255,.8);
}
.post-byline b { color: #fff; font-weight: 600; }

/* Share row on the hero */
.post-share {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.post-share span {
  font-family: var(--font-condensed);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  color: rgba(255,255,255,.7);
}
.post-share a {
  display: inline-flex; width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.35); border-radius: 50%;
  color: #fff;
  transition: background .2s, color .2s, border-color .2s;
}
.post-share a:hover { background: var(--amber-500); color: var(--forest-900); border-color: var(--amber-500); }

/* Author bio box (Freetrail-style card under the hero) */
.author-box {
  max-width: 700px;
  margin: clamp(30px, 4vw, 44px) auto 0;
  padding: 22px clamp(20px, 3vw, 28px);
  display: flex;
  gap: 20px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-dark);
  border-radius: 16px;
}
.author-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--bone);
}
.author-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 4px;
  color: var(--ink);
}
.author-bio { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.author-link {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-condensed);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  color: var(--forest-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.author-link:hover { color: var(--amber-600); }
@media (max-width: 560px) {
  .author-box { flex-direction: column; text-align: center; }
}

/* Body */
.post-body {
  max-width: 700px;
  margin: clamp(36px, 5vw, 56px) auto 0;
  padding: 0 var(--pad);
  font-size: 18.5px;
  line-height: 1.75;
  color: #26332c;
}
.post-body > *:first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.4em; }
.post-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.15;
  margin: 1.9em 0 .5em;
  color: var(--ink);
}
.post-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(21px, 2.6vw, 26px);
  margin: 1.6em 0 .4em;
  color: var(--ink);
}
.post-body a { color: var(--forest-600); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { color: var(--amber-600); }
.post-body ul, .post-body ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.post-body li { margin: .4em 0; }
.post-body blockquote {
  margin: 1.7em 0;
  padding: 6px 0 6px 26px;
  border-left: 4px solid var(--amber-500);
  font-family: var(--font-display);
  font-size: 1.2em;
  font-style: italic;
  color: var(--forest-700);
}
.post-body hr { border: none; border-top: 1px solid var(--line-dark); margin: 2.4em 0; }
.post-body figure { margin: 2em 0; }
.post-body figure img, .post-body img { width: 100%; border-radius: 14px; }
.post-body figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}
.post-body code { background: var(--forest-50); padding: 2px 6px; border-radius: 6px; font-size: .9em; }

/* Pull quote — big centered callout (distinct from a normal quote) */
.post-body blockquote.pullquote {
  border: none;
  padding: 0;
  margin: 1.8em 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-style: normal;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.25;
  color: var(--forest-700);
  position: relative;
}
.post-body blockquote.pullquote::before {
  content: "\201C";
  display: block;
  font-size: 2em;
  line-height: .6;
  color: var(--amber-500);
  margin-bottom: 8px;
}

/* Embeds (YouTube / Vimeo / Strava / Instagram) */
.wo-embed { margin: 2em 0; }
.wo-embed-frame { position: relative; width: 100%; border-radius: 14px; overflow: hidden; background: #000; }
.wo-embed-frame.r-16x9 { aspect-ratio: 16 / 9; }
.wo-embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wo-embed .instagram-media, .wo-embed .strava-embed-placeholder { margin: 0 auto !important; }
.wo-embed > a { color: var(--forest-600); text-decoration: underline; word-break: break-all; }

.post-back {
  max-width: 700px;
  margin: clamp(30px, 4vw, 46px) auto clamp(56px, 8vw, 96px);
  padding: 0 var(--pad);
}
.post-back a {
  font-family: var(--font-condensed);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 13px;
  color: var(--forest-700);
}
.post-back a::before { content: "\2190  "; }

.post-related {
  max-width: var(--max);
  margin: clamp(56px, 8vw, 96px) auto 0;
  padding: clamp(40px, 5vw, 64px) var(--pad) 0;
  border-top: 1px solid var(--line-dark);
}
.post-related h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 34px);
  text-align: center;
  margin: 0 0 clamp(28px, 4vw, 44px);
  color: var(--ink);
}
.post-related .articles-rest { max-width: 100%; }

@media (max-width: 640px) {
  .post-body { font-size: 17.5px; }
}
