/* US Youth Soccer Prospect Tracker — Blog styles.
   Loaded alongside style.css, which defines the theme variables, header & nav. */

/* ---------- shared wrappers ---------- */
/* Match the .section-kicker container so the intro and post list left-align
   with the "Latest writing" header and span the same width. */
.blog-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px 64px; }
.blog-intro {
  max-width: var(--maxw); margin: 18px auto 0; padding: 0 22px;
  color: var(--text-dim); font-size: 0.98rem; line-height: 1.55;
}

/* ---------- blog index: post list ---------- */
.post-list { margin: 22px auto 0; display: grid; gap: 18px; }
.post-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--red); border-radius: 14px; overflow: hidden;
  text-decoration: none; color: inherit; box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-left-color: var(--blue); }
.post-card-body { padding: 22px 24px; }

/* cards with a photo: image beside the text on desktop, stacked on mobile */
.post-card.has-media { display: flex; align-items: stretch; }
.post-card.has-media .post-card-body { flex: 1 1 auto; }
.post-card-media { flex: 0 0 220px; background: var(--surface-2); overflow: hidden; }
.post-card-media img {
  width: 100%; height: 100%; min-height: 180px; object-fit: cover;
  object-position: center 28%; display: block;
}
.post-card .post-kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 0.74rem; color: var(--text-dim); font-weight: 700; margin-bottom: 9px;
}
.post-card h2 { margin: 0; font-size: 1.32rem; line-height: 1.25; color: var(--navy); letter-spacing: -0.2px; }
.post-card .excerpt { margin: 9px 0 0; color: var(--text-dim); font-size: 0.94rem; line-height: 1.55; }
.post-card .readmore { margin-top: 12px; font-size: 0.84rem; font-weight: 800; color: var(--red); }
.post-card:hover .readmore { color: var(--blue); }

.post-date { color: var(--text-dim); }
.post-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.post-tag {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.3px;
  padding: 2px 9px; border-radius: 999px;
  background: rgba(47, 95, 184, 0.1); color: var(--blue);
  border: 1px solid rgba(47, 95, 184, 0.28);
}
.dot-sep { color: var(--border); }

.blog-empty { text-align: center; color: var(--text-dim); padding: 60px 20px; }

/* ---------- single post (article) ---------- */
.post-article { max-width: 760px; margin: 0 auto; padding: 0 22px 72px; }
.post-header { margin: 30px 0 26px; }
.post-header h1 {
  margin: 14px 0 0; font-size: 2.1rem; line-height: 1.18; color: var(--navy);
  font-weight: 800; letter-spacing: -0.6px;
}
.post-header .post-kicker { font-size: 0.78rem; }
.post-byline { margin: 14px 0 0; color: var(--text-dim); font-size: 0.86rem; }
.post-lead {
  margin: 18px 0 0; font-size: 1.12rem; line-height: 1.6; color: var(--text);
  font-weight: 500; border-left: 4px solid var(--red); padding-left: 16px;
}

/* lead photo at the top of an article */
.post-hero { margin: 26px 0 0; }
.post-hero img {
  display: block; margin: 0 auto; max-width: 100%; max-height: 520px; width: auto;
  border-radius: 14px; border: 1px solid var(--border);
}
.post-hero figcaption { color: var(--text-dim); font-size: 0.82rem; text-align: center; margin-top: 10px; }

.post-body { font-size: 1.04rem; line-height: 1.72; color: var(--text); margin-top: 30px; }
.post-body > * { max-width: 100%; }
.post-body h2 {
  margin: 36px 0 12px; font-size: 1.42rem; color: var(--navy); letter-spacing: -0.3px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.post-body h3 { margin: 28px 0 8px; font-size: 1.14rem; color: var(--navy); }
.post-body p { margin: 0 0 18px; }
.post-body a { color: var(--blue); text-decoration: none; font-weight: 600; }
.post-body a:hover { text-decoration: underline; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 24px; }
.post-body li { margin: 0 0 8px; }
.post-body img { border-radius: 12px; border: 1px solid var(--border); display: block; margin: 22px auto; }
.post-body figure { margin: 22px 0; }
.post-body figcaption { color: var(--text-dim); font-size: 0.82rem; text-align: center; margin-top: 8px; }
.post-body blockquote {
  margin: 22px 0; padding: 4px 20px; border-left: 4px solid var(--blue);
  color: var(--text-dim); font-style: italic;
}
.post-body code {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 5px; font-size: 0.9em;
}
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.post-body .callout {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 20px; margin: 22px 0;
}
.post-body .callout strong { color: var(--navy); }

.post-footer {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.back-link { color: var(--blue); text-decoration: none; font-weight: 800; font-size: 0.9rem; }
.back-link:hover { text-decoration: underline; }
.post-disclaimer { color: var(--text-dim); font-size: 0.78rem; }

@media (max-width: 560px) {
  .blog-wrap, .blog-intro, .post-article { padding-left: 16px; padding-right: 16px; }
  .post-header h1 { font-size: 1.6rem; }
  .post-card-body { padding: 18px; }
  .post-card.has-media { flex-direction: column; }
  .post-card-media { flex-basis: auto; }
  .post-card-media img { height: 200px; min-height: 0; }
}
