/* =========================================================================
   Ripchord Driving School (uofiripchords.com) - clean rebuild
   Tokens from brand.json: the homepage Elementor design overrides the stock
   Elementor kit palette with navy #273171 (primary brand) + red #ee3131 /
   #cc3366 (accent), on #1a1a1a ink; Lato body, Dosis headings, 1140px container.
   Includes a lightweight compatibility layer for the scraped Elementor +
   ElementsKit widget classes so the original body markup lays out cleanly
   without shipping the full plugin CSS.
   ========================================================================= */

:root {
  --navy: #273171;
  --navy-dark: #1d2559;
  --red: #ee3131;
  --red-dark: #cc3366;
  --ink: #1a1a1a;
  --ink-soft: rgba(26, 26, 26, 0.72);
  --ink-faint: rgba(26, 26, 26, 0.14);
  --white: #ffffff;
  --paper: #f5f5f5;
  --line: #e6e8f0;
  --grey: #555555;

  --font-head: "Dosis", "Lato", system-ui, sans-serif;
  --font-body: "Lato", system-ui, sans-serif;
  --font-alt: "Roboto Slab", Georgia, serif;

  --container: 1140px;
  --gutter: 20px;
  --radius: 10px;
  --shadow: 0 8px 30px rgba(39, 49, 113, 0.10);
  --shadow-sm: 0 2px 10px rgba(39, 49, 113, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: 1.2em; }
h3 { font-size: 1.35rem; margin-top: 1em; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

img, picture, video, svg { max-width: 100%; height: auto; }
img { display: block; border-radius: var(--radius); }

ul, ol { padding-left: 1.3em; margin: 0 0 1.1em; }
li { margin-bottom: 0.4em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  line-height: 1;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  background: var(--red);
  color: var(--white);
  border-radius: 7px;
  font-size: 1.2rem;
}
.brand-word { font-size: 1.35rem; letter-spacing: 0.01em; }
.brand-sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.65);
  align-self: center;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 0.5rem 0.9rem;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--white); background: var(--red); }

.nav-toggle, .nav-toggle-btn { display: none; }

/* -------------------------------------------------------------------- hero */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-bottom: 4px solid var(--red);
}
.page-hero h1 { color: var(--white); margin: 0; }
.page--home .page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #33408f 100%);
}

/* -------------------------------------------------------------- page body */
.page-body { padding: clamp(2rem, 5vw, 3.5rem) var(--gutter); }
.page-body img { box-shadow: var(--shadow-sm); }
.page-body .lead { font-size: 1.2rem; line-height: 1.6; color: var(--ink-soft); }

/* ======================================================= Elementor compat
   Minimal, modern reinterpretation of the Elementor + ElementsKit utility
   classes present in the scraped body_html. Not a full plugin port - just
   enough for clean, faithful layout. */

/* Sections + containers */
.elementor-section { position: relative; }
.elementor-container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: flex-start;
}
.elementor-section.elementor-section-boxed > .elementor-container { max-width: var(--container); }
.elementor-inner-section .elementor-container { gap: clamp(1rem, 2.5vw, 1.75rem); }
.elementor-widget-wrap { width: 100%; }

/* Columns: Elementor uses percentage col classes inside a flex row */
.elementor-column {
  flex: 1 1 100%;
  min-width: 0;
  display: flex;
}
.elementor-column > .elementor-widget-wrap { width: 100%; }
.elementor-col-100 { flex-basis: 100%; }
.elementor-col-50  { flex: 1 1 min(100%, calc(50% - 1.5rem)); }
.elementor-col-33  { flex: 1 1 min(100%, calc(33.333% - 1.7rem)); }
.elementor-col-25  { flex: 1 1 min(100%, calc(25% - 1.9rem)); }
.elementor-col-66  { flex: 1 1 min(100%, calc(66.666% - 1.7rem)); }
.elementor-col-20  { flex: 1 1 min(100%, calc(20% - 2rem)); }

/* Widgets: vertical rhythm */
.elementor-widget { margin-bottom: 1.4rem; }
.elementor-widget:last-child { margin-bottom: 0; }
.elementor-widget-container { }
.elementor-widget__width-auto { flex: 0 1 auto; }

.elementor-section:not(:last-child) { margin-bottom: clamp(1.5rem, 4vw, 2.75rem); }

