/*
Theme Name: UK Driver Help
Theme URI: https://ukdriverhelp.co.uk
Author: UK Driver Help
Description: A fast, accessible editorial theme for UK driving guidance and calculators.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: ukdriverhelp
*/

:root {
  --ink: #12263a;
  --ink-soft: #40566d;
  --navy: #092f4f;
  --blue: #075f82;
  --teal: #008c86;
  --teal-dark: #006c68;
  --yellow: #ffd34e;
  --sky: #e9f7fa;
  --paper: #ffffff;
  --mist: #f4f8fa;
  --line: #d8e4e9;
  --danger: #b42318;
  --success: #117a56;
  --shadow: 0 16px 40px rgba(9, 47, 79, .10);
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; }

.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 9999;
  background: var(--yellow); color: var(--ink); padding: .7rem 1rem; font-weight: 800;
}
.skip-link:focus { left: 12px; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-inner { max-width: var(--max); margin: auto; min-height: 76px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); text-decoration: none; font-weight: 900; letter-spacing: -.02em; font-size: 1.1rem; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: white; background: var(--teal); font-size: .72rem; letter-spacing: .04em; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 5px; list-style: none; padding: 0; margin: 0; }
.primary-nav a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .9rem; border-radius: 10px; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { background: var(--sky); color: var(--teal-dark); }
.menu-toggle { display: none; margin-left: auto; border: 1px solid var(--line); background: white; color: var(--navy); padding: 8px 11px; border-radius: 10px; font-weight: 800; }

.hero { position: relative; overflow: hidden; color: white; background: var(--navy); }
.hero::after { content: ""; position: absolute; inset: 0; opacity: .13; background: repeating-linear-gradient(112deg, transparent 0 86px, rgba(255,255,255,.7) 86px 90px, transparent 90px 175px); transform: translateX(52%); }
.hero-inner { position: relative; z-index: 1; max-width: var(--max); min-height: 505px; margin: auto; padding: 78px 24px 70px; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 60px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; color: var(--yellow); font-size: .82rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 4px; border-radius: 4px; background: var(--yellow); }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(2.7rem, 6vw, 5.3rem); line-height: .98; letter-spacing: -.055em; }
.hero-copy { max-width: 650px; margin: 24px 0 30px; color: #dcecf5; font-size: 1.13rem; }
.hero-search { display: flex; max-width: 680px; padding: 7px; border-radius: 15px; background: white; box-shadow: var(--shadow); }
.hero-search input { min-width: 0; flex: 1; border: 0; outline: 0; padding: 10px 14px; color: var(--ink); }
.hero-search button { border: 0; border-radius: 10px; background: var(--yellow); color: var(--ink); padding: 12px 18px; font-weight: 900; cursor: pointer; }
.trust-panel { align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; }
.trust-card { padding: 25px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); background: rgba(255,255,255,.09); box-shadow: 0 18px 50px rgba(0,0,0,.16); }
.trust-card strong { display: block; color: var(--yellow); font-size: 1.1rem; margin-bottom: 5px; }
.trust-card p { color: #dcecf5; margin: 0 0 18px; }
.trust-card p:last-child { margin-bottom: 0; }

.section { padding: 78px 24px; }
.section.alt { background: var(--mist); }
.wrap { max-width: var(--max); margin: auto; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 30px; }
.section-head h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -.045em; }
.section-head p { max-width: 560px; margin: 0; color: var(--ink-soft); }
.text-link { font-weight: 850; text-decoration-thickness: 2px; }

.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.topic-card { position: relative; min-height: 220px; padding: 24px; color: var(--ink); text-decoration: none; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(9,47,79,.05); transition: transform .2s, box-shadow .2s, border-color .2s; }
.topic-card:hover { color: var(--ink); transform: translateY(-4px); border-color: #9ccfd1; box-shadow: var(--shadow); }
.topic-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 38px; border-radius: 14px; background: var(--sky); color: var(--teal-dark); font-weight: 950; font-size: .82rem; }
.topic-card h3 { margin: 0 0 7px; font-size: 1.18rem; line-height: 1.25; }
.topic-card p { margin: 0; color: var(--ink-soft); font-size: .92rem; line-height: 1.5; }
.topic-card::after { content: "\2192"; position: absolute; right: 22px; top: 25px; font-size: 1.4rem; color: var(--teal); }

