/* =========================================================
   Articles CSS — HomeEaze Air
   ========================================================= */

/* ── Articles Hero ── */
.articles-hero {
  padding: 120px 0 64px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,130,246,0.10) 0%, transparent 70%);
}

.articles-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  margin: 16px 0 20px;
  letter-spacing: -0.02em;
}

.articles-hero .hero-sub {
  font-size: 1.15rem;
  color: var(--text-2);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Article grid ── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding: 0 0 80px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.article-card-emoji {
  font-size: 2rem;
  margin-bottom: 16px;
  line-height: 1;
}

.article-card-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 14px;
}

.article-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px;
  color: var(--text);
}

.article-card p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
  flex: 1;
  margin: 0 0 20px;
}

.article-card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
  margin-top: auto;
}

.article-card-link:hover {
  color: var(--blue-hover);
}

/* ── Article Page Layout ── */
.article-page {
  padding: 120px 0 80px;
}

.article-page .container {
  max-width: 760px;
}

/* breadcrumb */
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 24px;
}

.article-breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article-breadcrumb-sep {
  color: var(--text-muted);
}

/* category badge */
.article-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 18px;
}

.article-page h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.article-reading-time,
.article-date {
  font-size: 0.85rem;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-reading-time {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
}

/* ── Article Body ── */
.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}

.article-body p {
  margin: 0 0 1.4em;
  color: var(--text);
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 2.5em 0 0.7em;
  color: var(--text);
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2em 0 0.6em;
  color: var(--text);
}

.article-body strong {
  font-weight: 600;
  color: var(--text);
}

.article-body em {
  color: var(--text-2);
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.4em 1.5em;
  padding: 0;
}

.article-body li {
  margin-bottom: 0.5em;
  color: var(--text);
}

.article-body code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--blue);
}

.article-body pre {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 0 0 1.4em;
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text-2);
}

.article-body blockquote {
  border-left: 3px solid var(--blue);
  margin: 1.8em 0;
  padding: 16px 20px 16px 24px;
  background: rgba(59, 130, 246, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-2);
  font-style: italic;
}

.article-body blockquote strong {
  font-style: normal;
}

/* ── Related Articles ── */
.related-articles {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.related-articles h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 24px;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.related-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s;
}

.related-article-card:hover {
  border-color: var(--border-2);
}

.related-article-card .card-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.related-article-card .card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.related-article-card .card-arrow {
  font-size: 0.8rem;
  color: var(--blue);
  margin-top: 4px;
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 10px;
  }

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