/* ============================================================
   Data Drive Coupon — main stylesheet
   ============================================================ */
:root {
  --brand: #0e4d92;
  --brand-dark: #0a3a6f;
  --accent: #ff7a00;
  --accent-dark: #e56d00;
  --green: #1a8917;
  --ink: #1c2733;
  --ink-soft: #4a5a6a;
  --line: #e3e9f0;
  --bg: #f6f9fc;
  --card: #ffffff;
  --radius: 14px;
  --maxw: 1120px;
  --maxw-article: 820px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; height: auto; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
#site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(14, 77, 146, .06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 20px;
  max-width: var(--maxw); margin: 0 auto;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem; color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
.site-logo .logo-badge {
  background: linear-gradient(135deg, var(--brand), #1f7ae0);
  color: #fff; width: 36px; height: 36px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.site-logo .logo-coupon { color: var(--accent); }

#main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
#main-nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600;
  font-size: .92rem; padding: 7px 11px; border-radius: 8px;
}
#main-nav a:hover { background: var(--bg); color: var(--brand); }
#main-nav a.nav-cta {
  background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(255,122,0,.35);
}
#main-nav a.nav-cta:hover { background: var(--accent-dark); color: #fff; }

#nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--ink); font-size: 1.05rem; }

@media (max-width: 860px) {
  #nav-toggle { display: block; }
  #main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px;
  }
  #main-nav.open { display: flex; }
  #main-nav a { padding: 11px 12px; }
}

/* ---------- Coupon ribbon (top strip) ---------- */
#coupon-ribbon {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  color: #fff; font-size: .88rem; text-align: center; padding: 7px 14px;
}
#coupon-ribbon strong { color: #ffd08a; letter-spacing: .5px; }
#coupon-ribbon a { color: #fff; font-weight: 700; text-decoration: underline; }