.answer-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; }
.answer-feature { padding: 34px; border-radius: var(--radius); color: white; background: var(--teal-dark); }
.answer-feature .label { color: var(--yellow); font-weight: 900; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; }
.answer-feature h3 { margin: 12px 0; font-size: 2rem; line-height: 1.15; }
.answer-feature p { color: #e0f4f3; }
.answer-feature a { color: white; font-weight: 900; }
.answer-list { display: grid; gap: 12px; }
.answer-list a { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 20px; color: var(--ink); text-decoration: none; font-weight: 800; border: 1px solid var(--line); border-radius: 13px; background: white; }
.answer-list a:hover { border-color: var(--teal); color: var(--teal-dark); }

.calculator-shell { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; padding: 38px; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: var(--shadow); }
.calculator-intro h2 { margin: 0 0 12px; font-size: 2.4rem; line-height: 1.08; letter-spacing: -.04em; }
.calculator-intro p { color: var(--ink-soft); }
.udh-calculator { display: grid; gap: 16px; }
.udh-field label { display: block; margin-bottom: 6px; font-weight: 800; font-size: .9rem; }
.udh-field .input-unit { display: flex; align-items: center; overflow: hidden; border: 1px solid #b9cbd4; border-radius: 11px; background: white; }
.udh-field input, .udh-field select { width: 100%; min-height: 48px; border: 0; outline: 0; padding: 10px 12px; color: var(--ink); background: white; }
.udh-field .unit { padding: 0 12px; color: var(--ink-soft); font-size: .85rem; font-weight: 750; }
.udh-check { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.udh-button { border: 0; border-radius: 11px; padding: 13px 18px; color: white; background: var(--teal); font-weight: 900; cursor: pointer; }
.udh-button:hover { background: var(--teal-dark); }
.udh-result { padding: 19px; border-radius: 13px; background: var(--sky); border-left: 5px solid var(--teal); }
.udh-result strong { display: block; font-size: 1.7rem; line-height: 1.2; color: var(--navy); }
.udh-result span { color: var(--ink-soft); font-size: .9rem; }

.credibility { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.credibility article { padding: 24px; border-top: 4px solid var(--yellow); background: var(--navy); color: white; border-radius: 0 0 var(--radius) var(--radius); }
.credibility h3 { margin: 0 0 8px; }
.credibility p { margin: 0; color: #dcecf5; font-size: .92rem; }

.content-layout { max-width: var(--max); margin: auto; padding: 58px 24px 90px; display: grid; grid-template-columns: minmax(0, 760px) 280px; gap: 62px; }
.article-header { margin-bottom: 32px; }
.article-header h1 { margin: 8px 0 14px; font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.03; letter-spacing: -.05em; }
.article-meta { color: var(--ink-soft); font-size: .87rem; }
.entry-content h2 { margin-top: 2.2em; font-size: 1.75rem; line-height: 1.2; letter-spacing: -.025em; }
.entry-content h3 { margin-top: 1.8em; font-size: 1.3rem; }
.entry-content p, .entry-content li { max-width: 74ch; }
.entry-content .answer-box { padding: 20px 22px; margin: 24px 0; border-left: 5px solid var(--teal); border-radius: 10px; background: var(--sky); }
.entry-content .warning-box { padding: 20px 22px; margin: 24px 0; border-left: 5px solid var(--yellow); border-radius: 10px; background: #fff9df; }
.entry-content blockquote { margin: 28px 0; padding: 1px 0 1px 22px; border-left: 4px solid var(--teal); color: var(--ink-soft); }
.side-card { position: sticky; top: 105px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--mist); }
.side-card h2 { margin: 0 0 10px; font-size: 1.1rem; }
.side-card p { margin: 0; color: var(--ink-soft); font-size: .88rem; }

.site-footer { color: #dcecf5; background: #061f35; }
.footer-inner { max-width: var(--max); margin: auto; padding: 52px 24px 28px; }
.footer-grid { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 42px; }
.footer-grid h2, .footer-grid h3 { color: white; margin-top: 0; }
.footer-grid p { max-width: 410px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 8px 0; }
.footer-grid a { color: #dcecf5; text-decoration: none; }
.footer-grid a:hover { color: var(--yellow); }
.footer-bottom { margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); color: #9fb8c9; font-size: .8rem; }

@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .primary-nav { display: none; position: absolute; left: 0; right: 0; top: 76px; padding: 12px 20px 20px; background: white; border-bottom: 1px solid var(--line); }
  .primary-nav.open { display: block; }
  .primary-nav ul { display: block; }
  .primary-nav a { padding: 12px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; min-height: auto; }
  .trust-panel { display: none; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .calculator-shell, .answer-grid, .content-layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .header-inner { padding: 0 16px; }
  .brand { font-size: 1rem; }
  .hero-inner { padding: 58px 18px 52px; }
  .hero-search { display: grid; }
  .section { padding: 58px 18px; }
  .section-head { display: block; }
  .section-head p { margin-top: 12px; }
  .topic-grid, .credibility, .footer-grid { grid-template-columns: 1fr; }
  .topic-card { min-height: 185px; }
  .calculator-shell { padding: 24px 18px; }
  .content-layout { padding: 42px 18px 70px; }
}

