/* =====================================================
   DRIVING SCHOOL TEMPLATE
   To re-use: change the colour variables below,
   then swap logo, text and images.
   ===================================================== */

:root {
  /* Colours taken from the Q&A Driving Academy logo */
  --primary-color: #22235A;   /* deep navy (logo background) */
  --primary-dark:  #181945;   /* darker navy for footer / hover */
  --accent-color:  #D9461B;   /* logo orange, darkened slightly so white text is readable */
  --accent-bright: #F2562B;   /* logo orange as shown, used on dark backgrounds */
  --accent-hover:  #BC3A14;
  --dark-color:    #1B1C33;   /* body text */
  --muted-color:   #55566E;   /* secondary text */
  --light-color:   #FFFFFF;
  --light-alt:     #F3F4F8;   /* alternate section background */
  --border-color:  #DDDFE8;

  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 4px;
  --header-h: 68px;
}

/* ---------- Base ---------- */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--dark-color);
  background: var(--light-color);
}
img { max-width: 100%; display: block; }
a { color: var(--primary-color); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; color: var(--primary-color); }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section-alt { background: var(--light-alt); }
.section-head { max-width: 640px; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted-color); }

:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 3px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--light-color); padding: .6rem 1rem; z-index: 200; }
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .85rem 1.6rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-small { padding: .5rem 1.1rem; font-size: .95rem; }
.btn-accent { background: var(--accent-color); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-primary { background: var(--primary-color); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--primary-color); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--primary-color);
  border-bottom: 3px solid var(--accent-color);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand img { height: 100px; width: 300px; object-fit: cover; border-radius: 2px; }

