/* ══════════════════════════════════════════════════════════
   Maria Piano Studio — Shared Blog Styles
   Editorial "bone / black / cobalt-red" theme, Fraunces + Inter.
   Matches the redesigned homepage (index.html). Replaces the old
   cream/charcoal/terracotta + Cormorant theme that lived inline
   in each post.
   ══════════════════════════════════════════════════════════ */
:root {
  --bone: #F5F2ED;
  --bone-dark: #EDE9E2;
  --black: #0A0A09;
  --black-soft: #1A1A18;
  --cobalt: #C8102E;
  --cobalt-dark: #9A0B23;
  --cobalt-light: #E23A4A;
  --mid: #6B6860;
  --rule: rgba(10, 10, 9, 0.12);
  --ff-display: 'Fraunces', Georgia, serif;
  --ff-body: 'Inter', system-ui, sans-serif;

  /* Backward-compat aliases so legacy inline var() refs in post
     bodies (e.g. style="color: var(--terracotta)") still resolve. */
  --cream: #F5F2ED;
  --charcoal: #0A0A09;
  --terracotta: #C8102E;
  --warm-gray: #6B6860;
  --light-gray: #EDE9E2;
  --white: #ffffff;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  background: var(--bone);
  color: var(--black);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

a { color: var(--cobalt); text-decoration: none; }
a:hover { color: var(--cobalt-dark); }

/* ─── HEADER / NAV ─── */
.blog-header {
  background: rgba(245, 242, 237, 0.92);
  backdrop-filter: blur(10px);
  padding: 0;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 100;
}

.blog-header-inner {
  width: min(100%, 1320px);
  padding-inline: clamp(20px, 5vw, 80px);
  margin-inline: auto;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-logo {
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--black);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.blog-logo span {
  display: block;
  font-weight: 700;
  color: var(--cobalt);
}

.blog-back {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--black-soft);
  text-decoration: none;
  transition: color 0.25s ease;
}
.blog-back:hover { color: var(--cobalt); }

.blog-nav a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--black-soft);
  text-decoration: none;
  margin-left: 1.5rem;
  transition: color 0.25s ease;
}
.blog-nav a:hover { color: var(--cobalt); }

/* ─── BLOG INDEX: listing ─── */
.blog-listing {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 5% 4rem;
}

.blog-listing h1 {
  font-family: var(--ff-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 0.5rem;
}

.blog-listing .subtitle {
  font-size: 1rem;
  color: var(--mid);
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.blog-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  text-decoration: none;
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -24px rgba(10, 10, 9, 0.3);
}

.blog-card h2 {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--black);
  margin-bottom: 0.5rem;
}

.blog-card p {
  font-size: 0.95rem;
  color: var(--mid);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.blog-card .read-more {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cobalt);
}

/* ─── ARTICLE (post) ─── */
.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 5% 5rem;
}

.article-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cobalt);
  background: rgba(200, 16, 46, 0.1);
  padding: 0.4rem 0.8rem;
  border-radius: 3px;
  margin-bottom: 1rem;
}

.article-title {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 1rem;
}

.article-meta {
  font-size: 0.9rem;
  color: var(--mid);
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.article-image {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 2rem;
}

.article-content h2 {
  font-family: var(--ff-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--black);
  margin: 3rem 0 1.25rem;
}

.article-content h3 {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--black);
  margin: 2rem 0 1rem;
}

.article-content p {
  margin-bottom: 1.4rem;
  color: var(--black-soft);
}

.article-content ul,
.article-content ol {
  margin: 1.4rem 0 1.4rem 1.5rem;
  padding-left: 0;
}

.article-content li {
  margin-bottom: 0.7rem;
  color: var(--black-soft);
}

.article-content strong { color: var(--black); font-weight: 600; }
.article-content a { color: var(--cobalt); text-decoration: underline; text-underline-offset: 2px; }
.article-content a:hover { color: var(--cobalt-dark); }

/* ─── COMPONENTS ─── */
.benefit-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--cobalt);
  color: #fff;
  border-radius: 50%;
  font-family: var(--ff-body);
  font-size: 0.9rem;
  font-weight: 600;
  margin-right: 0.75rem;
}

.highlight-box {
  background: #fff;
  border-left: 3px solid var(--cobalt);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 12px 30px -22px rgba(10, 10, 9, 0.4);
}
.highlight-box p { margin-bottom: 0; color: var(--black-soft); }

.parent-quote,
.student-quote {
  background: rgba(200, 16, 46, 0.06);
  border: 1px solid rgba(200, 16, 46, 0.18);
  padding: 1.5rem 2rem;
  border-radius: 6px;
  margin: 2rem 0;
}
.parent-quote p,
.student-quote p {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--black-soft);
  margin-bottom: 0.5rem;
}
.parent-quote cite,
.student-quote cite {
  font-family: var(--ff-body);
  font-size: 0.85rem;
  color: var(--mid);
  font-style: normal;
}

.stat-box {
  background: var(--black);
  color: #fff;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  margin: 2rem 0;
}
.stat-box .stat-number {
  font-family: var(--ff-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--cobalt-light);
  line-height: 1.1;
  display: block;
  margin-bottom: 0.5rem;
}
.stat-box .stat-label {
  font-size: 0.92rem;
  color: rgba(245, 242, 237, 0.8);
}

