/* article.css — Styles for article pages and blog listing
   Matches new light & restrained design system: Plus Jakarta Sans, calm blue, sage green */

/* ===== ARTICLE PAGE ===== */
.article-main {
  padding-top: 100px;
  padding-bottom: 80px;
  min-height: 100vh;
  background: #FFFFFF;
}

.article-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #8C8882;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: #3D6B99;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.breadcrumbs a:hover {
  opacity: 0.7;
}

.breadcrumb-sep {
  opacity: 0.4;
  user-select: none;
}

.breadcrumb-current {
  color: #8C8882;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

/* Article Header */
.article-header {
  margin-bottom: 40px;
}

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.article-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: #EBF1F8;
  color: #3D6B99;
}

.article-header h1 {
  font-family: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #1B1B1B;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #8C8882;
}

.meta-sep {
  opacity: 0.4;
}

/* Table of Contents */
.article-toc {
  background: #F9F8F6;
  border: 1px solid #ECEAE6;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 40px;
}

.article-toc h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8C8882;
  margin-bottom: 12px;
}

.article-toc ol {
  list-style: decimal;
  padding-left: 20px;
}

.article-toc li {
  margin-bottom: 6px;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.article-toc a {
  color: #555555;
  text-decoration: none;
  transition: color 0.2s;
}

.article-toc a:hover {
  color: #3D6B99;
}

/* Article Body — works with both .article-body and .article-content */
.article-body,
.article-content {
  font-family: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #333333;
  word-spacing: 0.02em;
}

.article-body h2,
.article-content h2 {
  font-family: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 56px;
  margin-bottom: 24px;
  padding-top: 32px;
  border-top: 1px solid #ECEAE6;
  color: #1B1B1B;
  scroll-margin-top: 100px;
}

.article-body h2:first-of-type,
.article-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.article-body h3,
.article-content h3 {
  font-family: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 36px;
  margin-bottom: 16px;
  color: #1B1B1B;
}

.article-body p,
.article-content p {
  margin-bottom: 24px;
  color: #444444;
  line-height: 1.85;
}

.article-body ul,
.article-body ol,
.article-content ul,
.article-content ol {
  margin-bottom: 24px;
  padding-left: 28px;
  color: #444444;
}

.article-body li,
.article-content li {
  margin-bottom: 10px;
  line-height: 1.75;
}

.article-body strong,
.article-content strong {
  font-weight: 700;
  color: #1B1B1B;
}

.article-body a,
.article-content a {
  color: #3D6B99;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(61, 107, 153, 0.3);
  transition: text-decoration-color 0.2s;
}

.article-body a:hover,
.article-content a:hover {
  text-decoration-color: #3D6B99;
}

.article-body blockquote,
.article-content blockquote {
  border-left: 3px solid #7BAE8E;
  padding: 20px 24px;
  margin: 32px 0;
  background: #EEF6F1;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #555555;
  line-height: 1.75;
}

.article-body table,
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.9375rem;
}

.article-body th,
.article-body td,
.article-content th,
.article-content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #ECEAE6;
}

.article-body th,
.article-content th {
  font-weight: 700;
  background: #F9F8F6;
  color: #1B1B1B;
}

/* Article Navigation (prev/next) */
.article-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 48px 0 40px;
  padding-top: 32px;
  border-top: 1px solid #ECEAE6;
}

.article-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
  border: 1px solid #ECEAE6;
  background: #FFFFFF;
}

.article-nav-link:hover {
  background: #F9F8F6;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.article-nav-next {
  text-align: right;
  grid-column: 2;
}

.nav-direction {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #3D6B99;
}

.nav-title {
  font-size: 0.9375rem;
  color: #1B1B1B;
  line-height: 1.4;
}

/* Related Articles */
.related-articles {
  margin-bottom: 40px;
}

.related-articles h2 {
  font-family: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: #1B1B1B;
}

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

.related-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #ECEAE6;
  text-decoration: none;
  transition: all 0.2s;
  background: #FFFFFF;
}

.related-card:hover {
  border-color: #3D6B99;
  box-shadow: 0 4px 16px rgba(61, 107, 153, 0.08);
  transform: translateY(-2px);
}

.related-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #3D6B99;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.related-card h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1B1B1B;
  line-height: 1.4;
}

.related-meta {
  font-size: 0.8125rem;
  color: #8C8882;
  margin-top: auto;
}

.back-to-blog {
  text-align: center;
  margin-top: 24px;
}

.back-to-blog a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 10px;
  border: 1px solid #DDD9D4;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #555555;
  text-decoration: none;
  transition: all 0.18s;
  background: #FFFFFF;
}

.back-to-blog a:hover {
  background: #F9F8F6;
  color: #3D6B99;
  border-color: #3D6B99;
}

/* ===== BLOG LISTING PAGE ===== */
.blog-main {
  padding-top: 100px;
  padding-bottom: 80px;
  min-height: 100vh;
  background: #F9F8F6;
}

.blog-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-header {
  margin-bottom: 48px;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 40px 40px 36px;
  border: 1px solid #ECEAE6;
}

.blog-header h1 {
  font-family: 'Plus Jakarta Sans', 'Helvetica Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1B1B1B;
  margin: 16px 0 12px;
}

.blog-subtitle {
  font-size: 1.0625rem;
  color: #555555;
  line-height: 1.7;
  max-width: 600px;
}

.blog-count {
  margin-top: 16px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #3D6B99;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid #ECEAE6;
  border-left: 3px solid #3D6B99;
  text-decoration: none;
  transition: all 0.25s;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.blog-card:hover {
  border-color: #DDD9D4;
  border-left-color: #3D6B99;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

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

.blog-card-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #EBF1F8;
  color: #3D6B99;
}

.blog-card h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: #1B1B1B;
}

.blog-card p {
  font-size: 0.875rem;
  color: #555555;
  line-height: 1.65;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: #8C8882;
  margin-top: auto;
}

/* ===== SHARED HEADER/FOOTER FOR ARTICLE PAGES ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #ECEAE6;
  transition: box-shadow 0.3s;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #1B1B1B;
  font-weight: 700;
  font-size: 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.01em;
}

.logo svg {
  color: #3D6B99;
}

.header-nav {
  display: flex;
  gap: 24px;
}

.header-nav a {
  color: #555555;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.header-nav a:hover,
.header-nav a.active {
  color: #3D6B99;
}

.site-footer {
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid #ECEAE6;
  background: #F9F8F6;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.site-footer p {
  font-size: 0.875rem;
  color: #8C8882;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.footer-attribution {
  font-size: 0.75rem;
  color: #8C8882;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.footer-attribution:hover {
  opacity: 1;
}

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

  .article-nav-next {
    grid-column: 1;
    text-align: left;
  }

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

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

  .header-nav {
    display: none;
  }

  .breadcrumb-current {
    max-width: 150px;
  }

  .blog-header {
    padding: 28px 24px;
  }
}
