/* ─────────────────────────────────────────────────────────────────────
   UtahRefi — Shared Component Stylesheet
   Linked by all inner pages. index.html carries its own inline copy
   of base variables/reset for standalone performance; this file extends
   that with new publisher-site components.
───────────────────────────────────────────────────────────────────── */

/* ── Variables ──────────────────────────────────────────────────── */
:root {
  --cream:         #F5F0E8;
  --cream-dark:    #EDE5D5;
  --cream-border:  #D4CAB8;
  --charcoal:      #1a1a1a;
  --charcoal-2:    #2d2624;
  --charcoal-3:    #3d3530;
  --burgundy:      #8B1A1A;
  --burgundy-dk:   #6B1414;
  --burgundy-lt:   #A83030;
  --text:          #1a1a1a;
  --muted:         #58524A;
  --white:         #ffffff;
  --radius:        2px;
  --radius-lg:     4px;
  --shadow:        0 1px 8px rgba(26,26,26,0.06);
  --shadow-lg:     0 8px 40px rgba(26,26,26,0.12);
  --transition:    0.2s ease;
  /* Legacy aliases */
  --navy:          #1a1a1a;
  --navy-dark:     #111111;
  --navy-light:    #2d2624;
  --gold:          #8B1A1A;
  --gold-light:    #D4A07A;
  --gold-bg:       #EDE5D5;
  --off-white:     #F5F0E8;
  --gray-50:       #EDE5D5;
  --gray-100:      #E4DDD0;
  --gray-200:      #D4CAB8;
  --gray-400:      #9A9080;
  --gray-600:      #58524A;
  --gray-800:      #2d2624;
}

/* ── Reset & Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Arial, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--charcoal); }
a:hover { color: var(--burgundy); }

/* ── Layout ─────────────────────────────────────────────────────── */
.container { width: min(1160px, 92vw); margin: 0 auto; }
section { padding: 80px 0; }
section.alt { background: var(--cream-dark); }
section.dark { background: var(--charcoal); }

/* ── Typography ─────────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color: var(--charcoal);
  font-weight: 900;
  line-height: 1.08;
}
h4 { color: var(--charcoal); font-weight: 700; line-height: 1.3; }
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
h4 { font-size: 0.95rem; }
p { color: var(--muted); margin-bottom: 1rem; line-height: 1.75; }
p:last-child { margin-bottom: 0; }
ul { color: var(--muted); padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

.section-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin-bottom: 14px;
}
.section-header { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-header p { font-size: 1.05rem; margin-top: 16px; max-width: 580px; margin-left: auto; margin-right: auto; }
.gold-line {
  display: block;
  width: 44px;
  height: 3px;
  background: var(--burgundy);
  margin: 18px auto 0;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--burgundy); color: var(--cream); border-color: var(--burgundy); }
.btn-primary:hover { background: var(--burgundy-dk); border-color: var(--burgundy-dk); color: var(--cream); }
.btn-navy { background: var(--charcoal); color: var(--cream); border-color: var(--charcoal); }
.btn-navy:hover { background: var(--charcoal-2); border-color: var(--charcoal-2); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--cream); border-color: rgba(245,240,232,0.45); }
.btn-ghost:hover { background: rgba(245,240,232,0.1); color: var(--cream); border-color: rgba(245,240,232,0.8); }
.btn-outline { background: transparent; color: var(--charcoal); border-color: var(--charcoal); }
.btn-outline:hover { background: var(--charcoal); color: var(--cream); }

/* ── Top Bar ────────────────────────────────────────────────────── */
.top-bar {
  background: var(--charcoal);
  color: rgba(245,240,232,0.55);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 9px 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.top-bar a { color: var(--gold-light); text-decoration: none; }
.top-bar span { display: flex; align-items: center; gap: 6px; }

/* ── Header / Nav ───────────────────────────────────────────────── */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--cream-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
}
.logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--charcoal);
  text-decoration: none;
  letter-spacing: -0.03em;
}
.logo span { color: var(--burgundy); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--charcoal); }
.nav-links .btn-primary { padding: 10px 22px; font-size: 0.72rem; color: var(--cream); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--charcoal); transition: var(--transition); }

/* ── Ad Units ───────────────────────────────────────────────────── */
.ad-unit { background: var(--cream-dark); border: 1px solid var(--cream-border); padding: 12px; text-align: center; overflow: hidden; }
.ad-unit-label { font-size: 0.66rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 6px; display: block; opacity: 0.55; }
.ad-wrap { padding: 20px 0; }

/* ── FAQ Accordion ──────────────────────────────────────────────── */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--cream-border); overflow: hidden; }
.faq-item:first-child { border-top: 1px solid var(--cream-border); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 24px 0;
  text-align: left;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color var(--transition);
}
.faq-q:hover { color: var(--burgundy); }
.faq-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border: 1.5px solid var(--cream-border);
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 400;
  font-family: sans-serif;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.faq-item.open .faq-icon { background: var(--burgundy); border-color: var(--burgundy); color: var(--cream); transform: rotate(45deg); }
