/*
Theme Name: Cheap Traffic School 365
Theme URI: https://cheaptrafficschool365.com/
Author: RizeUp Media
Description: State-aware online traffic school theme. Front page routes drivers to a state landing page; separate page templates carry California (DMV TVS) and Michigan (SOS BDIC) content, pricing and eligibility rules. Prices, phone, address and course URLs are editable in Appearance → Customize.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ctc365
Tags: custom-menu, custom-logo, editor-style, full-width-template, translation-ready
*/

/* ---------- Tokens ---------- */
:root {
  --midnight: #043C49;
  --caribbean: #075F6B;
  --cyan: #148A8C;
  --lime: #29D100;
  --lime-hover: #24bb00;
  --mist: #ECECEC;
  --white: #ffffff;
  --footer: #032f39;
  --border: #d9dcde;
  --ink-70: rgba(4, 60, 73, 0.72);
  --ink-55: rgba(4, 60, 73, 0.55);
  --on-dark-75: rgba(255, 255, 255, 0.74);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 8px 24px rgba(4, 60, 73, 0.08);
  --shadow-md: 0 8px 24px rgba(4, 60, 73, 0.10);
  --shadow-lg: 0 18px 44px rgba(4, 60, 73, 0.14);
  --container: 1280px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Poppins, system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--midnight);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }
p { margin: 0; }
img { max-width: 100%; height: auto; }
a { color: var(--cyan); text-decoration: none; transition: color 120ms ease; }
a:hover { color: var(--midnight); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
ul { margin: 0; padding: 0; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 999; width: auto; height: auto;
  clip: auto; padding: 12px 18px; background: var(--white); color: var(--midnight);
  font-weight: 600; border-radius: var(--radius-sm);
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; }
.container--narrow { max-width: 1080px; }
.container--text { max-width: 1000px; }
.section { padding: 96px 32px; display: flex; justify-content: center; }
.section--tight { padding: 64px 32px; }
.section--dark { background: var(--midnight); color: var(--white); }
.section--muted { background: var(--mist); }
.section--fade { background: linear-gradient(180deg, #ffffff 0%, #ECECEC 100%); }
.stack { display: flex; flex-direction: column; }
.eyebrow {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--cyan);
}
.section--dark .eyebrow { color: var(--lime); }
.lede { font-size: 19px; line-height: 1.6; color: var(--ink-70); }
.section--dark .lede { color: var(--on-dark-75); }
.fine { font-size: 13px; line-height: 1.55; color: var(--ink-55); }
.measure { max-width: 60ch; }
.h1 { font-size: 54px; text-wrap: balance; }
.h2 { font-size: 40px; }
.h3 { font-size: 22px; }
.h4 { font-size: 19px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  padding: 15px 24px; border-radius: var(--radius-sm); border: 0; cursor: pointer;
  transition: background 120ms ease, transform 100ms ease, color 120ms ease;
}
.btn:active { transform: scale(0.98); }
.btn--lime { background: var(--lime); color: var(--midnight); }
.btn--lime:hover { background: var(--lime-hover); color: var(--midnight); }
.btn--dark { background: var(--midnight); color: var(--white); }
.btn--dark:hover { background: var(--caribbean); color: var(--white); }
.btn--ghost { border: 1px solid rgba(255, 255, 255, 0.4); color: var(--white); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }
.btn--sm { font-size: 15px; padding: 12px 22px; }
.btn--lg { font-size: 17px; padding: 18px 30px; border-radius: var(--radius-md); }
.btn--block { width: 100%; }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--midnight); color: var(--white); padding: 10px 32px; display: flex; justify-content: center; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: 13px; }
.topbar__note { color: rgba(255, 255, 255, 0.78); }
.topbar__phone { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--white); }
.topbar__phone:hover { color: var(--lime); }

.site-header {
  position: sticky; top: 0; z-index: 30; background: var(--white);
  border-bottom: 1px solid var(--border); padding: 0 32px; display: flex; justify-content: center;
}
.site-header__inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand__wordmark { display: flex; align-items: baseline; gap: 2px; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; color: var(--midnight); }
.brand__accent { color: var(--lime); }
.brand__state { background: var(--mist); color: var(--midnight); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: var(--radius-pill); }
.brand__logo img { max-height: 44px; width: auto; }