.site-nav ul { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a:not(.btn) { color: #fff; text-decoration: none; font-weight: 500; padding: .4rem 0; border-bottom: 2px solid transparent; }
.site-nav a:not(.btn):hover { border-bottom-color: var(--accent-bright); }

.nav-toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: #fff; margin: 5px 0; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(80vh, 680px);
  min-height: min(80svh, 680px);
  display: flex; align-items: center;
  background: var(--primary-dark);
  color: #fff; overflow: hidden;
}
.hero-slides, .slide, .hero-overlay { position: absolute; inset: 0; }
.slide { background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s ease; }
.slide.active { opacity: 1; }
.hero-overlay { background: rgba(24, 25, 69, .72); }
.hero-content { position: relative; padding-top: 3rem; padding-bottom: 4.5rem; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero-name { font-weight: 600; font-size: 1.1rem; color: var(--accent-bright); margin-bottom: .75rem; }
.hero-text { max-width: 540px; font-size: 1.15rem; margin-bottom: 1.75rem; }
.hero-dots { position: absolute; bottom: 1.25rem; left: 0; right: 0; display: flex; justify-content: center; gap: .6rem; }
.hero-dots button { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer; }
.hero-dots button[aria-current="true"] { background: #fff; }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--border-color); border-radius: var(--radius); }
.check-list li { position: relative; padding-left: 1.6rem; margin-bottom: .4rem; font-weight: 600; }
.check-list li::before { content: ""; position: absolute; left: .15rem; top: .45em; width: .55rem; height: .9rem; border: solid var(--accent-color); border-width: 0 3px 3px 0; transform: rotate(45deg) scale(.8); transform-origin: center; }

/* ---------- Services ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card { background: #fff; border: 1px solid var(--border-color); border-top: 4px solid var(--accent-color); border-radius: var(--radius); padding: 1.6rem; }
.card p { color: var(--muted-color); margin-bottom: 0; }
.card-cta { background: var(--primary-color); border-color: var(--primary-color); border-top-color: var(--accent-bright); }
.card-cta h3 { color: #fff; }
.card-cta p { color: #E4E5F2; margin-bottom: 1.25rem; }

/* ---------- Why choose us ---------- */
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.benefit { border-left: 4px solid var(--accent-color); padding-left: 1rem; }
.benefit p { color: var(--muted-color); margin: 0; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  background: var(--border-color); border-radius: var(--radius);
  cursor: zoom-in; transition: opacity .2s;
}
.gallery img:hover { opacity: .88; }

/* ---------- Call to action ---------- */
.cta { background: var(--primary-color); color: #fff; text-align: center; padding: clamp(3rem, 7vw, 4.5rem) 0; border-top: 4px solid var(--accent-color); }
.cta h2 { color: #fff; }
.cta p { max-width: 520px; margin: 0 auto 1.5rem; color: #E4E5F2; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.contact-item { padding: 1.25rem; border: 1px solid var(--border-color); border-left: 4px solid var(--accent-color); border-radius: var(--radius); }
.contact-item h3 { margin-bottom: .3rem; }
.contact-item p { margin: 0; overflow-wrap: anywhere; }
.contact-item a { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: #D3D5E6; padding-top: 3rem; font-size: .975rem; }
.site-footer h3 { color: #fff; font-size: 1.05rem; }
.site-footer a { color: #D3D5E6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer li { margin-bottom: .35rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 2rem; padding-bottom: 2rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.1rem; padding-bottom: 1.1rem; font-size: .9rem; }
.footer-bottom p { margin: 0; }


/* ---------- Dark outline button (on light backgrounds) ---------- */
.btn-outline-dark { border-color: var(--primary-color); color: var(--primary-color); }
.btn-outline-dark:hover { background: var(--primary-color); color: #fff; }
.contact-buttons { margin-bottom: 2rem; }

/* ---------- Map ---------- */
.map-wrap { border: 1px solid var(--border-color); border-radius: var(--radius); overflow: hidden; background: var(--light-alt); }
.map-wrap iframe { display: block; width: 100%; height: 400px; border: 0; }

/* ---------- Google reviews ---------- */
.reviews-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 2rem;
  background: #fff; border: 1px solid var(--border-color); border-left: 4px solid var(--accent-color);
  border-radius: var(--radius); padding: 1.5rem;
}
.rating-number { font-size: 3rem; font-weight: 700; line-height: 1; color: var(--primary-color); }
.rating-meta { flex: 1 1 200px; }
.rating-meta p { margin: 0; }
.rating-count { font-weight: 600; }
.g-attr { font-size: .9rem; color: var(--muted-color); }
.google-word { font-weight: 700; }
.google-word span:nth-child(1), .google-word span:nth-child(4) { color: #4285F4; }
.google-word span:nth-child(2), .google-word span:nth-child(6) { color: #EA4335; }
.google-word span:nth-child(3) { color: #FBBC05; }
.google-word span:nth-child(5) { color: #34A853; }

.stars { position: relative; display: inline-block; font-size: 1.5rem; line-height: 1.2; letter-spacing: 2px; color: #CFD1DC; white-space: nowrap; }
.stars::before { content: "\2605\2605\2605\2605\2605"; }
.stars-fill { position: absolute; left: 0; top: 0; overflow: hidden; color: #F5A300; width: 0; }

.review-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 1.5rem; }
.review-card { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.4rem; display: flex; flex-direction: column; }
.review-card .stars { font-size: 1.15rem; margin-bottom: .5rem; }
.review-card .review-text { color: var(--dark-color); margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.reviewer { margin-top: auto; display: flex; align-items: center; gap: .7rem; font-size: .95rem; }
.reviewer img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--border-color); }
.reviewer strong, .reviewer span { display: block; line-height: 1.3; }
.reviewer span { color: var(--muted-color); font-size: .85rem; }
.reviewer a { text-decoration: none; }


.wa-float {
  position: fixed; z-index: 90;
  right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  transition: background-color .2s;
}
.wa-float:hover { background: #1DA851; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(10, 10, 30, .92); display: flex; align-items: center; justify-content: center; padding: 3.5rem 1rem; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; padding: .5rem 1rem; }
.lb-close { top: .5rem; right: .5rem; }
.lb-prev { left: 0; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0; top: 50%; transform: translateY(-50%); }

/* ---------- Subtle reveal (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

/* ---------- Mobile navigation + layout ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--primary-color);
    border-bottom: 3px solid var(--accent-color);
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1.25rem; }
  .site-nav li { border-bottom: 1px solid rgba(255,255,255,.12); }
  .site-nav li:last-child { border: 0; padding-top: 1rem; }
  .site-nav a:not(.btn) { display: block; padding: .85rem 0; border: 0; }
  .site-nav .btn { display: block; padding: .8rem; }

  .split { grid-template-columns: 1fr; gap: 1.75rem; }
  .split-image { order: -1; }
  .review-cards { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .brand { font-size: 1rem; }
  .cards, .benefits, .footer-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .btn-row .btn { flex: 1 1 100%; }
  .map-wrap iframe { height: 320px; }
  .reviews-summary { padding: 1.25rem; }
  .reviews-summary .btn { width: 100%; }
  .wa-float { width: 54px; height: 54px; right: .75rem; }
  .hero { min-height: 560px; }
  .hero-content { padding-bottom: 4rem; }
  .lightbox button { font-size: 2.2rem; padding: .4rem .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