.age-highlight {
  background: #fff;
  border-left: 3px solid var(--cobalt);
  border-radius: 0 4px 4px 0;
  padding: 1.5rem 2rem;
  margin: 1.5rem 0;
  box-shadow: 0 12px 30px -22px rgba(10, 10, 9, 0.4);
}
.age-highlight h3 {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.5rem;
}
.age-highlight p { margin-bottom: 0; font-size: 0.95rem; color: var(--black-soft); }

/* myth vs fact — 2-col grid, collapses on mobile */
.myth-fact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
.myth,
.fact {
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
}
.myth {
  background: rgba(200, 16, 46, 0.07);
  border: 1px solid rgba(200, 16, 46, 0.2);
}
.fact {
  background: rgba(80, 140, 90, 0.08);
  border: 1px solid rgba(80, 140, 90, 0.22);
}
.myth strong,
.fact strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.myth strong { color: var(--cobalt); }
.fact strong { color: #3f7a4f; }
.myth p,
.fact p { margin: 0; font-size: 0.95rem; color: var(--black-soft); }

/* myth-box — full-width myth/truth panel */
.myth-box {
  background: rgba(200, 16, 46, 0.06);
  border: 1px solid rgba(200, 16, 46, 0.18);
  padding: 1.75rem 2rem;
  border-radius: 6px;
  margin: 2rem 0;
}
.myth-box .myth-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 0.5rem;
}
.myth-box .myth-text {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--black);
  margin-bottom: 1rem;
}
.myth-box .truth-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3f7a4f;
  margin-bottom: 0.5rem;
}
.myth-box .truth-text {
  margin-bottom: 0;
  color: var(--black-soft);
}

/* ─── CTA ─── */
.article-cta {
  background: var(--black);
  color: #fff;
  padding: 2.5rem;
  border-radius: 8px;
  text-align: center;
  margin-top: 3rem;
}
.article-cta h3 {
  font-family: var(--ff-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1rem;
}
.article-cta p {
  color: rgba(245, 242, 237, 0.8);
  margin-bottom: 1.5rem;
}

.article-cta-btn,
.article-cta .cta-btn {
  display: inline-block;
  background: var(--cobalt);
  color: #fff;
  padding: 1rem 2.4rem;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s;
}
.article-cta-btn:hover,
.article-cta .cta-btn:hover {
  background: var(--cobalt-light);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ─── AUTHOR BIO ─── */
.author-bio {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 2rem;
  border-radius: 6px;
  margin-top: 3rem;
}
.author-bio img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}
.author-bio h4 {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.25rem;
}
.author-bio p {
  font-size: 0.85rem;
  color: var(--mid);
  margin-bottom: 0;
}

/* ─── RELATED ARTICLES ─── */
.related-articles {
  margin-top: 3rem;
}
.related-articles h3 {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 1rem;
}
.related-articles a {
  display: block;
  color: var(--cobalt);
  padding: 0.5rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  transition: color 0.25s ease;
}
.related-articles a:hover { color: var(--cobalt-dark); }

/* ─── FOOTER ─── */
.blog-footer {
  background: var(--black);
  color: #fff;
  padding: 3rem 5%;
  text-align: center;
}
.blog-footer p {
  font-size: 0.85rem;
  color: rgba(245, 242, 237, 0.6);
}
.blog-footer a {
  color: rgba(245, 242, 237, 0.6);
  text-decoration: none;
  transition: color 0.25s ease;
}
.blog-footer a:hover { color: var(--cobalt-light); }

.footer-links {
  margin-bottom: 1.5rem;
}
.footer-links a {
  font-size: 0.82rem;
  color: rgba(245, 242, 237, 0.6);
  text-decoration: none;
  margin: 0 0.75rem;
  padding: 0.25rem 0;
  display: inline-block;
  transition: color 0.25s ease;
}
.footer-links a:hover { color: var(--cobalt-light); }

/* ─── 404 PAGE ─── */
.error-container {
  max-width: 500px;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}
.error-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}
.error-container h1 {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  margin-bottom: 1rem;
}
.error-container p {
  font-size: 1.1rem;
  color: var(--mid);
  line-height: 1.7;
  margin-bottom: 2rem;
}
.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cobalt);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s;
}
.btn-home:hover {
  background: var(--cobalt-light);
  color: #fff;
  transform: translateY(-2px);
}
.contact-info {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.contact-info p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.contact-info a {
  color: var(--cobalt);
  text-decoration: none;
}
.contact-info a:hover { color: var(--cobalt-dark); text-decoration: underline; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .blog-listing h1 { font-size: 2rem; }
  .blog-card { padding: 1.5rem 1.5rem; }
  .blog-card h2 { font-size: 1.3rem; }
  .blog-nav a { margin-left: 1rem; font-size: 0.7rem; }
  .article-title { font-size: 2rem; }
  .article-content h2 { font-size: 1.5rem; }
  .article-container { padding: 2rem 5% 4rem; }
  .myth-fact { grid-template-columns: 1fr; }
  .author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
