/* ArchiEase Articles — Shared Stylesheet */

:root {
  --navy:   #0F2B4D;
  --gold:   #C09A2C;
  --gold-light: #F5E9C4;
  --bg:     #F8FAFC;
  --surface:#FFFFFF;
  --text:   #1E293B;
  --muted:  #64748B;
  --border: #E2E8F0;
  --accent: #6366F1;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--gold); }

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.site-header .logo img { width: 24px; height: 24px; }

.site-header nav { display: flex; align-items: center; gap: 1.75rem; }

.site-header nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s;
}

.site-header nav a:hover { color: #fff; }

.site-header .nav-cta {
  background: var(--gold);
  color: var(--navy) !important;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-weight: 600 !important;
}

.site-header .nav-cta:hover { background: #d4aa30; color: var(--navy) !important; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.page-wrapper {
  max-width: 1140px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

.page-wrapper.full-width {
  grid-template-columns: 1fr;
  max-width: 860px;
}

/* ── Article ──────────────────────────────────────────────────────────────── */
article {
  background: var(--surface);
  border-radius: 12px;
  padding: 2.5rem 2.75rem;
  border: 1px solid var(--border);
  min-width: 0;
}

.article-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

article h1 {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.article-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.direct-answer {
  background: var(--gold-light);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #3B2800;
}

article h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

article h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

article p { margin-bottom: 1rem; font-size: 1rem; }

article ul, article ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

article li { margin-bottom: 0.5rem; }

article strong { color: var(--navy); }

/* ── Data tables ──────────────────────────────────────────────────────────── */
.data-table-wrapper { overflow-x: auto; margin: 1.5rem 0; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.data-table th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem;
  text-align: left;
}

.data-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table tr:nth-child(even) td { background: var(--bg); }
.data-table tr:hover td { background: #F0F4F8; }

/* ── FAQ section ──────────────────────────────────────────────────────────── */
.faq-section { margin-top: 2.5rem; }

.faq-section h2 {
  margin-bottom: 1.25rem;
  border-top: 2px solid var(--gold);
  padding-top: 1.5rem;
}

.faq-item { margin-bottom: 1.5rem; }

.faq-question {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
  font-size: 1rem;
}

.faq-answer { color: var(--text); }

/* ── CTA Sidebar ──────────────────────────────────────────────────────────── */
.sidebar { position: sticky; top: 72px; }

.cta-card {
  background: var(--navy);
  color: #fff;
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.cta-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.cta-card p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.cta-btn {
  display: block;
  background: var(--gold);
  color: var(--navy);
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: background 0.15s;
}

.cta-btn:hover { background: #d4aa30; color: var(--navy); }

.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.related-card h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.related-card ul { list-style: none; padding: 0; }

.related-card li { margin-bottom: 0.625rem; }

.related-card a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
}

.related-card a::before { content: '→'; color: var(--gold); flex-shrink: 0; }
.related-card a:hover { color: var(--gold); }

/* ── Articles index grid ──────────────────────────────────────────────────── */
.articles-hero {
  background: var(--navy);
  color: #fff;
  padding: 4rem 2rem;
  text-align: center;
}

.articles-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.articles-hero p {
  color: rgba(255,255,255,0.75);
  font-size: 1.0625rem;
  max-width: 520px;
  margin: 0 auto;
}

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

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, transform 0.15s;
}

.article-card:hover {
  box-shadow: 0 8px 24px rgba(15,43,77,0.1);
  transform: translateY(-2px);
  color: var(--text);
}

.article-card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.article-card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.article-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}

.article-card-arrow {
  margin-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold);
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 2rem;
  font-size: 0.8125rem;
  margin-top: 4rem;
}

.site-footer a { color: rgba(255,255,255,0.75); }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    padding: 1.5rem 1.25rem;
  }

  .sidebar { position: static; }

  article { padding: 1.75rem 1.5rem; }

  article h1 { font-size: 1.5rem; }
}

@media (max-width: 600px) {
  .site-header nav .nav-hide { display: none; }
  article { padding: 1.25rem 1rem; }
  .articles-hero h1 { font-size: 1.625rem; }
}
