/* Blog Page Styles */

.blog-page {
  min-height: 100vh;
  background: #ffffff;
}

/* Blog Hero */
.blog-hero {
  background: linear-gradient(135deg, #1E3A5F 0%, #2E5A7D 50%, #E8F4F8 100%);
  padding: 4rem 2rem;
  text-align: center;
}

.blog-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #ffffff;
}

.blog-hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin: 0 auto;
}

/* Blog Grid */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

/* Blog Card */
.blog-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: #1E3A5F;
}

.blog-card-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  color: #6b7280;
  font-size: 0.875rem;
  padding: 1.5rem 1.5rem 0;
}

.blog-card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-card-excerpt {
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.blog-card-tags,
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.blog-tag {
  background: #E8F9E8;
  color: #5A8F3A;
  padding: 0.375rem 0.75rem;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.blog-read-more {
  color: #1E3A5F;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

.blog-card:hover .blog-read-more {
  gap: 0.75rem;
}

/* ===========================================
   BLOG POST CONTENT STYLES
   =========================================== */

/* Back Link */
.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

/* Blog Post Content Container */
.blog-post-content {
  padding: 3.5rem 0 4rem;
  background: #ffffff;
}

.blog-post-content .container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
  color: #374151;
  font-size: 1.125rem;
  line-height: 1.85;
}

/* ===========================================
   TYPOGRAPHY - BASE STYLES
   =========================================== */

.blog-post-content p {
  margin-bottom: 1.5rem;
  color: #374151;
}

/* H2 - Major Sections */
.blog-post-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
  padding-top: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #98D85E;
  line-height: 1.3;
}

.blog-post-content h2:first-of-type {
  margin-top: 2rem;
}

/* H3 - Subsections / Questions - CARD STYLE */
.blog-post-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1E3A5F;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #f8fafc 0%, #E8F4F8 100%);
  border-left: 4px solid #1E3A5F;
  border-radius: 0 8px 8px 0;
  line-height: 1.4;
}

/* First H3 after H2 needs less top margin */
.blog-post-content h2 + p + h3,
.blog-post-content h2 + h3 {
  margin-top: 1.5rem;
}

/* H4 - Sub-subsections */
.blog-post-content h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #374151;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

/* Bold/Strong text - used for labels like "Why it works:", "Best for:", etc. */
.blog-post-content strong {
  font-weight: 600;
  color: #111827;
}

/* Special styling for label patterns */
.blog-post-content p strong:first-child {
  color: #1E3A5F;
}

.blog-post-content em {
  font-style: italic;
}

/* ===========================================
   LINKS
   =========================================== */

.blog-post-content a {
  color: #1E3A5F;
  text-decoration: none;
  border-bottom: 2px solid #98D85E;
  transition: all 0.2s;
}

.blog-post-content a:hover {
  color: #0F2438;
  border-bottom-color: #1E3A5F;
  background: rgba(152, 216, 94, 0.1);
}

/* ===========================================
   LISTS
   =========================================== */

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 1.75rem;
  padding-left: 0;
}

.blog-post-content ul {
  list-style: none;
}

.blog-post-content ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.blog-post-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: #98D85E;
  border-radius: 50%;
}

.blog-post-content ol {
  list-style: none;
  counter-reset: list-counter;
}

.blog-post-content ol li {
  position: relative;
  padding-left: 2.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.7;
  counter-increment: list-counter;
}

.blog-post-content ol li::before {
  content: counter(list-counter);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.5rem;
  height: 1.5rem;
  background: #1E3A5F;
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Nested lists */
.blog-post-content ul ul,
.blog-post-content ol ul {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  margin-left: 1rem;
}

.blog-post-content ul ul li::before {
  background: #d1d5db;
  width: 6px;
  height: 6px;
}

/* ===========================================
   BLOCKQUOTES
   =========================================== */

.blog-post-content blockquote {
  border-left: 4px solid #1E3A5F;
  background: linear-gradient(135deg, #f8fafc 0%, #E8F4F8 100%);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  font-style: italic;
  color: #4b5563;
  border-radius: 0 8px 8px 0;
}

.blog-post-content blockquote p:last-child {
  margin-bottom: 0;
}

/* ===========================================
   CODE
   =========================================== */

.blog-post-content code {
  background: #f3f4f6;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  color: #1E3A5F;
}

.blog-post-content pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2rem 0;
}

.blog-post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ===========================================
   TABLES
   =========================================== */

.blog-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  font-size: 1rem;
}

.blog-post-content thead {
  background: #1E3A5F;
  color: white;
}

.blog-post-content th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.blog-post-content td {
  padding: 1rem;
  border-bottom: 1px solid #f3f4f6;
}

.blog-post-content tbody tr:hover {
  background: #f9fafb;
}

.blog-post-content tbody tr:last-child td {
  border-bottom: none;
}

/* ===========================================
   HORIZONTAL RULE
   =========================================== */

.blog-post-content hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 3rem 0;
}

/* ===========================================
   SPECIAL COMPONENTS (Optional wrappers)
   =========================================== */

/* CTA Box - Mid-article */
.blog-cta-box {
  background: linear-gradient(135deg, #1E3A5F 0%, #0F2438 100%);
  color: white;
  padding: 2.5rem;
  margin: 3rem 0;
  border-radius: 12px;
  text-align: center;
}

.blog-cta-box h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  margin-top: 0;
  color: white;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

.blog-cta-box p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  opacity: 0.95;
  color: rgba(255, 255, 255, 0.9);
}