.faq-item.open .faq-q { color: var(--burgundy); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.32s ease; }
.faq-item.open .faq-a { max-height: 600px; }
.faq-a-inner { padding: 0 0 24px; }
.faq-a-inner p { font-size: 0.95rem; }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer { background: var(--charcoal); color: rgba(245,240,232,0.65); padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 56px; }
.footer-brand .logo { color: var(--cream); display: inline-block; margin-bottom: 16px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.75; color: rgba(245,240,232,0.45); }
.footer-col h4 { color: var(--cream); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 16px; font-family: inherit; font-weight: 700; }
.footer-col a { display: block; color: rgba(245,240,232,0.45); text-decoration: none; font-size: 0.875rem; margin-bottom: 9px; transition: color var(--transition); }
.footer-col a:hover { color: var(--cream); }
.footer-col p { font-size: 0.875rem; color: rgba(245,240,232,0.45); }
.footer-bottom { border-top: 1px solid rgba(245,240,232,0.07); padding: 28px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; }
.footer-disclaimer { font-size: 0.75rem; color: rgba(245,240,232,0.32); max-width: 820px; line-height: 1.7; }
.footer-legal-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal-links a { font-size: 0.75rem; color: rgba(245,240,232,0.42); text-decoration: none; white-space: nowrap; }
.footer-legal-links a:hover { color: rgba(245,240,232,0.85); }

/* ══════════════════════════════════════════════════════════════════
   PUBLISHER-SITE COMPONENTS (inner pages)
══════════════════════════════════════════════════════════════════ */

/* ── Breadcrumb ─────────────────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--cream-dark);
  border-bottom: 1px solid var(--cream-border);
  padding: 11px 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--burgundy); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--cream-border); font-size: 0.72rem; }

/* ── Program Hero (inner pages) ─────────────────────────────────── */
.program-hero {
  background: var(--charcoal);
  padding: 72px 0 80px;
  position: relative;
  overflow: hidden;
}
.program-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(17,11,8,0.94) 0%, rgba(26,26,26,0.55) 100%);
}
.program-hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  filter: grayscale(40%);
}
.program-hero-content { position: relative; z-index: 2; max-width: 780px; }
.program-hero-label {
  display: inline-block;
  color: var(--gold-light);
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: 22px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}
.program-hero h1 { color: var(--cream); margin-bottom: 20px; line-height: 1.05; }
.program-hero h1 em { font-style: italic; color: var(--gold-light); }
.program-hero-subtitle {
  color: rgba(245,240,232,0.72);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 580px;
  line-height: 1.8;
}
.program-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Eligibility Summary Box ────────────────────────────────────── */
.eligibility-box {
  background: var(--cream-dark);
  border-left: 4px solid var(--burgundy);
  padding: 32px 36px;
}
.eligibility-box > h3 { font-size: 1.1rem; margin-bottom: 20px; }
.eligibility-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
}
.eligibility-item { display: flex; gap: 14px; align-items: flex-start; }
.eligibility-icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  background: var(--charcoal);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.eligibility-item-body h4 { font-size: 0.88rem; margin-bottom: 3px; }
.eligibility-item-body p { font-size: 0.85rem; color: var(--muted); margin: 0; line-height: 1.6; }

/* ── How It Works Steps ─────────────────────────────────────────── */
.steps-list { display: flex; flex-direction: column; max-width: 760px; }
.step-row {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--cream-border);
  align-items: flex-start;
}
.step-row:last-child { border-bottom: none; }
.step-num {
  width: 42px;
  height: 42px;
  min-width: 42px;
  background: var(--charcoal);
  color: var(--cream);
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-body h3 { font-size: 1rem; margin-bottom: 6px; font-family: inherit; font-weight: 700; letter-spacing: 0; line-height: 1.4; }
.step-body p { font-size: 0.88rem; margin: 0; }

/* ── Pros / Cons Block ──────────────────────────────────────────── */
.pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--cream-border);
  border: 1px solid var(--cream-border);
}
.pros-col, .cons-col { background: var(--cream); padding: 36px 32px; }
.pros-col h3, .cons-col h3 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 20px;
  font-family: inherit;
  line-height: 1;
}
.pros-col h3 { color: var(--burgundy); }
.cons-col h3 { color: var(--charcoal-3); }
.pros-list, .cons-list { list-style: none; padding: 0; }
.pros-list li, .cons-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--cream-border);
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}
.pros-list li:last-child, .cons-list li:last-child { border-bottom: none; }
.pros-list li::before { content: '+'; color: var(--burgundy); font-weight: 800; font-size: 1.1rem; flex-shrink: 0; line-height: 1.5; }
.cons-list li::before { content: '−'; color: var(--charcoal-3); font-weight: 800; font-size: 1.1rem; flex-shrink: 0; line-height: 1.5; }

/* ── Editorial Disclaimer Block ─────────────────────────────────── */
.editorial-disclaimer {
  background: var(--cream-dark);
  border-left: 3px solid var(--burgundy);
  padding: 16px 20px;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.7;
}
.editorial-disclaimer strong { color: var(--charcoal); }

