/**
 * SEO Landing Page — Article Styles
 * Article hero, body typography, TOC, article cards grid.
 */

/* ========================================
   Article Hero — Compact, Centered
   ======================================== */
.seo-hero--article {
  padding: 2.5rem 0 2rem;
}

.seo-hero--article .seo-hero-title {
  margin-bottom: 0.75rem;
}

.seo-article-hero-desc {
  color: var(--seo-text-secondary);
  font-size: 1.0625rem;
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto 1rem;
  text-align: center;
}

.seo-article-hero-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--seo-text-muted);
}

.seo-article-hero-meta span + span::before {
  content: "\00b7";
  margin-right: 0.375rem;
}

.seo-article-author a {
  color: var(--seo-text-muted);
  text-decoration: none;
  border-bottom: 1px dotted hsla(0 0% 100% / 0.25);
  transition: color 0.15s, border-color 0.15s;
}

.seo-article-author a:hover {
  color: var(--seo-text-secondary);
  border-bottom-color: hsla(0 0% 100% / 0.5);
}

/* ========================================
   Article TOC — Table of Contents
   ======================================== */
.seo-article-toc {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--seo-radius);
  padding: 1.25rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.seo-article-toc:empty {
  display: none;
}

.seo-toc-title {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

.seo-article-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 2rem;
}

.seo-article-toc li {
  break-inside: avoid;
  margin-bottom: 0.375rem;
}

.seo-article-toc a {
  color: #374151;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.5;
  border-bottom: 1px dotted transparent;
  transition: color 0.15s, border-color 0.15s;
}

.seo-article-toc a:hover {
  color: hsl(165 60% 25%);
  border-bottom-color: hsl(165 60% 35%);
}

/* ========================================
   Article Body — Light Background Reading Mode
   ======================================== */
.seo-article-body {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--seo-radius);
  padding: 2.5rem 3rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  color: #374151;
  font-size: 1rem;
  line-height: 1.85;
}

.seo-article-body > p:first-child {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #1f2937;
}

.seo-article-body h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 2.75rem 0 0;
  padding: 0 0 0.625rem;
  border-bottom: none;
  position: relative;
  letter-spacing: -0.01em;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.seo-article-body h2::before {
  content: "";
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid #9ca3af;
  border-bottom: 2px solid #9ca3af;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  position: relative;
  top: -0.1rem;
  order: 1;
  margin-left: auto;
}

.seo-article-body h2.seo-collapsed::before {
  transform: rotate(-45deg);
}

.seo-article-body h2:hover {
  color: #000;
}

.seo-article-body h2:hover::before {
  border-color: #6b7280;
}

.seo-article-body h2::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, hsl(165 60% 25%) 30%, hsl(165 60% 25%) 70%, transparent 100%);
}

/* Collapsible section wrapper */
.seo-article-section {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  opacity: 1;
}

.seo-article-section.seo-section-collapsed {
  max-height: 0 !important;
  opacity: 0;
}

.seo-article-body h3 {
  font-family: var(--font-heading);
  font-size: 1.3125rem;
  font-weight: 600;
  color: #111827;
  margin: 2.25rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: none;
  position: relative;
}

.seo-article-body h3::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #d1d5db 30%, #d1d5db 70%, transparent 100%);
}

.seo-article-body h4 {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: #1f2937;
  margin: 1.75rem 0 0.625rem;
  letter-spacing: 0.01em;
}

.seo-article-body p {
  margin: 0 0 1.125rem;
  color: #374151;
}

.seo-article-body strong {
  color: #111827;
  font-weight: 600;
}

.seo-article-body a {
  color: hsl(165 80% 28%);
  text-decoration: none;
  border-bottom: 1px dotted hsl(165 80% 40%);
  transition: color 0.15s, border-color 0.15s;
}

.seo-article-body a:hover {
  color: hsl(165 80% 22%);
  border-bottom-color: hsl(165 80% 28%);
}

.seo-article-body ul,
.seo-article-body ol {
  margin: 0.75rem 0 1.5rem;
  padding-left: 1.75rem;
}

.seo-article-body li {
  margin-bottom: 0.625rem;
  color: #374151;
  padding-left: 0.25rem;
}

.seo-article-body li strong {
  color: #111827;
}

.seo-article-body blockquote {
  margin: 1.5rem 0;
  padding: 1.125rem 1.5rem;
  background: hsl(165 40% 97%);
  border-left: 3px solid hsl(165 60% 30%);
  border-radius: 0 var(--seo-radius-sm) var(--seo-radius-sm) 0;
  color: #374151;
  font-size: 0.9375rem;
  line-height: 1.7;
  font-style: italic;
}

.seo-article-body blockquote p {
  margin-bottom: 0;
  color: #374151;
}

.seo-article-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  color: #1f2937;
}

.seo-article-body pre {
  background: var(--seo-bg-deep);
  border: 1px solid var(--seo-border);
  border-radius: var(--seo-radius-sm);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
}

.seo-article-body pre code {
  background: transparent;
  padding: 0;
  color: var(--seo-text-secondary);
}

.seo-article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.9375rem;
  border-radius: var(--seo-radius-sm);
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.seo-article-body thead {
  background: #f3f4f6;
}

.seo-article-body th {
  font-family: var(--font-heading);
  font-weight: 600;
  color: #111827;
  padding: 0.875rem 1.125rem;
  text-align: left;
  border-bottom: 2px solid #d1d5db;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.seo-article-body td {
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

.seo-article-body tbody tr:hover {
  background: #f9fafb;
}

.seo-article-body hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

.seo-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--seo-radius-sm);
  margin: 1rem 0;
}

/* ========================================
   Articles Index — Card Grid
   ======================================== */
.seo-article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* FIX(Issue9): Article cards — transition on border-color only */
.seo-article-card {
  display: flex;
  flex-direction: column;
  background: var(--seo-bg-card);
  border: 1px solid var(--seo-border);
  border-radius: var(--seo-radius);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.25s var(--ease-premium);
}

.seo-article-card:hover {
  border-color: var(--seo-border-accent);
}

.seo-article-card-body {
  padding: 1.25rem 1.25rem 0.75rem;
  flex: 1;
}

.seo-article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.seo-article-card-tag {
  background: var(--seo-accent-bg);
  color: var(--seo-accent);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: var(--seo-radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.seo-article-card-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--seo-text-muted);
}

.seo-article-card-title {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--seo-text-primary);
  margin: 0 0 0.5rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.seo-article-card-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--seo-text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.seo-article-card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--seo-border);
}

.seo-article-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--seo-accent);
  transition: gap 0.2s;
}

.seo-article-card:hover .seo-article-card-link {
  gap: 0.625rem;
}
