/* BeFit Blog — index + article */

html:has([data-blog-page]),
html:has([data-blog-article]) {
  scroll-padding-top: 6rem;
}

.blog-page,
.blog-article-page {
  background: #0b121c;
  color: #fff;
  padding-top: 5rem;
  padding-bottom: clamp(4rem, 12vh, 6rem);
}

.blog-hero {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(3rem, 10vh, 5rem) clamp(1.25rem, 4vw, 2rem) 2.5rem;
}

.blog-hero__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #38bdf8;
}

.blog-hero__title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.blog-hero__lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #94a3b8;
}

.blog-grid-wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  content-visibility: auto;
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.35);
  box-shadow: 0 20px 48px -16px rgba(59, 130, 246, 0.25);
}

.blog-card__img-wrap {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1e293b;
}

.blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card__img {
  transform: scale(1.04);
}

.blog-card__body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__meta {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.blog-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #fff;
}

.blog-card__excerpt {
  margin: 0;
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #94a3b8;
}

.blog-card__more {
  margin-top: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
}

/* Article */
.blog-article-nav {
  max-width: 48rem;
  margin: 0 auto 1.5rem;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

.blog-article-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
  text-decoration: none;
}

.blog-article-nav a:hover {
  color: #7dd3fc;
}

.blog-article {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

.blog-article__hero-img {
  width: 100%;
  border-radius: 1.25rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center center;
  border: 1px solid rgba(148, 163, 184, 0.15);
  margin-bottom: 1.75rem;
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.6);
  image-rendering: -webkit-optimize-contrast;
}

.blog-article__meta {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.blog-article__title {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.blog-article__lead {
  margin: 0 0 2rem;
  font-size: 1.1rem;
  line-height: 1.65;
  color: #cbd5e1;
  font-weight: 500;
}

.blog-article__content h2 {
  margin: 2rem 0 0.85rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.blog-article__content h2:first-child {
  margin-top: 0;
}

.blog-article__content p {
  margin: 0 0 1.1rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #94a3b8;
}

.blog-article__content ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: #94a3b8;
}

.blog-article__content li {
  margin-bottom: 0.4rem;
  line-height: 1.65;
}

.blog-article__content figure {
  margin: 1.75rem 0;
}

.blog-article__content figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center center;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.55);
}

.blog-article__content figcaption {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: #64748b;
  text-align: center;
}

.blog-article__cta {
  margin-top: 2.5rem;
  padding: 1.75rem;
  border-radius: 1.15rem;
  text-align: center;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.15), rgba(52, 211, 153, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.blog-article__cta p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: #cbd5e1;
}

.blog-article__cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.blog-article__cta a:hover {
  background: #2563eb;
}