.blog-cta-box .btn {
  display: inline-block;
  text-decoration: none;
  border: none;
}

.blog-cta-box .btn:hover {
  background: white;
  color: #1E3A5F;
}

/* Callout Box - Green success style */
.blog-callout {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #22c55e;
  border-radius: 0 8px 8px 0;
  padding: 1.5rem;
  margin: 2rem 0;
}

.blog-callout p {
  margin-bottom: 0.5rem;
  color: #166534;
}

.blog-callout p:last-child {
  margin-bottom: 0;
}

/* Warning/Tip Box - Yellow style */
.blog-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 0 8px 8px 0;
  padding: 1.5rem;
  margin: 2rem 0;
}

.blog-warning p {
  margin-bottom: 0;
  color: #92400e;
}

/* Info Box - Blue style */
.blog-info {
  background: #E8F4F8;
  border: 1px solid #bae6fd;
  border-left: 4px solid #1E3A5F;
  border-radius: 0 8px 8px 0;
  padding: 1.5rem;
  margin: 2rem 0;
}

.blog-info p {
  margin-bottom: 0;
  color: #1E3A5F;
}

/* Question Section - Enhanced card for listicle posts */
.question-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #98D85E;
  border-radius: 0 12px 12px 0;
  padding: 1.75rem 2rem;
  margin: 2rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.question-section h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #111827;
  font-size: 1.25rem;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

.question-section p {
  margin-bottom: 1rem;
}

.question-section p:last-child {
  margin-bottom: 0;
}

/* Question Type Badge */
.question-type {
  display: inline-block;
  background: #E8F4F8;
  color: #1E3A5F;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* Framework/Definition Box */
.framework-box {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.75rem 2rem;
  margin: 1.5rem 0;
}

.framework-box h3 {
  margin-top: 0;
  color: #1E3A5F;
  font-size: 1.25rem;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

.framework-box p:last-child {
  margin-bottom: 0;
}

/* Key Takeaway Box */
.key-takeaway {
  background: linear-gradient(135deg, #1E3A5F 0%, #2E5A7D 100%);
  color: white;
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 12px;
}

.key-takeaway h4 {
  color: #98D85E;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.key-takeaway p {
  color: white;
  margin-bottom: 0;
  font-size: 1.125rem;
  line-height: 1.7;
}

/* Stats/Numbers Highlight */
.stat-highlight {
  text-align: center;
  padding: 2rem;
  margin: 2rem 0;
  background: #f8fafc;
  border-radius: 12px;
}

.stat-highlight .number {
  font-size: 3rem;
  font-weight: 800;
  color: #1E3A5F;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-highlight .label {
  font-size: 1rem;
  color: #6b7280;
}

/* ===========================================
   RELATED ARTICLES
   =========================================== */

.related-articles {
  background: #f9fafb;
  padding: 4rem 2rem;
  margin-top: 4rem;
}

.related-articles h3 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: #1a1a1a;
  background: none;
  border: none;
  padding: 0;
}

.related-articles .blog-grid {
  margin-top: 0;
}

.related-articles .blog-card h3 {
  background: none;
  border: none;
  padding: 0;
  margin: 0 0 0.75rem 0;
  border-radius: 0;
}

/* ===========================================
   EMAIL CAPTURE / NEWSLETTER
   =========================================== */

.email-capture {
  background: #f8fafc;
  border: 2px solid #E8F4F8;
  border-radius: 12px;
  padding: 3rem 2rem;
  margin: 3rem 0;
  text-align: center;
}

.email-capture h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1rem;
  background: none;
  border: none;
  padding: 0;
}

.email-capture p {
  color: #4b5563;
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

.email-capture-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.email-capture-form input {
  padding: 0.875rem 1.25rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
}

.email-capture-form input:focus {
  outline: none;
  border-color: #1E3A5F;
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.email-capture-form button {
  background: #1E3A5F;
  color: white;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.email-capture-form button:hover {
  background: #0F2438;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

@media (max-width: 768px) {
  .blog-hero h1 {
    font-size: 2rem;
  }

  .blog-hero p {
    font-size: 1rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .blog-post-content {
    padding: 2.5rem 0;
  }

  .blog-post-content .container-narrow {
    padding: 0 1.25rem;
    font-size: 1rem;
    line-height: 1.75;
  }

  .blog-post-content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
  }

  .blog-post-content h3 {
    font-size: 1.125rem;
    margin-top: 2rem;
    padding: 0.875rem 1rem;
  }

  .blog-cta-box {
    padding: 2rem 1.5rem;
    margin: 2rem -1.25rem;
    border-radius: 0;
  }

  .blog-cta-box h3 {
    font-size: 1.25rem;
  }
  
  .question-section {
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
  }
  
  .framework-box {
    padding: 1.25rem 1.5rem;
  }

  .email-capture-form {
    flex-direction: column;
  }

  .related-articles {
    padding: 3rem 1.5rem;
  }
  
  .stat-highlight .number {
    font-size: 2.5rem;
  }
}

/* ===========================================
   PRINT STYLES
   =========================================== */

@media print {
  .blog-cta-box,
  .email-capture,
  .related-articles {
    display: none;
  }
  
  .blog-post-content .container-narrow {
    max-width: 100%;
    padding: 0;
  }
  
  .blog-post-content h3 {
    background: none;
    border-left: 3px solid #1E3A5F;
    padding-left: 1rem;
  }
}