.nav ul { list-style: none; display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; }
.nav a { font-size: 15px; color: var(--midnight); }
.nav a:hover, .nav .current-menu-item > a { color: var(--cyan); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-actions__link { font-size: 15px; font-weight: 500; color: var(--midnight); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--midnight); cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 72px 32px 80px; display: flex; justify-content: center; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: start; }
.hero__copy { display: flex; flex-direction: column; gap: 22px; }
.hero--centered .hero__copy { align-items: center; text-align: center; }
.hero--centered .h1 { font-size: 60px; }
.badges { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.badge { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.badge svg { flex: none; }

/* ---------- Cards ---------- */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.card--flat { background: var(--mist); border: 0; padding: 26px; }
.card--raised { border: 0; box-shadow: var(--shadow-md); }
.card__step { font-size: 14px; font-weight: 600; color: var(--lime); }
.card__meta { font-size: 13px; font-weight: 600; color: var(--cyan); }
.card p { font-size: 16px; line-height: 1.6; color: var(--ink-70); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split--sidebar { grid-template-columns: 0.8fr 1.2fr; gap: 72px; align-items: start; }
.split--faq { grid-template-columns: 0.7fr 1.3fr; gap: 64px; align-items: start; }
.sticky-col { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- State selector (front page) ---------- */
.state-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.state-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 36px;
  display: flex; flex-direction: column; gap: 20px; color: var(--midnight);
  box-shadow: var(--shadow-md); transition: box-shadow 140ms ease, transform 140ms ease;
}
.state-card:hover { box-shadow: 0 16px 38px rgba(4, 60, 73, 0.18); transform: translateY(-2px); color: var(--midnight); }
.state-card__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.state-card__name { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.state-card__sub { font-size: 15px; color: rgba(4, 60, 73, 0.62); }
.state-card__more { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: var(--cyan); }

.check-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; gap: 10px; font-size: 15px; line-height: 1.5; color: rgba(4, 60, 73, 0.8); }
.check-list svg { flex: none; margin-top: 2px; }
.section--dark .check-list li { font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, 0.9); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat__figure { font-size: 36px; font-weight: 600; letter-spacing: -0.02em; }
.stat__label { font-size: 15px; color: rgba(255, 255, 255, 0.72); }

/* ---------- Price panel (state templates) ---------- */
.price-panel { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.price-panel__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.price-panel__title { font-size: 16px; font-weight: 600; }
.price-panel__meta { font-size: 14px; color: rgba(4, 60, 73, 0.6); }
.price { display: flex; align-items: baseline; gap: 1px; }
.price__sym { font-size: 22px; font-weight: 600; }
.price__int { font-size: 48px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.price__dec { font-size: 22px; font-weight: 600; }
.price-lines { border-top: 1px solid var(--border); padding-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.price-line { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; color: rgba(4, 60, 73, 0.8); }
.price-line strong { font-weight: 600; color: var(--midnight); }
.price-line .included { font-weight: 600; color: var(--lime); }
.price-line .muted { font-weight: 600; color: rgba(4, 60, 73, 0.6); }
.panel-foot { border-top: 1px solid var(--border); padding-top: 16px; font-size: 14px; color: rgba(4, 60, 73, 0.7); }

/* ---------- Eligibility ---------- */
.elig-card { background: var(--caribbean); border-radius: var(--radius-lg); padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.elig-card--outline { background: transparent; border: 1px solid rgba(255, 255, 255, 0.22); }
.elig-card__label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--lime); }
.elig-card--outline .elig-card__label { color: var(--white); }
.x-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.x-list li { display: flex; gap: 12px; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, 0.82); }
.x-list svg { flex: none; margin-top: 2px; }
.notice { background: var(--caribbean); border-radius: var(--radius-lg); padding: 28px 32px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.notice p { font-size: 17px; line-height: 1.6; color: var(--white); flex: 1; min-width: 320px; }
.notice svg { flex: none; }
.definition { display: flex; flex-direction: column; gap: 4px; }
.definition dt, .definition__label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--cyan); }
.definition dd, .definition__value { margin: 0; font-size: 16px; line-height: 1.55; color: rgba(4, 60, 73, 0.82); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-top: 1px solid var(--border); padding: 24px 0; display: flex; flex-direction: column; gap: 8px; }
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item p { font-size: 16px; line-height: 1.6; color: var(--ink-70); }

/* ---------- Testimonials ---------- */
.quote { margin: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.section--muted .quote { border: 0; }
.quote blockquote { margin: 0; font-size: 19px; line-height: 1.55; color: var(--midnight); }
.quote figcaption { font-size: 14px; font-weight: 600; color: rgba(4, 60, 73, 0.6); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--midnight); color: var(--white); padding: 80px 32px; display: flex; justify-content: center; }
.cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-band h2 { font-size: 36px; }
.cta-band p { font-size: 17px; color: rgba(255, 255, 255, 0.72); }
.cta-band__actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: rgba(255, 255, 255, 0.72); padding: 64px 32px 40px; display: flex; justify-content: center; }
.site-footer__inner { display: flex; flex-direction: column; gap: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h2, .footer-heading { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--white); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.site-footer a { color: rgba(255, 255, 255, 0.72); font-size: 15px; }
.site-footer a:hover { color: var(--white); }
.site-footer p, .site-footer span { font-size: 15px; line-height: 1.6; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 24px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 13px; }

/* ---------- Editor / generic content ---------- */
.entry { padding: 72px 32px 96px; display: flex; justify-content: center; }
.entry__inner { max-width: 760px; width: 100%; display: flex; flex-direction: column; gap: 20px; }
.entry__title { font-size: 44px; }
.entry-content > * + * { margin-top: 20px; }
.entry-content h2 { font-size: 30px; margin-top: 40px; }
.entry-content h3 { font-size: 22px; margin-top: 32px; }
.entry-content p, .entry-content li { font-size: 17px; line-height: 1.7; color: var(--ink-70); }
.entry-content ul, .entry-content ol { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.entry-content img, .entry-content .wp-block-image img { border-radius: var(--radius-md); }
.entry-content blockquote { margin: 0; padding: 24px 28px; background: var(--mist); border-radius: var(--radius-md); font-size: 19px; }
.wp-caption-text, .wp-element-caption { font-size: 14px; color: var(--ink-55); }
.alignwide { width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero__grid, .split, .split--sidebar, .split--faq { grid-template-columns: 1fr; gap: 40px; }
  .sticky-col { position: static; }
  .grid-3, .grid-4, .stats { grid-template-columns: 1fr 1fr; }
  .h1 { font-size: 44px; }
  .hero--centered .h1 { font-size: 46px; }
  .h2 { font-size: 34px; }
}
@media (max-width: 860px) {
  .nav, .header-actions__link { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header.is-open .nav {
    display: block; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border); padding: 16px 32px 24px;
  }
  .site-header.is-open .nav ul { flex-direction: column; align-items: flex-start; gap: 18px; }
  .site-header__inner { min-height: 68px; }
  .topbar__note { display: none; }
  .topbar__inner { justify-content: center; }
  .section, .hero { padding: 56px 20px; }
  .cta-band { padding: 56px 20px; }
  .site-header, .topbar, .site-footer { padding-left: 20px; padding-right: 20px; }
  .state-grid, .grid-2, .grid-3, .grid-4, .stats, .footer-grid { grid-template-columns: 1fr; }
  .price-panel, .card, .state-card, .elig-card { padding: 24px; }
  .h1, .hero--centered .h1 { font-size: 36px; }
  .h2 { font-size: 30px; }
  .cta-band h2 { font-size: 28px; }
  .lede { font-size: 17px; }
  .btn { width: 100%; }
  .btn--sm, .state-card .btn, .cta-band .btn { width: auto; }
  .price__int { font-size: 40px; }
}
