/* =========================================================
   RV Loan Calculator — Main Stylesheet (2026)
   ========================================================= */

:root {
  --forest:    #1a3a2a;
  --pine:      #2d5a3d;
  --sage:      #4a7c5e;
  --moss:      #6dab80;
  --mist:      #c8e6d0;
  --cream:     #f8f4ee;
  --sand:      #efe8dc;
  --amber:     #d97b2a;
  --amber-lt:  #f5a652;
  --text:      #1e2a22;
  --text-mid:  #3d4f43;
  --text-soft: #6b7c70;
  --white:     #ffffff;
  --card-bg:   #ffffff;
  --border:    #dde8e1;
  --radius:    14px;
  --shadow:    0 4px 24px rgba(26,58,42,.08);
  --shadow-lg: 0 12px 48px rgba(26,58,42,.14);
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); background: var(--cream); color: var(--text); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); }

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

/* ── HEADER ── */
.site-header { background: var(--forest); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 16px rgba(0,0,0,.18); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--white); font-size: 1.1rem; font-weight: 400; letter-spacing: .02em; }
.logo-icon { font-size: 1.4rem; }
.logo strong { font-weight: 700; color: var(--moss); }
.main-nav { display: flex; gap: 4px; }
.nav-link { color: rgba(255,255,255,.75); font-size: .88rem; font-weight: 500; padding: 6px 14px; border-radius: 8px; transition: background .2s, color .2s; white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: var(--white); background: rgba(255,255,255,.1); }

/* ── HERO ── */
.hero { background: linear-gradient(135deg, var(--forest) 0%, var(--pine) 60%, var(--sage) 100%); position: relative; overflow: hidden; padding: 72px 0 80px; text-align: center; }
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape { position: absolute; border-radius: 50%; opacity: .08; background: var(--white); }
.s1 { width: 420px; height: 420px; top: -120px; left: -80px; }
.s2 { width: 280px; height: 280px; bottom: -60px; right: 10%; }
.s3 { width: 160px; height: 160px; top: 30%; right: 5%; }
.hero-content { position: relative; z-index: 1; }
.hero-badge { display: inline-block; background: rgba(255,255,255,.12); color: var(--mist); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 5px 16px; border-radius: 100px; border: 1px solid rgba(255,255,255,.18); margin-bottom: 20px; }
.hero-title { font-family: var(--font-head); font-size: clamp(2.4rem, 5vw, 4rem); color: var(--white); font-weight: 700; line-height: 1.15; margin-bottom: 18px; }
.hero-title em { font-style: normal; color: var(--amber-lt); }
.hero-sub { color: rgba(255,255,255,.78); font-size: 1.1rem; max-width: 560px; margin: 0 auto; font-weight: 300; }

/* ── CALCULATOR ── */
.section-calc { padding: 56px 0 40px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }

.calc-card, .results-card {
  background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 36px; border: 1px solid var(--border);
}
.calc-card-title { font-family: var(--font-head); font-size: 1.35rem; color: var(--forest); margin-bottom: 28px; padding-bottom: 16px; border-bottom: 2px solid var(--mist); }

/* Fields */
.field-group { margin-bottom: 22px; }
.label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.label-row label { font-size: .85rem; font-weight: 600; color: var(--text-mid); text-transform: uppercase; letter-spacing: .06em; }

.field-group > label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-mid); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }

.input-wrap { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--cream); transition: border-color .2s; }
.input-wrap:focus-within { border-color: var(--sage); }
.input-prefix, .input-suffix { padding: 0 14px; background: var(--sand); color: var(--text-soft); font-weight: 600; font-size: .95rem; border-right: 1.5px solid var(--border); height: 48px; display: flex; align-items: center; flex-shrink: 0; }
.input-suffix { border-right: none; border-left: 1.5px solid var(--border); }
.input-wrap input { flex: 1; height: 48px; border: none; background: transparent; padding: 0 14px; font-family: var(--font-body); font-size: 1rem; color: var(--text); outline: none; min-width: 0; }
.input-wrap input::-webkit-inner-spin-button, .input-wrap input::-webkit-outer-spin-button { -webkit-appearance: none; }
.input-wrap input::placeholder { color: var(--text-soft); opacity: .7; }

.range-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
input[type="range"] { flex: 1; height: 4px; accent-color: var(--sage); cursor: pointer; }
.range-label { font-size: .82rem; font-weight: 600; color: var(--sage); min-width: 80px; text-align: right; }

