/* King's Lynn Car Keys — site styles */
:root {
  --red: #c80000;
  --red-dark: #9e0000;
  --grey: #7a7a7a;
  --grey-dark: #3c3c3c;
  --page-bg: #5a5a5a;
  --text: #222;
  --white: #fff;
  --max: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--page-bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 30px rgba(0,0,0,.25);
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
}
.logo img { width: 300px; }
.header-contact { text-align: right; }
.tagline {
  margin: 0;
  color: var(--red);
  font-style: italic;
  font-weight: 700;
  font-size: 1.35rem;
}
.header-contact a {
  display: block;
  color: #111;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.5;
}
.header-contact a:hover { color: var(--red); }
.header-contact svg, .footer-contact svg {
  width: 1em; height: 1em; vertical-align: -0.1em; margin-right: 6px; fill: currentColor;
}
.header-contact .email svg { color: var(--red); }
.header-contact .whatsapp svg, .footer-contact .whatsapp svg { color: #25d366; }

/* ---------- Nav ---------- */
.main-nav { background: var(--red); position: relative; }
.main-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center;
}
.main-nav li + li { border-left: 1px solid rgba(255,255,255,.45); }
.main-nav a {
  display: block;
  padding: 10px 16px;
  white-space: nowrap;
  color: var(--white);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: .92rem;
}
.main-nav a:hover { background: var(--red-dark); }
.main-nav a.active { color: #111; }
.nav-toggle {
  display: none;
  width: 100%;
  background: none; border: 0;
  color: var(--white);
  font: 700 1rem "Open Sans", sans-serif;
  text-transform: uppercase;
  padding: 12px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero img { width: 100%; height: 280px; object-fit: cover; }
.welcome {
  background: var(--red);
  color: var(--white);
  text-align: center;
  padding: 16px 20px;
}
.welcome h1 {
  margin: 0;
  font-size: 2rem;
  text-transform: uppercase;
  line-height: 1.2;
}
.welcome p { margin: 2px 0 0; font-weight: 700; font-size: 1.2rem; color: #111; text-transform: uppercase; }
.welcome a { color: inherit; text-decoration: none; }

/* ---------- Service circles ---------- */
.circles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 26px 18px 10px;
}
.circle {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: var(--white);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  line-height: 1.2;
  background: var(--grey);
  transition: transform .2s;
}
.circle:nth-child(even) { background: var(--red); }
.circle:hover { transform: scale(1.04); }

/* ---------- Content ---------- */
.content { padding: 24px 28px 36px; }
.page-title {
  background: var(--red);
  color: var(--white);
  margin: 0;
  padding: 14px 28px;
  font-size: 1.8rem;
  text-transform: uppercase;
}
.content h2 { color: var(--red); margin: 1.4em 0 .4em; font-size: 1.4rem; }
.content h2:first-child { margin-top: 0; }
.lead { font-weight: 700; }
.red-strong { color: var(--red); font-weight: 700; }
.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
}
.steps { list-style: none; padding: 0; }
.steps li { margin-bottom: 10px; }
.steps b { color: var(--red); }
.ticks { padding-left: 0; list-style: none; }
.ticks li { padding-left: 26px; position: relative; margin-bottom: 6px; }
.ticks li::before {
  content: "\2713"; position: absolute; left: 0; color: var(--red); font-weight: 700;
}
.float-img { float: right; width: 40%; margin: 0 0 16px 24px; border-radius: 4px; }
.clear { clear: both; }

/* Manufacturers */
.makes {
  columns: 3;
  column-gap: 24px;
  padding: 0;
  list-style: none;
}
.makes li {
  break-inside: avoid;
  padding: 6px 0 6px 22px;
  border-bottom: 1px solid #eee;
  position: relative;
}
.makes li::before {
  content: ""; position: absolute; left: 0; top: 14px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--red);
}
.logos { margin: 24px auto 0; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.gallery-status { grid-column: 1 / -1; color: #555; }
.gallery button {
  padding: 0; border: 0; background: #eee; cursor: zoom-in;
  aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px;
}
.gallery button img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery button:hover img, .gallery button:focus-visible img { transform: scale(1.05); }
.gallery button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.lightbox button {
  position: absolute; background: none; border: 0; color: #fff;
  font-size: 3rem; line-height: 1; cursor: pointer; padding: 10px 16px;
}
.lightbox button:hover { color: #ff6b6b; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; color: #ccc; margin: 0; }
@media (max-width: 640px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* Car manufacturer logo tiles */
.make-grid {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 12px;
}
.make-grid li {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  min-height: 112px;
  padding: 14px 8px 10px;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  background: var(--white);
  text-align: center;
  font-weight: 600;
  font-size: .88rem;
  line-height: 1.2;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.make-grid li:hover { border-color: var(--red); box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-2px); }
.make-grid img { width: 48px; height: 48px; opacity: .85; }
.make-grid .mono {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--grey-dark);
  color: var(--grey-dark);
  font-weight: 700; font-size: .85rem; letter-spacing: .5px;
}
.makes-more { text-align: center; margin-top: 22px; }
.logo-credit { text-align: center; color: #888; font-size: .72rem; }
.logo-credit a { color: #888; }
@media (max-width: 640px) {
  .make-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .make-grid li { min-height: 96px; font-size: .78rem; }
  .make-grid img, .make-grid .mono { width: 38px; height: 38px; }
}

/* Testing login page */
.login-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--white);
  border-top: 5px solid var(--red);
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
  padding: 28px 26px 22px;
  text-align: center;
}
.login-card img { margin: 0 auto 10px; width: 240px; }
.login-card h1 { margin: 6px 0 4px; font-size: 1.4rem; color: var(--red); text-transform: uppercase; }
.login-card form { text-align: left; margin-top: 16px; }
.login-card label { font-weight: 600; font-size: .95rem; }
.login-card input[type="password"] {
  width: 100%; margin: 4px 0 12px; padding: 11px 12px;
  font: inherit; border: 1px solid #bbb; border-radius: 3px;
}
.login-card input[type="password"]:focus { outline: 2px solid var(--red); border-color: var(--red); }
.login-card .btn { width: 100%; }
.login-error { color: var(--red); font-weight: 600; margin: -4px 0 12px; }

/* Home page reviews banner */
.home-reviews {
  background: var(--red);
  color: var(--white);
  padding: 30px 28px 32px;
  text-align: center;
}
.home-reviews h2 { margin: 0; font-size: 1.6rem; text-transform: uppercase; }
.home-reviews-rating { margin: 4px 0 20px; font-weight: 600; }
.home-reviews-rating .stars { color: #ffd34d; }
.home-reviews-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  text-align: left;
}
.home-reviews figure {
  margin: 0;
  background: var(--white);
  color: var(--text);
  border-radius: 6px;
  padding: 18px 20px;
  display: flex; flex-direction: column;
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.home-reviews blockquote { margin: 8px 0 12px; flex: 1; font-size: .95rem; }
.home-reviews figcaption { font-weight: 700; color: var(--red); }
.home-reviews-more { margin: 22px 0 0; }
.home-reviews-more .btn { background: var(--white); color: var(--red); }
.home-reviews-more .btn:hover { background: var(--grey-dark); color: var(--white); }
@media (max-width: 820px) { .home-reviews-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .home-reviews { padding: 24px 16px 26px; } }

/* SERMI accreditation */
.trust {
  display: flex; align-items: center; gap: 22px;
  padding: 20px 28px;
  border-top: 1px solid #e3e3e3;
}
.trust img { width: 150px; height: auto; border-radius: 4px; flex-shrink: 0; }
.trust h2 { margin: 0 0 4px; color: var(--red); font-size: 1.3rem; }
.trust p { margin: 0; }
.faq .faq-badge { float: right; margin: 0 16px 8px 16px; }
.faq .faq-badge img { width: 120px; height: auto; border-radius: 4px; }
.faq details[open]::after { content: ""; display: block; clear: both; }
@media (max-width: 640px) {
  .trust { flex-direction: column; text-align: center; padding: 20px 16px; }
  .faq .faq-badge { float: none; display: block; margin: 0 16px 10px; }
}

/* Areas we cover */
.areas { padding: 26px 28px 30px; background: #f6f6f6; border-top: 4px solid var(--red); }
.areas h2 { margin: 0 0 6px; color: var(--red); font-size: 1.5rem; }
.areas-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 16px 24px; margin: 14px 0; }
.areas h3 { margin: 0 0 6px; font-size: 1rem; text-transform: uppercase; color: var(--grey-dark); }
.areas ul { list-style: none; margin: 0; padding: 0; }
.areas-grid > div:first-child ul { columns: 2; column-gap: 20px; }
.areas li { padding: 2px 0 2px 16px; position: relative; }
.areas li::before {
  content: ""; position: absolute; left: 0; top: .7em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--red);
}
.areas-villages { color: #444; }
@media (max-width: 820px) { .areas-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .areas { padding: 22px 16px 26px; } }

/* FAQ */
.faq details {
  border: 1px solid #e3e3e3;
  border-left: 4px solid var(--red);
  border-radius: 3px;
  margin-bottom: 10px;
  background: var(--white);
}
.faq summary {
  cursor: pointer;
  padding: 12px 44px 12px 16px;
  font-weight: 700;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%);
  color: var(--red); font-size: 1.5rem; font-weight: 700; line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { color: var(--red); }
.faq details > :not(summary) { margin: 0 16px 12px; }
.faq summary:hover { background: #fafafa; }

/* Testimonials */
.rating-summary {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: #f6f6f6; border-left: 5px solid var(--red);
  padding: 14px 18px; margin-bottom: 24px;
}
.review-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.live-reviews { margin-bottom: 28px; }
.favourites-title { margin-top: 8px; }
.more-reviews { text-align: center; margin-top: 24px; font-weight: 600; }
.rating-summary .score { font-size: 2.2rem; font-weight: 700; line-height: 1; }
.stars { color: #f5a800; letter-spacing: 2px; }
.reviews {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.review {
  border: 1px solid #e3e3e3;
  border-top: 4px solid var(--red);
  padding: 16px 18px;
  border-radius: 4px;
  margin: 0;
}
.review blockquote { margin: 8px 0 0; }
.review figcaption { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }

/* Contact */
.contact-details p { margin: 4px 0; font-size: 1.1rem; }
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-top: 20px;
}
.contact-form label { display: block; font-weight: 600; font-size: .95rem; }
.contact-form input, .contact-form textarea {
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  font: inherit;
  border: 1px solid #bbb;
  border-radius: 3px;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--red); border-color: var(--red);
}
.contact-form .full { grid-column: 1 / -1; }
.btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  border: 0;
  padding: 12px 28px;
  font: 700 1rem "Open Sans", sans-serif;
  text-transform: uppercase;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--red-dark); }
.small { font-size: .85rem; color: #555; }

/* Form sending */
.hp { position: absolute; left: -9999px; }
.form-done {
  margin-top: 20px;
  padding: 18px 20px;
  border-left: 5px solid var(--red);
  background: #f6f6f6;
}
.form-done h2 { margin-top: 0; }
#form-error { margin-top: 16px; }

/* Reg lookup */
.reg-row { display: flex; gap: 10px; margin-top: 4px; }
.contact-form .reg-row .reg-input {
  margin-top: 0;
  max-width: 240px;
  background: #ffd500;
  border: 2px solid #111;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 2px;
  text-align: center;
  text-transform: uppercase;
}
.contact-form .reg-row .pc-input {
  margin-top: 0;
  max-width: 200px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
}
.address-box {
  border: 1px solid #ddd;
  border-left: 5px solid var(--red);
  border-radius: 3px;
  padding: 10px 16px 16px;
  margin: 0;
}
.address-box legend { font-weight: 700; padding: 0 6px; }
.address-box .small { margin: 0 0 10px; }
.address-box .credit { margin: 10px 0 0; font-size: .72rem; color: #888; }
.address-box .credit a { color: #888; }
.address-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.address-box.filled { background: #fafafa; }
@media (max-width: 640px) { .address-grid { grid-template-columns: 1fr; } }
.btn-outline { background: var(--white); color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.btn-outline:hover { background: var(--red); color: var(--white); }
.btn-dark { background: var(--grey-dark); }
.btn-dark:hover { background: #111; }
.btn[disabled] { opacity: .6; cursor: wait; }
.vehicle-result {
  margin-top: 10px;
  padding: 10px 14px;
  border-left: 5px solid var(--red);
  background: #f6f6f6;
}
.vehicle-result.error { border-color: #888; color: #555; }
@media (max-width: 640px) {
  .reg-row { flex-direction: column; }
  .contact-form .reg-row .reg-input,
  .contact-form .reg-row .pc-input { max-width: none; }
}

/* Call-to-action strip */
.cta {
  background: var(--grey);
  color: var(--white);
  text-align: center;
  padding: 18px;
  font-weight: 700;
  font-size: 1.25rem;
}
.cta a { color: var(--white); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--grey-dark);
  color: var(--white);
  text-align: center;
  padding: 22px 16px 26px;
}
.site-footer .tagline { color: var(--white); }
.footer-contact a {
  display: block;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.3rem;
}
.footer-contact a:hover { text-decoration: underline; }
.site-footer .hours { margin: 10px 0 0; font-weight: 600; }
.copyright { margin: 14px 0 0; font-size: .8rem; color: #bbb; }
.copyright a { color: #ddd; }
.policy ul { padding-left: 22px; }
.policy li { margin-bottom: 6px; }


/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .site-header { justify-content: center; }
  .header-contact { text-align: center; }
  .two-col { grid-template-columns: 1fr; }
  .circles { grid-template-columns: repeat(2, 1fr); }
  .makes { columns: 2; }
  .reviews { grid-template-columns: 1fr; }
}
@media (min-width: 901px) and (max-width: 1080px) {
  .main-nav a { padding: 10px 10px; font-size: .8rem; }
}
/* Phone-style "Menu" button: below 900px the 8 menu items no longer fit on one line */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav ul { display: none; flex-direction: column; }
  .main-nav.open ul { display: flex; }
  .main-nav li + li { border-left: 0; border-top: 1px solid rgba(255,255,255,.3); }
  .main-nav a { text-align: center; }
}
@media (max-width: 640px) {
  .logo img { width: 240px; }
  .tagline { font-size: 1.1rem; }
  .header-contact a, .footer-contact a { font-size: 1.05rem; }
  .welcome h1 { font-size: 1.4rem; }
  .welcome p { font-size: 1rem; }
  .hero img { height: 180px; }
  .content { padding: 20px 16px 30px; }
  .page-title { padding: 12px 16px; font-size: 1.4rem; }
  .float-img { float: none; width: 100%; margin: 0 0 16px; }
  .makes { columns: 1; }
  .contact-form { grid-template-columns: 1fr; }
}
