/* ==========================================================================
   BLOG-SPECIFIC STYLES - IMPROVED
   Diabetes Reversal Clinic
   ========================================================================== */

/* ==========================================================================
   Blog Intro Section - PROPERLY SEPARATED
   ========================================================================== */

.blog-intro-section {
  background: linear-gradient(135deg, #F5F3EF 0%, #FFFFFF 100%);
  padding: 80px 40px;
  border-bottom: 2px solid #E8E6E1;
  margin-bottom: 80px;
}

.blog-header {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.blog-title {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 24px;
  font-weight: 600;
  color: #2C2C2C;
  font-family: 'Merriweather', serif;
}

.blog-subtitle {
  font-size: 20px;
  line-height: 1.7;
  color: #5C6F5C;
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.blog-note {
  font-size: 16px;
  line-height: 1.6;
  color: #4A5F7A;
  font-style: italic;
  max-width: 700px;
  margin: 0 auto;
  padding-top: 16px;
  border-top: 1px solid #E8E6E1;
}

/* ==========================================================================
   Blog Tier Sections
   ========================================================================== */

.blog-tier {
  padding: 0 40px 80px;
}

.blog-tier:last-of-type {
  padding-bottom: 40px;
}

.tier-header {
  max-width: 1200px;
  margin: 0 auto 48px;
}

.tier-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #4A5F7A;
  background: #F5F3EF;
  padding: 6px 16px;
  border-radius: 3px;
  margin-bottom: 16px;
}

.tier-title {
  font-size: 32px;
  line-height: 1.3;
  margin-bottom: 16px;
  font-weight: 600;
  color: #2C2C2C;
  font-family: 'Merriweather', serif;
}

.tier-description {
  font-size: 18px;
  line-height: 1.6;
  color: #5C6F5C;
  max-width: 800px;
}

/* ==========================================================================
   Article Cards Grid
   ========================================================================== */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.article-card {
  background: #FFFFFF;
  border: 1px solid #E8E6E1;
  padding: 32px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  border-color: #4A5F7A;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.article-card-title {
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 16px;
  font-weight: 600;
  font-family: 'Merriweather', serif;
}

.article-card-title a {
  color: #2C2C2C;
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-card-title a:hover {
  color: #4A5F7A;
}

.article-card-excerpt {
  font-size: 16px;
  line-height: 1.7;
  color: #5C6F5C;
  margin-bottom: 16px;
  flex-grow: 1;
}

.article-card-meta {
  font-size: 14px;
  color: #A89F91;
  font-weight: 500;
}

/* ==========================================================================
   Article Page Layout
   ========================================================================== */

main.article-main {
  padding-top: 48px;
  padding-bottom: 80px;
}

.article-header {
  max-width: 800px;
  margin: 0 auto 48px;
  padding: 0 40px;
}

.article-title {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 16px;
  font-weight: 600;
  color: #2C2C2C;
  font-family: 'Merriweather', serif;
}

.article-meta {
  max-width: 800px;
  margin: 0 auto 32px;
  padding: 0 40px;
  font-size: 14px;
  color: #5C6F5C;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 40px;
}

.article-section {
  margin-bottom: 48px;
}

.article-section h2 {
  font-size: 28px;
  margin-top: 48px;
  margin-bottom: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: #2C2C2C;
}

.article-section h3 {
  font-size: 22px;
  margin-top: 36px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: #2C2C2C;
}

.article-section p {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: #2C2C2C;
  max-width: 70ch;
}

.article-section figure {
  margin: 40px 0;
  text-align: center;
}

.article-section figure img {
  max-width: 100%;
  height: auto;
}

.article-section figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: #5C6F5C;
  font-style: italic;
}

.article-disclaimer {
  max-width: 800px;
  margin: 48px auto;
  padding: 24px;
  background: #F5F3EF;
  border-left: 4px solid #A0522D;
  font-size: 14px;
  line-height: 1.6;
  color: #5C6F5C;
}

.article-disclaimer strong {
  color: #A0522D;
  font-weight: 600;
}

.related-articles {
  max-width: 800px;
  margin: 64px auto 0;
  padding: 32px 40px;
  background: #F5F3EF;
  border-top: 2px solid #E8E6E1;
}

.related-articles h2 {
  font-size: 24px;
  margin-bottom: 24px;
  font-weight: 600;
  color: #2C2C2C;
}

.related-articles-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-articles-list li {
  margin-bottom: 16px;
}

.related-articles-list a {
  color: #4A5F7A;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.related-articles-list a:hover {
  color: #2C2C2C;
  text-decoration: underline;
}

/* ==========================================================================
   Blog CTA Section - IMPROVED
   ========================================================================== */

.contact-cta-section {
  background: #2C2C2C;
  color: #E8E6E1;
  padding: 80px 40px;
  text-align: center;
}

.contact-cta-section .container {
  max-width: 900px;
  margin: 0 auto;
}

.contact-cta-section h2 {
  font-size: 32px;
  line-height: 1.3;
  margin-bottom: 24px;
  color: #FFFFFF;
  font-weight: 600;
}

.contact-cta-section .cta-description {
  font-size: 18px;
  line-height: 1.7;
  color: #E8E6E1;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.contact-cta-section .cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.contact-cta-section .cta-hours {
  font-size: 14px;
  color: #A89F91;
  font-style: italic;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 900px) {
  .blog-intro-section {
    padding: 60px 24px;
    margin-bottom: 60px;
  }
  
  .blog-title {
    font-size: 36px;
  }
  
  .blog-subtitle {
    font-size: 18px;
  }
  
  .blog-tier {
    padding: 0 24px 60px;
  }
  
  .tier-title {
    font-size: 28px;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .article-header,
  .article-meta,
  .article-content,
  .article-disclaimer,
  .related-articles {
    padding-left: 24px;
    padding-right: 24px;
  }
  
  .contact-cta-section {
    padding: 60px 24px;
  }
  
  .contact-cta-section h2 {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  .blog-title {
    font-size: 32px;
  }
  
  .article-title {
    font-size: 32px;
  }
  
  .tier-title {
    font-size: 24px;
  }
  
  .article-section h2 {
    font-size: 24px;
  }
  
  .article-section h3 {
    font-size: 20px;
  }
}

@media (max-width: 600px) {
  .blog-intro-section {
    padding: 48px 16px;
  }
  
  .blog-tier {
    padding: 0 16px 48px;
  }
  
  .blog-title {
    font-size: 28px;
  }
  
  .blog-subtitle {
    font-size: 17px;
  }
  
  .article-title {
    font-size: 28px;
  }
  
  .article-section p {
    font-size: 17px;
  }
  
  .article-card {
    padding: 24px;
  }
  
  .article-header,
  .article-meta,
  .article-content,
  .article-disclaimer,
  .related-articles {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .contact-cta-section {
    padding: 48px 16px;
  }
  
  .contact-cta-section h2 {
    font-size: 24px;
  }
  
  .contact-cta-section .cta-description {
    font-size: 16px;
  }
  
  .contact-cta-section .cta-buttons {
    flex-direction: column;
  }
  
  .contact-cta-section .btn {
    width: 100%;
  }
}


/* ============================================================
   ARTICLE TWO-COLUMN WIDE LAYOUT
   Left: article prose (readable width)
   Right: sticky sidebar — ToC + CTA
   Container matches index page at 1200px max
   ============================================================ */

/* Override narrow article-main */
main.article-main {
  padding-top: 0;
  padding-bottom: 0;
}

.article-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 40px 80px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: start;
}

/* Left column: article content */
.article-layout__main {
  min-width: 0; /* prevent grid blowout */
}

/* Override existing narrow constraints inside the two-col layout */
.article-layout__main .article-header {
  max-width: none;
  margin: 0 0 40px;
  padding: 0;
}

.article-layout__main .article-meta {
  max-width: none;
  margin: 0 0 32px;
  padding: 0;
}

.article-layout__main .article-content {
  max-width: none;
  margin: 0;
  padding: 0;
}

.article-layout__main .article-footer {
  margin-top: 0;
}

.article-layout__main .related-articles {
  max-width: none;
  margin: 48px 0 0;
  padding: 28px 32px;
}

.article-layout__main .article-disclaimer {
  max-width: none;
  margin: 32px 0 0;
}

/* Paragraph width inside article — keep readable */
.article-layout__main .article-section p {
  max-width: 68ch;
}

/* Right column: sticky sidebar */
.article-layout__sidebar {
  position: sticky;
  top: 80px; /* clears site-header */
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Table of Contents */
.sidebar-toc {
  background: #FAFAF8;
  border: 1px solid #E8E6E1;
  border-top: 3px solid #A0522D;
  border-radius: 3px;
  padding: 22px 20px;
}

.sidebar-toc__label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #A89F91;
  display: block;
  margin-bottom: 14px;
}

.sidebar-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-toc__item a {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #5C6F5C;
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 2px;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.sidebar-toc__item a:hover {
  color: #2C2C2C;
  background: #F0EDE8;
  border-left-color: #A0522D;
}

.sidebar-toc__item a.is-active {
  color: #A0522D;
  background: rgba(160, 82, 45, 0.06);
  border-left-color: #A0522D;
  font-weight: 600;
}

/* Sidebar CTA card */
.sidebar-cta {
  background: #2C2C2C;
  border-radius: 3px;
  padding: 22px 20px;
}

.sidebar-cta__label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #A89F91;
  display: block;
  margin-bottom: 10px;
}

.sidebar-cta__text {
  font-family: 'Merriweather', serif;
  font-size: 14px;
  line-height: 1.6;
  color: #E8E6E1;
  margin-bottom: 16px;
}

.sidebar-cta .btn {
  width: 100%;
  font-size: 13px;
  padding: 10px 16px;
  margin-bottom: 8px;
  justify-content: center;
}

.sidebar-cta .btn:last-child {
  margin-bottom: 0;
}

.sidebar-cta .btn-primary {
  background: #A0522D;
  border-color: #A0522D;
  color: #fff;
}

.sidebar-cta .btn-primary:hover {
  background: #B8622D;
  border-color: #B8622D;
}

.sidebar-cta .btn-whatsapp {
  background: #25D366;
  color: #fff;
}

/* ── Responsive: collapse to single column ── */
@media (max-width: 1023px) {
  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 40px 24px 60px;
  }

  .article-layout__sidebar {
    position: static;
    /* On tablet: move sidebar above content as a ToC strip */
    order: -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }

  .sidebar-toc {
    flex: 1;
    min-width: 240px;
    border-top: 3px solid #A0522D;
  }

  .sidebar-cta {
    flex: 0 0 220px;
  }
}

@media (max-width: 767px) {
  .article-layout {
    padding: 32px 16px 48px;
  }

  .article-layout__sidebar {
    flex-direction: column;
  }

  .sidebar-cta {
    flex: 1;
  }

  .article-layout__main .article-section p {
    max-width: 100%;
  }
}