.field-hint { font-size: .78rem; color: var(--text-soft); margin-top: 5px; display: block; }
.hint-link { color: var(--sage); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ── DOWN PAYMENT TOGGLE ── */
.dp-toggle { display: flex; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--border); flex-shrink: 0; }
.dp-btn { padding: 5px 14px; background: var(--cream); border: none; font-size: .8rem; font-weight: 600; color: var(--text-soft); transition: all .18s; white-space: nowrap; }
.dp-btn.active { background: var(--forest); color: var(--white); }
.dp-btn:hover:not(.active) { background: var(--sand); color: var(--text); }

/* ── SALES TAX LINK ── */
.tax-info-link { font-size: .8rem; font-weight: 700; color: var(--sage); white-space: nowrap; transition: color .18s; }
.tax-info-link:hover { color: var(--amber); }

/* Term Pills */
.term-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { padding: 9px 20px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--cream); color: var(--text-mid); font-size: .88rem; font-weight: 600; transition: all .18s; }
.pill:hover { border-color: var(--sage); color: var(--forest); }
.pill.active { background: var(--forest); border-color: var(--forest); color: var(--white); }

/* Calculate Button */
.btn-calc { width: 100%; padding: 16px; background: linear-gradient(135deg, var(--forest), var(--pine)); color: var(--white); border: none; border-radius: 10px; font-size: 1rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-top: 8px; transition: transform .15s, box-shadow .15s; box-shadow: 0 4px 18px rgba(26,58,42,.28); }
.btn-calc:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(26,58,42,.34); }
.btn-calc:active { transform: translateY(0); }

/* Results */
.result-hero { text-align: center; padding: 24px 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.result-label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft); font-weight: 600; margin-bottom: 6px; }
.result-big { display: block; font-family: var(--font-head); font-size: clamp(2.4rem, 4vw, 3.2rem); color: var(--forest); font-weight: 700; line-height: 1.1; }
.result-row-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.result-stat { background: var(--cream); border-radius: 10px; padding: 12px 14px; border: 1px solid var(--border); }
.stat-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-soft); font-weight: 600; margin-bottom: 3px; }
.stat-val { display: block; font-size: 1.05rem; font-weight: 700; color: var(--forest); }
.stat-val.accent { color: var(--amber); }

/* Donut */
.chart-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 0; }
.donut-bg { fill: none; stroke: var(--mist); stroke-width: 14; }
.donut-principal { fill: none; stroke: var(--forest); stroke-width: 14; transition: stroke-dasharray .6s cubic-bezier(.4,0,.2,1); }
.donut-interest  { fill: none; stroke: var(--amber); stroke-width: 14; transition: stroke-dasharray .6s cubic-bezier(.4,0,.2,1); }
.donut-label-top { fill: var(--text-soft); font-size: 9px; text-anchor: middle; font-family: var(--font-body); }
.donut-label-bot { fill: var(--forest); font-size: 13px; font-weight: 700; text-anchor: middle; font-family: var(--font-body); }
.chart-legend { display: flex; gap: 20px; font-size: .8rem; font-weight: 600; color: var(--text-mid); align-items: center; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.legend-dot.principal { background: var(--forest); }
.legend-dot.interest  { background: var(--amber); }

.empty-state { text-align: center; color: var(--text-soft); font-size: .95rem; padding: 24px 20px; background: var(--cream); border-radius: 10px; border: 1.5px dashed var(--border); }
.empty-state strong { color: var(--forest); }

/* Amortization */
.amort-wrap { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); margin-top: 28px; overflow: hidden; }
.amort-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 28px; border-bottom: 1px solid var(--border); }
.amort-header h3 { font-family: var(--font-head); font-size: 1.15rem; color: var(--forest); }
.btn-toggle { background: none; border: 1.5px solid var(--sage); color: var(--sage); padding: 7px 18px; border-radius: 8px; font-size: .85rem; font-weight: 600; transition: all .18s; }
.btn-toggle:hover { background: var(--sage); color: var(--white); }
.table-scroll { overflow-x: auto; }
.amort-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.amort-table thead { background: var(--forest); color: var(--white); }
.amort-table th { padding: 12px 18px; text-align: left; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.amort-table td { padding: 11px 18px; border-bottom: 1px solid var(--border); color: var(--text-mid); }
.amort-table tbody tr:hover { background: var(--cream); }
.amort-table tbody tr:nth-child(12n) td { background: var(--sand); font-weight: 600; }

/* ── INFO SECTION ── */
.info-section { background: var(--forest); padding: 72px 0; color: var(--white); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.info-text h2 { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 18px; color: var(--mist); }
.info-text p { color: rgba(255,255,255,.78); margin-bottom: 16px; line-height: 1.75; }
.info-text strong { color: var(--amber-lt); }
.info-text em { color: var(--amber-lt); font-style: normal; }
.btn-text-link { color: var(--amber-lt); font-weight: 600; font-size: .95rem; transition: color .18s; }
.btn-text-link:hover { color: var(--white); }
.info-cards { display: flex; flex-direction: column; gap: 16px; }
.info-tip { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 20px 22px; }
.tip-icon { font-size: 1.4rem; display: block; margin-bottom: 8px; }
.info-tip h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--mist); }
.info-tip p { font-size: .88rem; color: rgba(255,255,255,.65); margin: 0; }