/* ---------- Hero (homepage) ---------- */
#hero-section {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(31,122,224,.25), transparent 60%),
    linear-gradient(150deg, #0a2e52 0%, var(--brand) 60%, #1567c0 100%);
  color: #fff; padding: 64px 20px 72px;
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; } }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  letter-spacing: .3px;
}
#hero-section h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.15; margin: 18px 0 14px; font-weight: 800; }
#hero-section h1 .hl { color: #ffc46b; }
.hero-sub { font-size: 1.06rem; color: #d7e6f7; max-width: 560px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 18px 28px; margin-top: 26px; font-size: .9rem; color: #cfe1f5; }
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts i { color: #7fd18b; }

/* Hero visual image */
.hero-visual {
  margin: 30px 0 0; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 16px 44px rgba(3, 18, 36, .45);
  max-width: 560px;
}
.hero-visual img { display: block; width: 100%; height: auto; }

/* Coupon card */
.coupon-card {
  background: #fff; color: var(--ink); border-radius: 18px;
  padding: 28px 26px; box-shadow: 0 18px 50px rgba(4, 24, 46, .4);
  text-align: center;
}
.coupon-card .cc-label { font-size: .8rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-soft); }
.coupon-card .cc-discount { font-size: 2.6rem; font-weight: 800; color: var(--brand); line-height: 1.1; margin: 6px 0 2px; }
.coupon-card .cc-note { font-size: .84rem; color: var(--ink-soft); margin-bottom: 16px; }
.coupon-code-box {
  display: flex; align-items: stretch; justify-content: center; gap: 0;
  border: 2px dashed var(--accent); border-radius: 12px; overflow: hidden;
  margin: 0 auto 14px; max-width: 320px; background: #fff8f0;
}
.coupon-code-box .code {
  flex: 1; font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 1.35rem; font-weight: 700; letter-spacing: 2px; color: var(--ink);
  padding: 12px 10px; display: flex; align-items: center; justify-content: center;
}
.coupon-code-box .copy-btn {
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  font-weight: 700; font-size: .9rem; padding: 0 18px; font-family: inherit;
}
.coupon-code-box .copy-btn:hover { background: var(--accent-dark); }
.coupon-card .cc-fineprint { font-size: .76rem; color: var(--ink-soft); margin-top: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 11px; font-weight: 700; text-decoration: none;
  padding: 13px 24px; font-size: .98rem; transition: transform .12s ease, box-shadow .12s ease;
  border: none; cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff !important; box-shadow: 0 6px 18px rgba(255,122,0,.4); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: rgba(255,255,255,.14); color: #fff !important; border: 1px solid rgba(255,255,255,.4); }
.btn-outline { background: #fff; color: var(--brand) !important; border: 2px solid var(--brand); }
.btn-block { width: 100%; }
.btn + .btn-minor { margin-top: 10px; }
.btn-minor { display: block; font-size: .86rem; color: var(--brand); text-decoration: underline; }

/* ---------- Sections ---------- */
.section { padding: 58px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 38px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin: 0 0 10px; font-weight: 800; }
.section-head p { color: var(--ink-soft); margin: 0; }
.batch-tag {
  display: inline-block; background: #e8f1fb; color: var(--brand);
  font-size: .78rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 12px;
}

/* Article cards */
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 960px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .article-grid { grid-template-columns: 1fr; } }

.article-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; color: var(--ink);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.article-card:hover { box-shadow: 0 12px 30px rgba(14,77,146,.12); transform: translateY(-3px); border-color: #c8d9ec; color: var(--ink); }
.article-card .ac-icon {
  width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: #fff; background: linear-gradient(135deg, var(--brand), #1f7ae0);
}
.article-card.ac-featured .ac-icon { background: linear-gradient(135deg, var(--accent), #ffab52); }
.article-card h3 { margin: 4px 0 0; font-size: 1.06rem; font-weight: 700; line-height: 1.35; }
.article-card p { margin: 0; font-size: .88rem; color: var(--ink-soft); flex: 1; }
.article-card .ac-more { font-size: .86rem; font-weight: 700; color: var(--brand); }
.article-card .ac-more i { font-size: .75rem; margin-left: 4px; transition: margin .15s; }
.article-card:hover .ac-more i { margin-left: 8px; }

/* Offer comparison table (homepage) */
.offers-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.offers-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .93rem; }
.offers-table th, .offers-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.offers-table th { background: #f0f6fc; font-size: .8rem; text-transform: uppercase; letter-spacing: .7px; color: var(--ink-soft); }
.offers-table tr:last-child td { border-bottom: none; }
.offers-table .offer-name { font-weight: 700; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.pill-green { background: #e6f4e6; color: var(--green); }
.pill-blue { background: #e8f1fb; color: var(--brand); }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 960px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step-card .step-num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; margin-bottom: 12px;
}
.step-card h3 { margin: 0 0 6px; font-size: 1rem; }
.step-card p { margin: 0; font-size: .88rem; color: var(--ink-soft); }

/* Disclosure box */
.disclosure-box {
  background: #fffaf2; border: 1px solid #f3ddb8; border-radius: 12px;
  padding: 14px 18px; font-size: .84rem; color: #7a5c22; margin: 26px auto;
}
.disclosure-box i { margin-right: 8px; }

/* ---------- Article layout ---------- */
#article-hero {
  background: linear-gradient(150deg, #0a2e52, var(--brand));
  color: #fff; padding: 40px 20px 44px;
}
.article-hero-inner { max-width: var(--maxw-article); margin: 0 auto; }
#breadcrumbs { font-size: .82rem; color: #a9c6e4; margin-bottom: 16px; }
#breadcrumbs a { color: #d3e5f7; text-decoration: none; }
#breadcrumbs a:hover { text-decoration: underline; }
#breadcrumbs .sep { margin: 0 8px; opacity: .6; }
#article-hero h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.2; margin: 0 0 14px; font-weight: 800; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .84rem; color: #c4dbf2; }
.article-meta i { margin-right: 6px; color: #8fd39a; }

.article-layout {
  max-width: var(--maxw-article); margin: 0 auto; padding: 36px 20px 70px;
}

#article-body {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 4vw, 46px);
  font-size: 1.02rem;
}

/* Featured image inside article body */
.article-featured-image {
  margin: 1.8em 0; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(14, 77, 146, .12);
}
.article-featured-image img { display: block; width: 100%; height: auto; }

/* Article typography */
#article-body h1 { display: none; } /* H1 shown in hero, avoid duplicate */
#article-body h2 {
  font-size: 1.45rem; margin: 2.2em 0 .7em; font-weight: 800; line-height: 1.3;
  padding-top: .6em; border-top: 1px solid var(--line);
}
#article-body h2:first-of-type { border-top: none; padding-top: 0; }
#article-body h3 { font-size: 1.13rem; margin: 1.7em 0 .55em; font-weight: 700; }
#article-body p { margin: 0 0 1.1em; }
#article-body ul, #article-body ol { padding-left: 1.4em; margin: 0 0 1.2em; }
#article-body li { margin-bottom: .45em; }
#article-body strong { color: var(--ink); }
#article-body code {
  font-family: 'JetBrains Mono', Consolas, monospace; background: #fff3e4;
  color: #b35400; font-weight: 700; padding: 2px 8px; border-radius: 6px; font-size: .92em;
  border: 1px dashed #ffc98a;
}
#article-body blockquote {
  margin: 1.6em 0; padding: 18px 22px;
  background: linear-gradient(135deg, #f0f7ff, #e8f1fb);
  border-left: 5px solid var(--brand); border-radius: 0 12px 12px 0;
  font-size: .97rem;
}
#article-body blockquote p { margin: 0 0 .4em; }
#article-body blockquote p:last-child { margin-bottom: 0; }

/* Tables in article body */
#article-body .table-scroll { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--line); border-radius: 10px; }
#article-body table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .9rem; }
#article-body th, #article-body td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
#article-body th { background: #f0f6fc; font-size: .78rem; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-soft); white-space: nowrap; }
#article-body tr:last-child td { border-bottom: none; }
#article-body tbody tr:nth-child(even) { background: #fafcfe; }

/* Checklist items */
#article-body li.task-item { list-style: none; margin-left: -1.4em; padding-left: 1.9em; position: relative; }
#article-body li.task-item::before {
  content: "\f0c8"; font-family: "Font Awesome 6 Free"; font-weight: 400;
  position: absolute; left: 0; color: var(--brand);
}

/* Affiliate / sponsored links inside body */
#article-body a[rel~="sponsored"] { font-weight: 700; }

/* In-article affiliate disclosure emphasis */
#article-body em:first-of-type { color: #7a5c22; }

/* TOC */
#article-toc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 26px; font-size: .92rem;
}
#article-toc h2 { margin: 0 0 10px; font-size: .82rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); }
#article-toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 34px; }
@media (max-width: 640px) { #article-toc ol { columns: 1; } }
#article-toc li { margin-bottom: 6px; break-inside: avoid; }
#article-toc a { text-decoration: none; }
#article-toc a:hover { text-decoration: underline; }

/* Inline coupon CTA box injected into articles */
.article-coupon-box {
  margin: 2em 0; padding: 24px; border-radius: 14px; text-align: center;
  background: linear-gradient(135deg, #0a2e52, var(--brand)); color: #fff;
}
.article-coupon-box .acb-title { font-weight: 800; font-size: 1.15rem; margin-bottom: 4px; }
.article-coupon-box .acb-sub { font-size: .86rem; color: #cfe1f5; margin-bottom: 14px; }
.article-coupon-box .coupon-code-box { background: #fff; max-width: 300px; }
.article-coupon-box .cc-fineprint { font-size: .74rem; color: #b9d2ec; margin-top: 10px; }

/* Related articles */
#related-articles { margin-top: 34px; }
#related-articles h2 { font-size: 1.2rem; margin: 0 0 16px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 620px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px;
  text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 600;
  transition: border-color .15s, box-shadow .15s;
}
.related-card:hover { border-color: #c8d9ec; box-shadow: 0 8px 20px rgba(14,77,146,.1); color: var(--brand); }
.related-card i { color: var(--brand); margin-top: 3px; }

/* Sticky mobile coupon bar on article pages */
#sticky-coupon-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(14,77,146,.14);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 10px 14px; font-size: .88rem;
}
#sticky-coupon-bar .sc-code { font-family: 'JetBrains Mono', monospace; font-weight: 700; background: #fff8f0; border: 1.5px dashed var(--accent); padding: 5px 12px; border-radius: 8px; }
#sticky-coupon-bar .btn { padding: 9px 16px; font-size: .86rem; }
@media (min-width: 861px) { #sticky-coupon-bar { display: none; } }
body.has-sticky-bar { padding-bottom: 64px; }
@media (min-width: 861px) { body.has-sticky-bar { padding-bottom: 0; } }

/* Loading state */
#article-loading { text-align: center; padding: 60px 0; color: var(--ink-soft); }
#article-loading i { font-size: 1.6rem; color: var(--brand); animation: spin 1s linear infinite; display: block; margin-bottom: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
#site-footer { background: #0a2438; color: #b9cbdc; padding: 46px 20px 30px; margin-top: 0; font-size: .9rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; }
@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr; } }
#site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 14px; }
#site-footer ul { list-style: none; margin: 0; padding: 0; }
#site-footer li { margin-bottom: 8px; }
#site-footer a { color: #b9cbdc; text-decoration: none; }
#site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-disclosure { font-size: .8rem; line-height: 1.6; color: #8ba4bb; }
.footer-bottom {
  max-width: var(--maxw); margin: 34px auto 0; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; color: #7d97ae;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}

/* Copy feedback toast */
#copy-toast {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%) translateY(16px);
  background: var(--ink); color: #fff; padding: 10px 22px; border-radius: 999px;
  font-size: .88rem; font-weight: 600; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 100;
}
#copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
