/* ============================================
   RheumaLife Clinic — Blog Styles
   Extends the main design system (styles.css)
   ============================================ */

/* ==========================================
   NAV ACTIVE STATE FOR BLOG PAGES
   ========================================== */
.nav-link--active {
  color: var(--accent) !important;
  font-weight: 600;
}

/* ==========================================
   BLOG LISTING PAGE — HERO
   ========================================== */
.blog-page-hero {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding: 140px 0 80px;
}

.blog-hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.blog-hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  animation: floatShape 8s ease-in-out infinite;
}

.blog-hero-shape-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.blog-hero-shape-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  bottom: -150px;
  left: -80px;
  animation-delay: -4s;
}

@keyframes floatShape {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.03); }
}

.blog-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.blog-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
  margin: 0.6rem 0 1.2rem;
}

.blog-hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.82);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ==========================================
   BLOG LISTING PAGE — GRID
   ========================================== */
.section-blog-listing {
  background: var(--gray-50);
  padding: var(--section-pad) 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ==========================================
   BLOG CARD
   ========================================== */
.blog-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(58, 157, 92, 0.15);
}

/* Card Image */
.blog-card-image-link {
  display: block;
  text-decoration: none;
}

.blog-card-image-wrap {
  position: relative;
  /* Respect the wide banner format (~5:2). Enough height to read the award text */
  aspect-ratio: 5 / 2;
  overflow: hidden;
  background: #0d3d22;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Centre on the award text and photo which sit in the middle of the banner */
  object-position: center center;
  transition: transform 0.55s var(--ease-out);
}

.blog-card:hover .blog-card-img {
  transform: scale(1.05);
}

.blog-card-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(15, 30, 20, 0.5) 100%);
}

.blog-card-category {
  display: none;
}

/* Card Body */
.blog-card-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--gray-500);
}

.blog-card-date {
  display: flex;
  align-items: center;
  gap: 5px;
}

.blog-card-read-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.blog-card-read-time::before {
  content: '·';
  color: var(--gray-400);
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.blog-card-title a {
  color: var(--gray-800);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card-title a:hover {
  color: var(--primary);
}

.blog-card-excerpt {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.65;
  flex: 1;
}

.blog-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: gap 0.25s, color 0.2s;
  margin-top: 0.25rem;
  width: fit-content;
}

.blog-card-cta:hover {
  gap: 10px;
  color: var(--primary-dark);
}

/* ==========================================
   ARTICLE PAGE — HERO
   ========================================== */
.article-hero {
  position: relative;
  overflow: hidden;
  background: #2E8B57; /* even lighter green — matches primary green */
}

.article-hero-image-wrap {
  position: relative;
  width: 100%;
  line-height: 0;
  padding-top: 100px; /* clear navbar + more visual height for clarity */
  background: #2E8B57; /* same lighter green as hero background */
}

.article-hero-img {
  width: 100%;
  height: auto;           /* natural aspect ratio — show the full banner */
  display: block;
  object-fit: unset;      /* no cropping — show 100% of the image */
}

/* No overlay — image shown clean and clear */
.article-hero-overlay {
  display: none;
}

.article-hero-content {
  position: relative;
  z-index: 1;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

/* Dark green content band that sits directly below the full-width image */
.article-hero-content-band {
  background: linear-gradient(180deg, #083D26 0%, #0a4a2e 100%);
  position: relative;
  z-index: 1;
}

/* Breadcrumb */
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.2rem;
}

.article-breadcrumb a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s;
}

.article-breadcrumb a:hover {
  color: #fff;
}

.article-breadcrumb span[aria-hidden] {
  opacity: 0.5;
}

/* Meta Badges */
.article-hero-meta {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.article-category-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
}

.article-award-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Article Hero Title */
.article-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 1.8rem;
  max-width: 820px;
}

/* Byline */
.article-hero-byline {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.article-author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.article-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.article-author-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.article-author-title {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
}

.article-meta-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.article-date-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.article-date,
.article-read-time {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ==========================================
   ARTICLE LAYOUT — TWO-COLUMN
   ========================================== */
.article-main {
  background: var(--gray-50);
  padding: 4rem 0 6rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}

/* ==========================================
   ARTICLE BODY
   ========================================== */
.article-body {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: clamp(1.8rem, 4vw, 3.2rem);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.06);
}

.article-section {
  margin-bottom: 2.8rem;
}

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

.article-lead {
  font-size: 1.12rem;
  color: var(--gray-700);
  line-height: 1.8;
  font-weight: 400;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
  margin-top: 0.5rem;
  line-height: 1.3;
}

.article-body p {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.78;
  margin-bottom: 1.1rem;
}

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

/* Highlight Box (Award) */
.article-highlight-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: linear-gradient(135deg, var(--green-50) 0%, var(--orange-50) 100%);
  border: 1px solid var(--green-200);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem;
  margin-bottom: 2.5rem;
}