/* ── FAQ ── */
.faq-section { padding: 72px 0; background: var(--sand); }
.section-heading { font-family: var(--font-head); font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--forest); margin-bottom: 36px; text-align: center; }
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--white); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.faq-item summary { padding: 18px 22px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; color: var(--forest); font-size: .98rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--sage); font-weight: 400; flex-shrink: 0; margin-left: 12px; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 22px 18px; color: var(--text-mid); font-size: .93rem; line-height: 1.7; }
.faq-item a { color: var(--sage); text-decoration: underline; text-underline-offset: 2px; }
.faq-item strong { color: var(--forest); }

/* ── BLOG TEASER ── */
.blog-teaser { padding: 72px 0; }
.teaser-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 32px; }
.teaser-header h2 { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2rem); color: var(--forest); }
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.teaser-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 28px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s, box-shadow .2s; }
.teaser-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.teaser-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--sage); }
.teaser-card h3 { font-family: var(--font-head); font-size: 1.05rem; color: var(--forest); line-height: 1.4; }
.teaser-card p { font-size: .88rem; color: var(--text-soft); line-height: 1.65; flex: 1; }
.read-more { font-size: .85rem; font-weight: 700; color: var(--amber); margin-top: auto; }

/* ── FOOTER ── */
.site-footer { background: var(--forest); color: rgba(255,255,255,.7); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand p { margin-top: 14px; font-size: .88rem; line-height: 1.65; max-width: 300px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links h4 { color: var(--mist); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin-bottom: 6px; }
.footer-links a { font-size: .88rem; color: rgba(255,255,255,.6); transition: color .18s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { padding: 18px 0; text-align: center; font-size: .8rem; color: rgba(255,255,255,.4); }

/* ── BLOG LIST ── */
.blog-hero { background: linear-gradient(135deg, var(--forest), var(--pine)); padding: 56px 0; text-align: center; }
.blog-hero h1 { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 3rem); color: var(--white); margin-bottom: 12px; }
.blog-hero p { color: rgba(255,255,255,.75); font-size: 1.05rem; }
.blog-list-section { padding: 60px 0; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.blog-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-img { height: 160px; background: linear-gradient(135deg, var(--pine), var(--sage)); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--sage); margin-bottom: 8px; }
.blog-card h2 { font-family: var(--font-head); font-size: 1.1rem; color: var(--forest); margin-bottom: 10px; line-height: 1.4; }
.blog-card p { font-size: .88rem; color: var(--text-soft); line-height: 1.65; flex: 1; }
.blog-card-read { display: inline-block; margin-top: 16px; font-size: .85rem; font-weight: 700; color: var(--amber); }

/* ── BLOG POST ── */
.post-hero { background: linear-gradient(135deg, var(--forest), var(--pine)); padding: 60px 0 48px; }
.post-hero-inner { max-width: 780px; margin: 0 auto; }
.post-cat { display: inline-block; background: rgba(255,255,255,.12); color: var(--mist); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; padding: 4px 14px; border-radius: 100px; margin-bottom: 16px; }
.post-hero h1 { font-family: var(--font-head); font-size: clamp(1.8rem, 3.5vw, 2.8rem); color: var(--white); line-height: 1.25; margin-bottom: 16px; }
.post-meta { display: flex; align-items: center; gap: 20px; color: rgba(255,255,255,.6); font-size: .85rem; flex-wrap: wrap; }
.post-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; max-width: 1100px; margin: 0 auto; padding: 48px 24px 72px; align-items: start; }
.post-body { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 44px 48px; }
.post-body h2 { font-family: var(--font-head); font-size: 1.55rem; color: var(--forest); margin: 36px 0 14px; }
.post-body h3 { font-family: var(--font-head); font-size: 1.2rem; color: var(--pine); margin: 28px 0 10px; }
.post-body p { color: var(--text-mid); line-height: 1.8; margin-bottom: 18px; }
.post-body ul, .post-body ol { padding-left: 22px; margin-bottom: 18px; }
.post-body li { color: var(--text-mid); line-height: 1.75; margin-bottom: 6px; }
.post-body strong { color: var(--forest); }
.post-body a { color: var(--sage); text-decoration: underline; text-underline-offset: 3px; }

/* State tax table */
.state-tax-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 24px 0 32px; }
.state-tax-table thead { background: var(--forest); color: var(--white); }
.state-tax-table th { padding: 12px 16px; text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.state-tax-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); color: var(--text-mid); }
.state-tax-table tbody tr:hover { background: var(--cream); }
.state-tax-table tbody tr:nth-child(even) { background: var(--sand); }
.state-tax-table tbody tr:nth-child(even):hover { background: var(--mist); }
.rate-badge { display: inline-block; padding: 2px 10px; border-radius: 100px; font-size: .78rem; font-weight: 700; }
.rate-none   { background: #d4edda; color: #155724; }
.rate-low    { background: #cce5ff; color: #004085; }
.rate-mid    { background: #fff3cd; color: #856404; }
.rate-high   { background: #f8d7da; color: #721c24; }

.placeholder-block { background: var(--sand); border: 1.5px dashed var(--border); border-radius: 10px; padding: 24px; margin: 28px 0; color: var(--text-soft); font-size: .9rem; line-height: 1.7; }
.placeholder-block strong { color: var(--text-mid); display: block; margin-bottom: 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }

/* Sidebar */
.post-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 22px; }
.sidebar-widget h3 { font-family: var(--font-head); font-size: 1.05rem; color: var(--forest); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--mist); }
.cta-widget { background: linear-gradient(135deg, var(--forest), var(--pine)); color: var(--white); text-align: center; }
.cta-widget h3 { color: var(--mist); border-bottom-color: rgba(255,255,255,.15); }
.cta-widget p { font-size: .88rem; color: rgba(255,255,255,.75); margin-bottom: 16px; }
.btn-cta { display: block; background: var(--amber); color: var(--white); padding: 12px 20px; border-radius: 8px; font-weight: 700; font-size: .9rem; text-align: center; transition: background .18s; }
.btn-cta:hover { background: var(--amber-lt); }
.sidebar-links { display: flex; flex-direction: column; gap: 10px; }
.sidebar-links a { font-size: .88rem; color: var(--pine); display: flex; align-items: flex-start; gap: 6px; line-height: 1.4; transition: color .18s; }
.sidebar-links a:hover { color: var(--amber); }
.sidebar-links a::before { content: '→'; flex-shrink: 0; color: var(--moss); }

/* Breadcrumb */
.breadcrumb { background: var(--sand); padding: 10px 0; border-bottom: 1px solid var(--border); }
.breadcrumb-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; font-size: .8rem; color: var(--text-soft); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumb a { color: var(--sage); }

/* Related */
.related-section { background: var(--sand); padding: 56px 0; }
.related-section h2 { font-family: var(--font-head); font-size: 1.6rem; color: var(--forest); margin-bottom: 28px; text-align: center; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* ── RESPONSIVE ── */
@media (max-width: 1000px) {
  .nav-link { font-size: .82rem; padding: 6px 10px; }
}
@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; gap: 36px; }
  .teaser-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .main-nav { gap: 2px; }
  .nav-link { font-size: .78rem; padding: 5px 8px; }
  .teaser-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .result-row-grid { grid-template-columns: 1fr 1fr; }
  .post-body { padding: 24px 20px; }
  .teaser-header { flex-direction: column; gap: 8px; }
  .post-sidebar { grid-template-columns: 1fr; }
  .state-tax-table { font-size: .82rem; }
  .state-tax-table th, .state-tax-table td { padding: 8px 10px; }
}
