/* =============================================
   TaxCalcNC — Stylesheet
   Design: Clean editorial, Carolina Blue + Pine
   ============================================= */

:root {
  --carolina: #4B9CD3;      /* UNC Carolina Blue */
  --pine: #1B3A2D;          /* NC pine green */
  --pine-mid: #2D5E45;
  --gold: #C8940A;          /* NC State gold accent */
  --gold-light: #F0B429;
  --bg: #F5F7FA;
  --white: #FFFFFF;
  --text: #1A2332;
  --text-soft: #4A5568;
  --text-muted: #8A96A8;
  --green: #15803D;
  --green-bg: #F0FDF4;
  --red: #B91C1C;
  --red-bg: #FFF5F5;
  --border: #DDE3EE;
  --r: 14px;
  --r-sm: 8px;
  --shadow: 0 4px 20px rgba(27,58,45,0.08);
  --shadow-lg: 0 12px 40px rgba(27,58,45,0.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Source Sans 3', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--carolina); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── HEADER ── */
.site-header {
  background: var(--pine);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 3px solid var(--gold);
}
.nav-container {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 62px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Playfair Display', serif; font-size: 1.35rem; color: #fff; text-decoration: none;
}
.nav-logo strong { color: var(--gold-light); }
.logo-leaf { font-size: 1.1rem; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { color: rgba(255,255,255,0.75); font-size: 0.9rem; font-weight: 500; transition: color .2s; text-decoration: none; }
.nav-links a:hover, .nav-links a.active { color: var(--gold-light); }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* ── HERO ── */
.hero {
  background: linear-gradient(140deg, var(--pine) 0%, var(--pine-mid) 55%, #1A4A6B 100%);
  padding: 60px 0 56px; position: relative; overflow: hidden;
}
.hero-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape { position: absolute; border-radius: 50%; opacity: 0.06; }
.s1 { width: 500px; height: 500px; background: var(--carolina); top: -150px; right: -100px; }
.s2 { width: 300px; height: 300px; background: var(--gold); bottom: -100px; left: 5%; }
.hero-inner { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block; background: rgba(200,148,10,0.2); border: 1px solid rgba(200,148,10,0.4);
  color: var(--gold-light); padding: 5px 16px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 20px;
}
.hero h1 {
  font-family: 'Playfair Display', serif; font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: #fff; line-height: 1.15; margin-bottom: 16px; font-weight: 800;
}
.accent-line {
  background: linear-gradient(90deg, var(--gold-light), var(--carolina));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-desc { font-size: 1.05rem; color: rgba(255,255,255,0.75); max-width: 560px; margin-bottom: 32px; }
.hero-stats {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat strong { display: block; font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--gold-light); }
.stat span { font-size: 0.78rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: .04em; }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.2); }

/* ── CALCULATOR ── */
.calc-section { padding: 0 0 56px; margin-top: -24px; position: relative; z-index: 10; }
.calc-card {
  background: var(--white); border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 36px 40px; border: 1px solid var(--border);
}
.calc-tabs { display: flex; gap: 4px; margin-bottom: 28px; border-bottom: 2px solid var(--border); }
.tab-btn {
  background: none; border: none; padding: 10px 22px;
  font-family: 'Source Sans 3', sans-serif; font-size: 0.9rem; font-weight: 600; color: var(--text-soft);
  cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all .2s; border-radius: 4px 4px 0 0;
}
.tab-btn:hover { color: var(--pine); }
.tab-btn.active { color: var(--pine); border-bottom-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.compare-hint { color: var(--text-soft); font-size: 0.9rem; margin-bottom: 20px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.input-icon-wrap { position: relative; }
.i-prefix { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-soft); font-weight: 600; }
.input-icon-wrap input { padding-left: 30px; }
input, select {
  width: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--r-sm);
  font-family: 'Source Sans 3', sans-serif; font-size: 0.97rem; color: var(--text); background: var(--bg);
  transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234A5568' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px;
}
input:focus, select:focus { outline: none; border-color: var(--carolina); box-shadow: 0 0 0 3px rgba(75,156,211,0.15); }
.calc-btn {
  background: linear-gradient(135deg, var(--pine), var(--pine-mid));
  color: #fff; border: none; padding: 13px 32px;
  font-family: 'Source Sans 3', sans-serif; font-size: 1rem; font-weight: 600;
  border-radius: var(--r-sm); cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.calc-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(27,58,45,0.3); }

/* Result Box */
.result-box {
  margin-top: 28px; border-radius: var(--r);
  border: 2px solid var(--carolina); background: linear-gradient(135deg, #EBF5FB, #F0F8FF);
  padding: 24px 28px; animation: fadeSlide .3s ease;
}
@keyframes fadeSlide { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.result-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--pine); font-weight: 700; }
.result-badge { background: var(--pine); color: var(--gold-light); padding: 4px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; }
.rr { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed rgba(0,0,0,.07); font-size: 0.93rem; }
.rr.sub { color: var(--text-soft); font-size: 0.86rem; padding-left: 10px; }
.rr.total { font-weight: 700; color: var(--pine); padding-top: 12px; }
.rr.grand { font-weight: 800; font-size: 1.05rem; background: rgba(75,156,211,.08); padding: 10px 8px; border-radius: 8px; border-bottom: none; margin-top: 4px; }
.exempt-tag { background: var(--green-bg); border: 1px solid #86EFAC; color: var(--green); padding: 10px 14px; border-radius: 8px; margin-top: 14px; font-size: 0.9rem; }
.vehicle-tag { background: #FFF7ED; border: 1px solid #FED7AA; color: #9A3412; padding: 10px 14px; border-radius: 8px; margin-top: 14px; font-size: 0.9rem; }
.food-tag { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; padding: 10px 14px; border-radius: 8px; margin-top: 14px; font-size: 0.9rem; }
.compare-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 0.9rem; }
.compare-table th { background: var(--pine); color: #fff; padding: 10px 14px; text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .04em; }
.compare-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.compare-table tr:hover td { background: #EBF5FB; }
.copy-btn { margin-top: 14px; background: none; border: 1px solid var(--border); padding: 7px 16px; border-radius: 8px; font-size: 0.83rem; cursor: pointer; color: var(--text-soft); transition: all .2s; }
.copy-btn:hover { background: var(--bg); border-color: var(--carolina); color: var(--carolina); }

/* Rate Chips */
.rate-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
.chip { background: var(--white); border: 1px solid var(--border); padding: 7px 18px; border-radius: 999px; font-size: 0.83rem; color: var(--text-soft); box-shadow: var(--shadow); }

/* ── HOW SECTION ── */
.how-section { padding: 64px 0; background: var(--white); }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--pine); text-align: center; margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--text-soft); font-size: 0.97rem; margin-bottom: 40px; max-width: 680px; margin-left: auto; margin-right: auto; }
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.info-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 26px 22px; text-align: center; transition: transform .2s, box-shadow .2s; }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-icon { font-size: 2rem; margin-bottom: 14px; }
.info-card h3 { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: var(--pine); margin-bottom: 10px; }
.info-card p { font-size: 0.88rem; color: var(--text-soft); line-height: 1.65; }

/* ── TAXABLE SECTION ── */
.taxable-section { padding: 64px 0; background: var(--bg); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tax-col { border-radius: var(--r); padding: 28px 30px; border: 2px solid; }
.green-col { background: var(--green-bg); border-color: #BBF7D0; }
.red-col { background: var(--red-bg); border-color: #FECACA; }
.col-hdr { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.05rem; margin-bottom: 16px; }
.green-col .col-hdr { color: var(--green); }
.red-col .col-hdr { color: var(--red); }
.tax-col ul { list-style: none; }
.tax-col ul li { padding: 6px 0; font-size: 0.9rem; border-bottom: 1px solid rgba(0,0,0,.06); color: var(--text); }
.green-col ul li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.red-col ul li::before { content: "• "; color: var(--red); font-weight: 700; }
.source-note { text-align: center; margin-top: 20px; font-size: 0.82rem; color: var(--text-muted); }

/* ── TABLE SECTION ── */
.table-section { padding: 64px 0; background: var(--white); }
.table-controls { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.table-controls input { max-width: 280px; background: var(--bg); }
.filter-btns { display: flex; gap: 8px; }
.filter-btn { background: var(--bg); border: 1px solid var(--border); padding: 8px 18px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; cursor: pointer; color: var(--text-soft); transition: all .2s; }
.filter-btn.active, .filter-btn:hover { background: var(--pine); color: #fff; border-color: var(--pine); }
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--border); }
.rates-tbl { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.rates-tbl thead { background: var(--pine); color: #fff; }
.rates-tbl thead th { padding: 13px 18px; text-align: left; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.rates-tbl tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
.rates-tbl tbody tr:hover { background: #EBF5FB; }
.rates-tbl tbody td { padding: 11px 18px; }
.rate-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 0.82rem; }
.rb-base { background: #DCFCE7; color: #166534; }
.rb-mid { background: #FEF9C3; color: #854D0E; }
.rb-high { background: #FEE2E2; color: #991B1B; }
.transit-tag { display: inline-block; background: rgba(75,156,211,0.15); color: var(--carolina); font-size: 0.72rem; padding: 1px 7px; border-radius: 4px; margin-left: 6px; font-weight: 600; }

/* ── FAQ ── */
.faq-section { padding: 64px 0; background: var(--bg); }
.faq-wrap { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 0; background: none; border: none;
  font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: var(--pine);
  cursor: pointer; text-align: left; gap: 14px;
}
.faq-q span { font-size: 1.2rem; color: var(--gold); flex-shrink: 0; transition: transform .2s; }
.faq-q.open span { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 0 18px; color: var(--text-soft); font-size: 0.93rem; line-height: 1.7; }
.faq-a.open { display: block; }

/* ── BLOG CTA ── */
.blog-cta { background: linear-gradient(135deg, var(--pine), var(--pine-mid)); padding: 52px 0; }
.blog-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.blog-cta h2 { font-family: 'Playfair Display', serif; font-size: 1.7rem; color: #fff; margin-bottom: 8px; }
.blog-cta p { color: rgba(255,255,255,0.7); }
.cta-btn { display: inline-block; background: var(--gold); color: var(--pine); padding: 13px 30px; border-radius: var(--r-sm); font-weight: 700; font-size: 0.97rem; text-decoration: none; white-space: nowrap; transition: transform .15s, box-shadow .15s; }
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,148,10,0.35); text-decoration: none; }

/* ── FOOTER ── */
.site-footer { background: var(--pine); color: rgba(255,255,255,0.65); padding-top: 52px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; padding-bottom: 44px; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: #fff; margin-bottom: 12px; display: block; }
.footer-col p { font-size: 0.87rem; line-height: 1.7; margin-top: 8px; }
.footer-col strong { color: var(--gold-light); display: block; margin-bottom: 12px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 0.88rem; text-decoration: none; transition: color .2s; }
.footer-col ul li a:hover { color: var(--gold-light); }
.footer-bar { border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 24px; text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.4); }
.footer-bar a { color: rgba(255,255,255,0.5); }

/* ── BLOG PAGES ── */
.blog-hero { background: linear-gradient(135deg, var(--pine), var(--pine-mid)); padding: 56px 0; text-align: center; }
.blog-hero h1 { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.blog-hero p { color: rgba(255,255,255,0.7); font-size: 1.02rem; }
.blog-grid-section { padding: 56px 0; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.blog-card { background: var(--white); border-radius: var(--r); border: 1px solid var(--border); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-thumb { height: 160px; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.thumb-green { background: linear-gradient(135deg, var(--pine), var(--pine-mid)); }
.thumb-blue { background: linear-gradient(135deg, #1a4a6b, var(--carolina)); }
.thumb-gold { background: linear-gradient(135deg, #7a5200, var(--gold)); }
.card-body { padding: 22px; }
.btag { display: inline-block; background: rgba(27,58,45,0.1); color: var(--pine-mid); font-size: 0.72rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.blog-card h2 { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: var(--pine); margin-bottom: 8px; line-height: 1.4; }
.blog-card p { font-size: 0.86rem; color: var(--text-soft); margin-bottom: 14px; }
.read-link { font-size: 0.84rem; font-weight: 600; color: var(--carolina); }
.bmeta { font-size: 0.76rem; color: var(--text-muted); margin-top: 10px; }

/* ── ARTICLE ── */
.art-hero { background: linear-gradient(135deg, var(--pine), var(--pine-mid)); padding: 52px 0 44px; }
.art-inner { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.breadcrumb { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-bottom: 14px; }
.breadcrumb a { color: rgba(255,255,255,0.6); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-light); }
.art-tag { display: inline-block; background: rgba(200,148,10,0.2); color: var(--gold-light); font-size: 0.72rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.art-hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 12px; }
.art-meta { color: rgba(255,255,255,0.55); font-size: 0.85rem; }
.art-body-wrap { max-width: 760px; margin: 0 auto; padding: 48px 24px 64px; }
.art-body h2 { font-family: 'Playfair Display', serif; font-size: 1.35rem; font-weight: 800; color: var(--pine); margin: 38px 0 14px; }
.art-body h3 { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 700; color: var(--pine); margin: 24px 0 10px; }
.art-body p { color: var(--text); line-height: 1.8; margin-bottom: 18px; }
.art-body ul, .art-body ol { margin: 14px 0 18px 22px; }
.art-body li { margin-bottom: 7px; color: var(--text); line-height: 1.7; }
.art-body a { color: var(--carolina); }
.art-body strong { color: var(--pine); }
.placeholder-block {
  background: var(--bg); border: 2px dashed var(--border); border-radius: var(--r);
  padding: 24px 28px; margin: 24px 0; text-align: center; color: var(--text-muted); font-size: 0.88rem;
}
.placeholder-block strong { display: block; color: var(--text-soft); margin-bottom: 5px; font-size: 0.93rem; }
.art-cta { background: linear-gradient(135deg, #EBF5FB, #E0F0FF); border: 2px solid #BFDBFE; border-radius: var(--r); padding: 26px 30px; margin: 32px 0; text-align: center; }
.art-cta h3 { font-family: 'Playfair Display', serif; color: var(--pine); margin-bottom: 8px; }
.art-cta p { color: var(--text-soft); margin-bottom: 16px; font-size: 0.93rem; }
.related-section { background: var(--bg); padding: 44px 0; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 24px; }

/* ── COMING SOON ── */
.coming-wrap { min-height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 60px 24px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .blog-cta-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 620px) {
  .form-row { grid-template-columns: 1fr; }
  .calc-card { padding: 22px 18px; }
  .card-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .calc-tabs { flex-direction: column; }
  .hero-stats { gap: 14px; }
  .stat-divider { display: none; }
}