.highlight-box-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.highlight-box-text {
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.6;
}

/* Article List */
.article-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.article-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.98rem;
  color: var(--gray-600);
  line-height: 1.5;
}

.article-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 7px;
}

/* Pull Quote */
.article-pullquote {
  position: relative;
  background: linear-gradient(135deg, rgba(58, 157, 92, 0.07) 0%, rgba(232, 116, 42, 0.06) 100%);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.6rem 1.8rem 1.4rem;
  margin: 2rem 0;
}

.article-pullquote::before {
  content: '"';
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--accent);
  opacity: 0.3;
  position: absolute;
  top: 0;
  left: 1.2rem;
  line-height: 1;
}

.article-pullquote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 0.8rem !important;
  padding-top: 1.2rem;
}

.article-pullquote cite {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  font-style: normal;
}

/* Pillars Grid */
.article-pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.article-pillar {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.article-pillar:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 16px rgba(58, 157, 92, 0.1);
}

.pillar-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-pillar h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.35rem;
}

.article-pillar p {
  font-size: 0.84rem;
  color: var(--gray-500);
  line-height: 1.5;
  margin: 0 !important;
}

/* Divider */
.article-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gray-200), transparent);
  margin: 2.5rem 0;
}

/* Conclusion Box */
.article-conclusion-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 1.8rem 2rem;
  margin-top: 1.5rem;
}

.article-conclusion-box p {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 1.02rem;
  line-height: 1.72;
  margin: 0 !important;
}

.article-conclusion-box strong {
  color: #fff;
}

/* ==========================================
   ARTICLE SIDEBAR
   ========================================== */
.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 96px;
}

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 1.6rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Author Sidebar Card */
.sidebar-author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--green-100);
  margin-bottom: 0.8rem;
}

.sidebar-author-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}

.sidebar-author-title {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.7rem;
  display: block;
}

.sidebar-author-desc {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 0.9rem;
}

.sidebar-author-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

.sidebar-author-link:hover {
  color: var(--primary-dark);
}

/* CTA Sidebar Card */
.sidebar-cta-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--green-800) 100%);
  text-align: center;
}

.sidebar-cta-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
}

.sidebar-cta-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.sidebar-cta-card p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
  margin-bottom: 1.1rem;
}

.sidebar-cta-btn {
  width: 100%;
  justify-content: center;
  background: #fff !important;
  color: var(--primary) !important;
  font-weight: 700;
}

.sidebar-cta-btn:hover {
  background: var(--green-50) !important;
  transform: translateY(-1px);
}

/* Takeaways Sidebar Card */
.sidebar-takeaways-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--green-100);
}

.sidebar-takeaways-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sidebar-takeaways-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.87rem;
  color: var(--gray-600);
  line-height: 1.55;
}

.takeaway-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

/* ==========================================
   MORE ARTICLES SECTION
   ========================================== */
.more-articles-section {
  background: var(--white);
  padding: 4rem 0;
}

.more-articles-cta {
  text-align: center;
  margin-top: 1.5rem;
}

.more-articles-cta p {
  font-size: 1rem;
  color: var(--gray-500);
  margin-bottom: 1.2rem;
}

/* ==========================================
   HOME PAGE — BLOG PREVIEW SECTION
   ========================================== */
.section-blog-preview {
  background: var(--white);
  padding: var(--section-pad) 0;
}

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

.blog-preview-footer {
  text-align: center;
  margin-top: 3rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1000px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
  }

  .sidebar-takeaways-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .article-hero {
    min-height: 60vh;
  }

  .article-hero-title {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }

  .article-hero-byline {
    gap: 0.6rem;
  }

  .article-meta-divider {
    display: none;
  }

  .article-pillars-grid {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 500px) {
  .article-body {
    padding: 1.4rem;
  }

  .article-highlight-box {
    flex-direction: column;
    gap: 0.5rem;
  }
}
