/* =================================================================
   Carolina Vaz Falcon — blog.css
   Herda TODOS os tokens de style.css (:root). Aqui só os estilos
   específicos da listagem e do artigo. Mobile-first.
   ================================================================= */

/* Compensa o header fixo/flutuante (não há hero no blog) */
.blog-main {
  padding-top: calc(var(--header-h) + clamp(1.4rem, 1rem + 2vw, 2.6rem));
  padding-bottom: clamp(2.5rem, 2rem + 4vw, 5rem);
  background:
    radial-gradient(120% 70% at 88% 0%, rgba(227, 199, 126, .16), transparent 60%),
    var(--bg);
  min-height: 70vh;
}

/* Link de nav ativo (estado "Blog") */
.nav__link[aria-current="page"] { color: var(--gold-dark); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* ============================== LISTAGEM ============================== */
.blog-listing { max-width: var(--container); }

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.2rem, 1rem + 2vw, 2rem);
  margin-top: clamp(1.6rem, 1.2rem + 2vw, 2.8rem);
}

.post-card { border-radius: var(--radius); }

/* A superfície e o hover ficam no <a> interno (não no <li>): o <li> é data-animate
   e recebe transition:none inline do GSAP, que faria o hover "saltar". O <a> não. */
.post-card__link {
  display: flex; flex-direction: column; height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  /* superfície sólida-clara (mesmo visual do glass, sem backdrop-filter — hover suave) */
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
  will-change: transform;
}
.post-card__link:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.post-card__media { overflow: hidden; }
.post-card__media img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  transition: transform .5s var(--ease-out);
}
.post-card__link:hover .post-card__media img { transform: scale(1.05); }

.post-card__body {
  display: flex; flex-direction: column; gap: .5rem;
  padding: 1.2rem 1.3rem 1.4rem;
}
.post-card__date {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-dark); font-weight: 500;
}
.post-card__title {
  font-family: var(--font-display); font-size: var(--fs-h3);
  color: var(--ink); line-height: 1.2;
}
.post-card__excerpt { color: var(--body); font-size: .95rem; line-height: 1.55; }
.post-card__more {
  margin-top: auto; padding-top: .4rem;
  font-size: .9rem; font-weight: 500; color: var(--gold-dark);
}

.blog-empty {
  text-align: center; color: var(--muted);
  margin-top: 2.5rem; font-size: var(--fs-lead);
}

/* ============================== ARTIGO ============================== */
.post { max-width: 820px; }

.post__back {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .9rem; font-weight: 500; color: var(--gold-dark);
  transition: gap var(--t-fast);
}
.post__back:hover { gap: .6rem; }

.post__header {
  text-align: center; max-width: 60ch; margin: 1.4rem auto clamp(1.6rem, 1rem + 2vw, 2.4rem);
}
.post__title {
  font-family: var(--font-display); color: var(--ink);
  font-size: var(--fs-h1); line-height: 1.08; margin-top: .4rem;
}
.post__date {
  margin-top: .9rem; font-size: .76rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold-dark); font-weight: 500;
}

.post__cover-wrap { max-width: 640px; margin: 0 auto clamp(1.8rem, 1.2rem + 2vw, 2.8rem); }
.post__cover {
  width: 100%; height: auto;       /* imagem inteira, sem corte (proporção natural) */
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}

/* ----- Tipografia do conteúdo (markdown) ----- */
.prose {
  max-width: 68ch; margin: 0 auto;
  font-size: 1.06rem; line-height: 1.8; color: var(--body);
}
.prose > * + * { margin-top: 1.15em; }

.prose h2 {
  font-family: var(--font-display); color: var(--ink);
  font-size: var(--fs-h2); line-height: 1.15;
  margin-top: 1.9em; margin-bottom: -.1em;
}
.prose h3 {
  font-family: var(--font-display); color: var(--ink);
  font-size: var(--fs-h3); margin-top: 1.6em; margin-bottom: -.2em;
}

.prose a {
  color: var(--gold-dark); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: color var(--t-fast);
}
.prose a:hover { color: var(--btn-hover); }

.prose strong { color: var(--ink); font-weight: 600; }

.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: .5em; }
.prose ul li::marker { color: var(--gold); }
.prose ol li::marker { color: var(--gold-dark); font-weight: 600; }

.prose blockquote {
  margin-left: 0; margin-right: 0;
  padding: .2rem 0 .2rem 1.2rem;
  border-left: 3px solid var(--gold);
  font-family: var(--font-display); font-style: italic;
  font-size: 1.25rem; line-height: 1.4; color: var(--muted);
}

.prose img { border-radius: var(--radius); margin: 1.6em auto; box-shadow: var(--shadow-sm); }

.prose code {
  font-size: .92em; padding: .1em .35em; border-radius: 6px;
  background: var(--cream-3); color: var(--ink);
}

/* ============================== BREAKPOINTS ============================== */
@media (min-width: 768px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}
