/* ============================================================
   TRAILS SCHOOL — BLOG CSS
   Blog-specific styles: listing page + individual article
   Versão: 1.0
============================================================ */

/* ── BLOG HERO ──────────────────────────────────────────── */
.blog-hero {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.blog-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--yellow);
  margin-bottom: 0.75rem;
}

.blog-hero h1 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.2;
}

.blog-hero-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── BLOG MAIN ──────────────────────────────────────────── */
.blog-main {
  background: var(--off-white);
  padding: 60px 0;
}

/* ── FILTER BAR ─────────────────────────────────────────── */
.blog-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.blog-filter-btn {
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 18px;
  border: 2px solid rgba(43, 47, 199, 0.2);
  color: var(--gray);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}

.blog-filter-btn:hover,
.blog-filter-btn.active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

/* ── BLOG GRID ──────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── POST CARD ──────────────────────────────────────────── */
.post-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(43, 47, 199, 0.06);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.post-card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-light);
}

.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--transition);
  display: block;
}

.post-card:hover .post-card-img img {
  transform: scale(1.05);
}

.post-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── CATEGORY BADGES ────────────────────────────────────── */
.post-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.cat-bilinguismo {
  background: rgba(43, 47, 199, 0.1);
  color: var(--blue);
}

.cat-metodologia {
  background: rgba(123, 45, 139, 0.1);
  color: var(--purple);
}

.cat-socioemocional {
  background: rgba(255, 74, 28, 0.1);
  color: var(--orange);
}

.cat-stem {
  background: rgba(255, 184, 0, 0.15);
  color: #b08000;
}

.cat-familia {
  background: rgba(43, 199, 100, 0.1);
  color: #1a8040;
}

/* ── POST CARD CONTENT ──────────────────────────────────── */
.post-card-title {
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 10px;
  transition: color var(--transition);
}

.post-card:hover .post-card-title {
  color: var(--blue);
}

.post-card-excerpt {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  gap: 12px;
  font-size: 0.76rem;
  color: var(--gray);
  padding-top: 16px;
  border-top: 1px solid var(--gray-light);
  flex-wrap: wrap;
  align-items: center;
}

.post-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue);
  margin-top: 16px;
  transition: gap var(--transition);
  text-decoration: none;
}

.post-card-link:hover {
  gap: 10px;
}

/* ── ARTICLE PAGE ───────────────────────────────────────── */
.article-page {
  background: var(--white);
}

/* ── ARTICLE HERO ───────────────────────────────────────── */
.article-hero {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue) 60%);
  padding: 48px 0 0;
  overflow: hidden;
  position: relative;
}

/* ── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb-sep {
  font-size: 0.65rem;
}

/* ── ARTICLE HERO TYPOGRAPHY ────────────────────────────── */
.article-hero h1 {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 20px;
  max-width: 760px;
}

.article-meta {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 36px;
  flex-wrap: wrap;
  align-items: center;
}

.article-featured-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin-top: 36px;
}

/* ── ARTICLE BODY ───────────────────────────────────────── */
.article-body-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 52px 40px 80px;
}

.article-body h2 {
  font-family: var(--font-title);
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  color: var(--blue-deep);
  margin: 48px 0 16px;
  padding-top: 8px;
  line-height: 1.25;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--text);
  margin: 28px 0 10px;
  line-height: 1.3;
}

.article-body p {
  font-size: 1rem;
  color: var(--gray-dark);
  line-height: 1.8;
  margin-bottom: 20px;
}

.article-body ul {
  padding-left: 0;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.article-body ul li {
  font-size: 0.95rem;
  color: var(--gray-dark);
  line-height: 1.65;
  padding-left: 24px;
  position: relative;
}

.article-body ul li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  position: absolute;
  left: 0;
  top: 8px;
}

.article-body ol {
  list-style: decimal;
  padding-left: 20px;
  margin-bottom: 20px;
}

.article-body ol li {
  font-size: 0.95rem;
  color: var(--gray-dark);
  line-height: 1.65;
  padding-left: 6px;
}

.article-body strong {
  font-weight: 700;
  color: var(--text);
}

.article-body blockquote {
  border-left: 4px solid var(--blue);
  margin: 32px 0;
  padding: 16px 24px;
  background: rgba(43, 47, 199, 0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-body blockquote p {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--blue-deep);
  margin-bottom: 0;
}

/* ── ARTICLE HIGHLIGHT BOX ──────────────────────────────── */
.article-highlight {
  background: rgba(43, 47, 199, 0.06);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 28px 0;
  border: 1px solid rgba(43, 47, 199, 0.12);
}

.article-highlight p {
  margin-bottom: 0;
  color: var(--blue-deep);
  font-weight: 500;
}

/* ── ARTICLE INLINE CTA ─────────────────────────────────── */
.article-cta-inline {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 40px 0;
  text-align: center;
}

.article-cta-inline h3 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 8px;
}

.article-cta-inline p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 18px;
}

/* ── AUTHOR BOX ─────────────────────────────────────────── */
.author-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 48px;
  border: 1px solid rgba(43, 47, 199, 0.08);
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  color: var(--white);
  font-weight: 700;
  font-family: var(--font-title);
}

.author-info h4 {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.author-info p {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 0;
}

/* ── RELATED POSTS ──────────────────────────────────────── */
.related-posts {
  background: var(--off-white);
  padding: 60px 0;
}

.related-posts-header {
  text-align: center;
  margin-bottom: 36px;
}

.related-posts-header h2 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--blue-deep);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .blog-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 44px 0;
  }

  .blog-main {
    padding: 40px 0;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .article-body-wrap {
    padding: 36px 0 60px;
  }

  .article-body h2 {
    font-size: 1.3rem;
    margin-top: 36px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .author-box {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .blog-filter {
    gap: 8px;
  }

  .blog-filter-btn {
    font-size: 0.76rem;
    padding: 7px 14px;
  }

  .article-featured-img {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
}
