/* =========================================================
   blog.css -- Article-specific styles for Gofond blog posts
   ========================================================= */

/* -- Article page layout -- */
.article-main {
  padding-top: 96px;
  padding-bottom: 80px;
  min-height: 100vh;
  background: #fff;
}

.article-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* -- Article header -- */
.article__header {
  margin-bottom: 48px;
}

.article__back {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a7a4a;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.2s ease;
}

.article__back:hover {
  color: #155f3b;
  text-decoration: underline;
}

.article__meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: #6b7280;
}

.article__category {
  display: inline-block;
  background: #d1fae5;
  color: #065f46;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 999px;
}

.article__meta time {
  color: #9ca3af;
  font-size: 0.875rem;
}

.article__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: #111827;
  margin: 0 0 20px 0;
  letter-spacing: -0.02em;
}

.article__lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #4b5563;
  margin: 0;
  font-weight: 400;
}

/* -- Article body typography -- */
.article__body {
  font-size: 1rem;
  line-height: 1.75;
  color: #1f2937;
}

.article__body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 48px 0 16px 0;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.article__body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 32px 0 12px 0;
  line-height: 1.4;
}

.article__body p {
  margin: 0 0 20px 0;
  color: #374151;
}

.article__body ul,
.article__body ol {
  margin: 0 0 24px 0;
  padding-left: 24px;
}

.article__body ul {
  list-style-type: disc;
}

.article__body ol {
  list-style-type: decimal;
}

.article__body li {
  margin-bottom: 8px;
  color: #374151;
}

.article__body li strong {
  color: #111827;
}

.article__body strong {
  font-weight: 600;
  color: #111827;
}

.article__body a {
  color: #1a7a4a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article__body a:hover {
  color: #155f3b;
}

.article__body hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 40px 0;
}

/* Callout / tip box */
.article__body .callout {
  background: #f0fdf4;
  border-left: 4px solid #1a7a4a;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
}

.article__body .callout p {
  margin: 0;
  color: #065f46;
  font-size: 0.9375rem;
}

/* -- CTA box -- */
.article__cta {
  background: #1a7a4a;
  color: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  margin-top: 64px;
}

.article__cta h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 16px 0;
  letter-spacing: -0.01em;
}

.article__cta p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 28px 0;
  line-height: 1.6;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.article__cta .btn--lg {
  font-size: 1rem;
  padding: 14px 32px;
  background: #fff;
  color: #1a7a4a;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s ease, transform 0.15s ease;
}

.article__cta .btn--lg:hover {
  background: #f0fdf4;
  transform: translateY(-1px);
}

/* -- Blog index page -- */
.blog-index__header {
  text-align: center;
  padding: 64px 0 56px;
}
.blog-index__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--txt, #111827);
  margin: 12px 0 16px;
}
.blog-index__sub {
  font-size: 1.0625rem;
  color: var(--txt-muted, #4b5563);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 80px;
}
.blog-card {
  background: var(--surface, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.blog-card:hover {
  border-color: #1a7a4a;
  transform: translateY(-2px);
}
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: #9ca3af;
}
.blog-card__category {
  background: #d1fae5;
  color: #065f46;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.blog-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}
.blog-card__title a {
  color: #111827;
  text-decoration: none;
  transition: color 0.2s ease;
}
.blog-card__title a:hover { color: #1a7a4a; }
.blog-card__excerpt {
  font-size: 0.9375rem;
  color: #4b5563;
  line-height: 1.65;
  margin: 0;
  flex: 1;
}
.blog-card__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a7a4a;
  text-decoration: none;
  margin-top: 4px;
  transition: color 0.2s ease;
}
.blog-card__link:hover { color: #155f3b; }

/* -- Responsive -- */
@media (max-width: 600px) {
  .article-main {
    padding-top: 80px;
    padding-bottom: 56px;
  }

  .article-container {
    padding: 0 16px;
  }

  .article__title {
    font-size: 1.625rem;
  }

  .article__cta {
    padding: 36px 24px;
  }

  .article__cta h2 {
    font-size: 1.25rem;
  }

  .article__body h2 {
    font-size: 1.25rem;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   Blog lead gate
   ===================================================== */
#gate-overlay {
  z-index: 200;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.gate-fade {
  height: 160px;
  flex-shrink: 0;
  background: linear-gradient(to bottom, transparent, #fff);
  pointer-events: none;
}

.gate-block {
  flex: 1;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0 24px 0;
  pointer-events: all;
}

.gate-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 40px 36px;
  max-width: 480px;
  width: 100%;
}

.gate-card__title {
  font-size: 1.375rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
}

.gate-card__sub {
  font-size: 0.9375rem;
  color: #4b5563;
  margin: 0 0 28px 0;
  line-height: 1.6;
}

.gate-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.gate-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.gate-field input {
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #111827;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.gate-field input:focus {
  border-color: #1a7a4a;
  box-shadow: 0 0 0 3px rgba(26, 122, 74, 0.12);
}

.gate-field input:focus:not(:focus-visible) {
  outline: none;
}

.gate-field input:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.gate-btn {
  width: 100%;
  margin-top: 8px;
  justify-content: center;
}

.gate-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.gate-error {
  font-size: 0.875rem;
  color: #dc2626;
  margin: 8px 0 0 0;
  text-align: center;
}

.gate-privacy {
  font-size: 0.8125rem;
  color: #9ca3af;
  text-align: center;
  margin: 16px 0 0 0;
}

@media (max-width: 600px) {
  .gate-card {
    padding: 28px 20px;
  }
}