/* ── Lender CTA Block ───────────────────────────────────────────── */
.lender-cta {
  background: var(--charcoal);
  padding: 48px 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
}
.lender-cta-text h3 { color: var(--cream); font-size: 1.3rem; margin-bottom: 8px; }
.lender-cta-text p { color: rgba(245,240,232,0.6); font-size: 0.9rem; margin: 0; max-width: 480px; }
.lender-cta-right { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; flex-shrink: 0; }
.lender-cta-disclaimer { font-size: 0.72rem; color: rgba(245,240,232,0.35); max-width: 280px; line-height: 1.6; }

/* ── Internal Link Cards ────────────────────────────────────────── */
.link-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2px;
  background: var(--cream-border);
  border: 1px solid var(--cream-border);
}
.link-card {
  background: var(--cream);
  padding: 32px 28px;
  display: block;
  text-decoration: none;
  transition: background var(--transition);
}
.link-card:hover { background: var(--white); }
.link-card-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--burgundy);
  margin-bottom: 9px;
}
.link-card h3 {
  font-size: 1rem;
  color: var(--charcoal);
  margin-bottom: 8px;
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
}
.link-card p { font-size: 0.85rem; color: var(--muted); margin: 0; }
.link-card-arrow { display: block; color: var(--burgundy); margin-top: 16px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; }

/* ── Comparison Table ───────────────────────────────────────────── */
.compare-table-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  border: 1px solid var(--cream-border);
}
.compare-table th {
  background: var(--charcoal);
  color: var(--cream);
  padding: 14px 18px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.compare-table th:first-child { text-align: left; }
.compare-table td { padding: 13px 18px; border-bottom: 1px solid var(--cream-border); color: var(--muted); }
.compare-table td:first-child { font-weight: 700; color: var(--charcoal); font-size: 0.85rem; }
.compare-table tr:nth-child(even) td { background: var(--cream-dark); }
.compare-table td:not(:first-child) { text-align: center; }
.compare-table .check { color: var(--burgundy); font-weight: 700; }
.compare-table .no { color: var(--gray-400); }

/* ── Rural Eligibility Explainer ────────────────────────────────── */
.rural-explainer {
  background: var(--cream-dark);
  border: 1px solid var(--cream-border);
  padding: 36px 40px;
}
.rural-explainer > h3 { font-size: 1.15rem; margin-bottom: 12px; }
.rural-map-note { font-size: 0.85rem; font-style: italic; color: var(--muted); margin-bottom: 24px; }
.rural-counties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
}
.rural-county-chip {
  background: var(--cream);
  border: 1px solid var(--cream-border);
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--charcoal);
  text-align: center;
}
.rural-map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--burgundy);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  margin-top: 20px;
  letter-spacing: 0.04em;
}
.rural-map-link:hover { text-decoration: underline; }

/* ── Program Info Box ───────────────────────────────────────────── */
.info-box {
  background: var(--cream-dark);
  border: 1px solid var(--cream-border);
  padding: 28px 32px;
}
.info-box h3 { font-size: 1.05rem; margin-bottom: 12px; }
.info-box p { font-size: 0.9rem; }

/* ── Two-Column Content Layout ──────────────────────────────────── */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.two-col-grid.wide-left { grid-template-columns: 3fr 2fr; }

/* ── Page-Level Body Layout ─────────────────────────────────────── */
.page-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: start;
}
.page-content { min-width: 0; }
.page-sidebar { position: sticky; top: 88px; }
.sidebar-card {
  background: var(--cream-dark);
  border: 1px solid var(--cream-border);
  padding: 28px;
  margin-bottom: 16px;
}
.sidebar-card h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 14px; }
.sidebar-nav { list-style: none; padding: 0; }
.sidebar-nav li a {
  display: block;
  padding: 8px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--cream-border);
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
}
.sidebar-nav li:last-child a { border-bottom: none; }
.sidebar-nav li a:hover { color: var(--burgundy); }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .page-body { grid-template-columns: 1fr; }
  .page-sidebar { position: static; }
  .two-col-grid, .two-col-grid.wide-left { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .pros-cons-grid { grid-template-columns: 1fr; }
  .eligibility-grid { grid-template-columns: 1fr; }
  .rural-counties-grid { grid-template-columns: repeat(2, 1fr); }
  .lender-cta { padding: 36px 24px; }
  .lender-cta-right { width: 100%; }
}
@media (max-width: 660px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--charcoal);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 200;
    gap: 12px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1rem; padding: 14px 28px; color: rgba(245,240,232,0.8); }
  .nav-links a:hover { color: var(--cream); }
  .nav-close {
    position: absolute;
    top: 24px; right: 24px;
    background: none;
    border: none;
    color: var(--cream);
    font-size: 1.6rem;
    cursor: pointer;
  }
  section { padding: 56px 0; }
  .program-hero { padding: 56px 0 64px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom-inner { flex-direction: column; }
  .rural-counties-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .rural-counties-grid { grid-template-columns: 1fr; }
}