/* Headings (ElementsKit heading widget) */
.ekit-heading { margin-bottom: 1rem; }
.elementskit-section-subtitle,
.ekit-heading--subtitle {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.4rem;
}
.elementskit-section-title,
.ekit-heading--title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  color: var(--ink);
  margin: 0 0 0.5rem;
  line-height: 1.15;
}
.ekit-heading__description { color: var(--ink-soft); }
.ekit-heading__description p:last-child { margin-bottom: 0; }
.text_left, .text-left { text-align: left; }
.text_center, .text-center { text-align: center; }
.text_right, .text-right { text-align: right; }

/* Text editor widget */
.elementor-widget-text-editor { color: var(--ink); }
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }

/* Buttons (ElementsKit button widget) */
.ekit-btn-wraper { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.5rem 0; }
.elementskit-btn,
.ekit-btn-wraper a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  background: var(--red);
  color: var(--white);
  border: 2px solid transparent;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.elementskit-btn:hover,
.ekit-btn-wraper a:hover { background: var(--red-dark); color: var(--white); text-decoration: none; transform: translateY(-1px); }

/* Icon / info boxes (ElementsKit) */
.elementskit-infobox,
.elementskit-info-image-box,
.elementskit-box-content {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem;
  height: 100%;
}
.elementskit-box-header,
.elementskit-info-box-icon {
  color: var(--navy);
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.elementskit-info-box-icon img { width: 56px; height: auto; margin: 0; }
.elementskit-info-box-title,
.elementskit-box-header .elementskit-info-box-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.elementskit-box-body p:last-child { margin-bottom: 0; }

/* Image box (ElementsKit) */
.ekit-image-box,
.elementskit-image-box { text-align: center; }
.ekit-image-box-img img,
.elementskit-image-box img { margin: 0 auto 1rem; }
.ekit-image-box-body-inner { padding: 0.5rem 0; }

/* Funfact counters (ElementsKit) */
.elementskit-funfact {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--paper);
  border-radius: var(--radius);
  height: 100%;
}
.elementskit-funfact.text-left { text-align: left; }
.number-percentage-wraper {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3rem);
  color: var(--navy);
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}
.number-percentage-wraper .super { font-size: 0.55em; color: var(--red); margin-left: 0.1em; }
.funfact-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0.5rem 0 0;
}

/* Dividers */
.elementor-widget-divider { margin-block: 1rem; }
.elementor-divider,
.elementor-divider-separator,
.elementskit-border-divider {
  border: 0;
  border-top: 2px solid var(--line);
  width: 100%;
  height: 0;
  display: block;
}

/* Icon lists (Elementor) */
.elementor-icon-list-items { list-style: none; padding: 0; margin: 0; }
.elementor-icon-list-item { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.6rem; }
.elementor-icon-list-icon { color: var(--red); }
.elementor-icon-list-text { color: var(--ink); }

/* TablePress + generic tables */
.tablepress,
.page-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.98rem;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius);
  overflow: hidden;
}
.tablepress th,
.page-body th {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-head);
  text-align: left;
  padding: 0.75rem 1rem;
}
.tablepress td,
.page-body td {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--line);
}
.tablepress tbody tr:nth-child(even) td { background: var(--paper); }

/* Image widget */
.elementor-widget-image img { margin-inline: auto; }

/* Spacing helpers that appear in the markup */
.elementor-element-populated { height: 100%; }

/* ------------------------------------------------------------------ footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-block: 3rem;
}
.site-footer h2 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}
.footer-brand-mark { margin-bottom: 1rem; }
.footer-brand p { color: rgba(255, 255, 255, 0.65); max-width: 42ch; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.55rem; }
.footer-links a, .footer-contact a { color: rgba(255, 255, 255, 0.78); }
.footer-links a:hover, .footer-contact a:hover { color: var(--white); }
.footer-base {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}
.footer-base p { margin: 0; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }

  .nav-toggle-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    border-radius: 6px;
  }
  .nav-toggle-btn span {
    display: block;
    height: 2px;
    width: 24px;
    background: var(--white);
    transition: transform 0.2s, opacity 0.2s;
  }
  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .site-nav a { padding: 0.85rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav-toggle:checked ~ .site-nav { max-height: 420px; }
}
