/* =============================================================================
   BLOG — Page-Specific Styles
   Blog listing page + article page styles
   ============================================================================= */

/* ─── LISTING HERO ────────────────────────────────────────────────────────── */
.blog-hero {
  height: auto;
  min-height: auto;
  padding-top: clamp(100px, 12vw, 160px);
  padding-bottom: clamp(48px, 6vw, 72px);
}

/* Hero background image */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  transform: scale(1.05);
  will-change: transform;
}


/* ─── FEATURED ARTICLE ───────────────────────────────────────────────────── */
.blog-featured-section {
  padding: clamp(56px, 6vw, 80px) 0;
}

.blog-featured-header {
  margin-bottom: 28px;
}

.blog-featured-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  background: var(--color-card);
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--duration) var(--ease-out),
              transform var(--duration) var(--ease-out);
}

.blog-featured-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.03);
}

.blog-featured-image-wrap {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  background: var(--color-dark);
}

.blog-featured-image {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
}

.blog-featured-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 7px 12px;
}

.blog-featured-content {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-featured-category {
  font-size: var(--font-eyebrow-size);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 14px;
  display: block;
}

.blog-featured-content h2 {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-ink);
  margin-bottom: 14px;
}

.blog-featured-content p {
  font-size: var(--font-body-size);
  line-height: 1.65;
  color: var(--color-text);
  margin-bottom: 20px;
}

.blog-featured-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
}


/* ─── SHARED META ────────────────────────────────────────────────────────── */
.blog-date {
  font-size: var(--font-small-size);
  color: var(--color-muted);
}

.blog-read-time {
  font-size: var(--font-small-size);
  color: var(--color-muted);
}

.blog-read-time::before {
  content: '·';
  margin-right: 16px;
  color: var(--color-border);
}




/* ─── ARTICLE GRID ───────────────────────────────────────────────────────── */
.blog-section-header {
  margin-bottom: 40px;
}

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

/* ── Premium card entrance (CSS-only scroll animation) ────────────────── */
@keyframes blog-card-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.blog-card {
  background: var(--color-card);
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              border-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  /* Scroll-driven entrance: modern browsers */
  animation: blog-card-enter ease both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}

/* Fallback: browsers without scroll-driven animations get cards immediately */
@supports not (animation-timeline: view()) {
  .blog-card {
    opacity: 1;
    transform: none;
  }
}

.blog-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

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

.blog-card-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.blog-card-body h3 {
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-ink);
  margin-bottom: 10px;
}

.blog-card-body p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}


/* ─── TEXT-ONLY CARDS (no image variant) ──────────────────────────────────── */
.blog-card--text-only {
  background: linear-gradient(135deg, rgba(23, 67, 209, 0.03) 0%, rgba(23, 67, 209, 0.005) 100%);
  border-color: rgba(23, 67, 209, 0.08);
}

.blog-card--text-only:hover {
  border-color: rgba(23, 67, 209, 0.14);
  box-shadow: 0 20px 60px rgba(23, 67, 209, 0.06), 0 4px 16px rgba(0, 0, 0, 0.02);
}

.blog-card--text-only .blog-card-body {
  padding: 28px 24px;
}

.blog-card--text-only .blog-card-body h3 {
  font-size: clamp(14px, 1.1vw, 16px);
}


/* ─── ARTICLE-PAGE HERO ──────────────────────────────────────────────────── */
/* Standalone class — matches /outcomes/ hero pattern exactly.
   Does NOT inherit from base .hero (no 100vh, no min-height:600px).  */
.article-hero {
  background: var(--color-dark);
  position: relative;
  overflow: hidden;
  padding-top: clamp(100px, 12vw, 160px);
  padding-bottom: 0;
}

/* Hero overlay — same as base .hero::after but scoped */
.article-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 23, 0.60);
  z-index: 1;
}

.article-hero > .container {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(48px, 6vw, 80px);
}

/* Back link — block-level, sits above eyebrow */
.article-hero .article-back-link {
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 20px;
  display: block;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-hero .article-back-link:hover {
  color: #ffffff;
}

/* Eyebrow — sits below back link, above H1 */
.article-hero .eyebrow {
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 16px;
  display: block;
}

/* H1: 80% width, editorial font size (NOT the oversized landing-page base) */
.article-hero .h1 {
  max-width: 80%;
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 0;
}

.article-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
  font-size: var(--font-small-size);
  color: rgba(255, 255, 255, 0.50);
}

.article-meta span::after {
  content: '·';
  margin-left: 16px;
}

.article-meta span:last-child::after {
  content: '';
}


/* ─── ARTICLE CONTENT ────────────────────────────────────────────────────── */
.article-content {
  max-width: 720px;
  margin: 0 auto;
}

.article-content h2 {
  font-size: var(--font-h3-size);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-ink);
  margin-top: 40px;
  margin-bottom: 16px;
}

.article-content p {
  font-size: var(--font-body-size);
  line-height: 1.78;
  color: var(--color-text);
  margin-bottom: 20px;
}

.article-content p:last-child {
  margin-bottom: 0;
}

.article-content a {
  color: var(--color-accent);
}

.article-content ul,
.article-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.article-content li {
  font-size: var(--font-body-size);
  line-height: 1.78;
  color: var(--color-text);
  margin-bottom: 8px;
}

.article-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 24px;
  margin: 32px 0;
  font-style: italic;
  color: var(--color-text);
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 24px 0;
}


/* ─── BLOG HERO SUBSCRIBE ────────────────────────────────────────────────── */
.blog-hero-subscribe {
  max-width: 440px;
}

.blog-hero-subscribe-form {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: border-color 0.2s;
}

.blog-hero-subscribe-form:focus-within {
  border-color: rgba(255, 255, 255, 0.40);
}

.blog-hero-subscribe-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  padding: 13px 16px;
  font-size: 15px;
  font-family: 'Satoshi', sans-serif;
  color: #ffffff;
  outline: none;
  min-width: 0;
}

.blog-hero-subscribe-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.blog-hero-subscribe-btn {
  background: #ffffff;
  border: none;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Satoshi', sans-serif;
  color: var(--color-dark, #1c2128);
  cursor: pointer;
  transition: background 0.18s, opacity 0.18s;
  white-space: nowrap;
}

.blog-hero-subscribe-btn:hover {
  background: #f0f0f0;
}

.blog-hero-subscribe-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.blog-hero-subscribe-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 10px;
}

.blog-hero-subscribe-msg {
  font-size: 13px;
  margin-top: 8px;
  min-height: 0;
}

.blog-hero-subscribe-msg:empty {
  display: none;
}

.blog-hero-subscribe-msg.success {
  color: #6bcb77;
}

.blog-hero-subscribe-msg.error {
  color: #ff6b6b;
}

/* ─── ARTICLE INLINE SUBSCRIBE ───────────────────────────────────────────── */
.article-subscribe-cta {
  margin: 48px 0 0;
  padding: 36px 32px;
  background: var(--color-bg, #f4f3f1);
  border-radius: 12px;
  border: 1px solid var(--color-border, rgba(0,0,0,0.06));
}

.article-subscribe-cta h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-ink, #0A0E17);
  margin-bottom: 8px;
}

.article-subscribe-cta p {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: var(--color-text, #444) !important;
  margin-bottom: 20px !important;
}

.article-subscribe-form {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border, rgba(0,0,0,0.08));
  max-width: 400px;
}

.article-subscribe-form:focus-within {
  border-color: var(--color-accent, #593159);
}

.article-subscribe-input {
  flex: 1;
  background: #ffffff;
  border: none;
  padding: 12px 14px;
  font-size: 14px;
  font-family: 'Satoshi', sans-serif;
  color: var(--color-ink, #0A0E17);
  outline: none;
  min-width: 0;
}

.article-subscribe-input::placeholder {
  color: var(--color-muted, #999);
}

.article-subscribe-btn {
  background: var(--color-dark, #1c2128);
  border: none;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Satoshi', sans-serif;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.18s;
  white-space: nowrap;
}

.article-subscribe-btn:hover {
  background: #2a3040;
}

.article-subscribe-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.article-subscribe-msg {
  font-size: 13px;
  margin-top: 10px;
}

.article-subscribe-msg:empty {
  display: none;
}

.article-subscribe-msg.success {
  color: #2e7d32;
}

.article-subscribe-msg.error {
  color: #c62828;
}


/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */

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

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

  .blog-featured-image-wrap {
    min-height: 220px;
  }

  .blog-featured-content {
    padding: 28px;
  }

  .article-hero .h1 {
    max-width: 90%;
  }


}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .blog-featured-content h2 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
  }

  .blog-section-header {
    margin-bottom: 28px;
  }

  .article-hero .h1 {
    max-width: 100%;
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 8px;
  }



  /* Hero subscribe — full width on mobile */
  .blog-hero-subscribe {
    max-width: 100%;
  }

  /* Article subscribe — full width */
  .article-subscribe-form {
    max-width: 100%;
  }

  .article-subscribe-cta {
    padding: 28px 20px;
  }
}

@media (max-width: 480px) {
  .blog-featured-content {
    padding: 20px;
  }

  .blog-card-body {
    padding: 18px 16px;
  }

  .blog-featured-image-wrap {
    min-height: 180px;
  }
}

