/* Melburn MOT Centre — public site styles. Mobile first. */

:root {
  --navy: #11263d;
  --navy-2: #1a3553;
  --ink: #16191d;
  --text: #2b2f35;
  --muted: #5d636b;
  --paper: #f4f2ed;
  --white: #ffffff;
  --line: #dedad1;
  --yellow: #f7c600;
  --yellow-dark: #d9ad00;
  --link: #1d4f91;
  --radius: 6px;
  --head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1180px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  padding-bottom: 64px; /* room for the mobile action bar */
}
img { max-width: 100%; display: block; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; color: var(--ink); line-height: 1.1; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2.3rem, 7vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
.nw { white-space: nowrap; }
h1, h2 { text-wrap: balance; }
address { font-style: normal; }
svg { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

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

.skip { position: absolute; left: -9999px; top: 8px; background: var(--yellow); color: var(--ink); padding: 8px 14px; z-index: 100; font-weight: 600; }
.skip:focus { left: 8px; }

.notice { background: var(--yellow); color: var(--ink); text-align: center; font-weight: 600; padding: 9px var(--gutter); font-size: 15px; }
.preview-flag { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 200; background: #c62828; color: #fff; font-weight: 600; font-size: 13px; padding: 4px 14px; border-radius: 0 0 6px 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius);
  font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: var(--yellow-dark); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-2); }
.btn-outline { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn-outline-dark { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline-dark:hover { background: var(--navy); color: var(--white); }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar { display: none; background: var(--navy); color: #cfd8e3; font-size: 14px; }
.topbar-inner { display: flex; gap: 28px; justify-content: flex-end; padding-top: 7px; padding-bottom: 7px; }
.topbar span, .topbar a { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.topbar a:hover { color: var(--white); }
.topbar svg { color: var(--yellow); }

.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: auto; }
.logo-img { max-height: 44px; width: auto; }
.logo-word { font: 700 1.75rem/1 var(--head); color: var(--navy); text-transform: uppercase; letter-spacing: .02em; }
.logo-tag { font: 700 .8rem/1 var(--head); text-transform: uppercase; letter-spacing: .08em; background: var(--yellow); color: var(--ink); padding: 5px 7px 4px; border-radius: 3px; }

.main-nav, .header-phone { display: none; }
.header-book { display: none; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  font: 600 15px var(--body); color: var(--ink); cursor: pointer;
}
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
.menu-bars::before, .menu-bars::after { content: ''; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }
.menu-btn[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav { border-top: 1px solid var(--line); background: var(--white); }
.mobile-nav ul { list-style: none; margin: 0; padding: 8px 0; }
.mobile-nav a { display: block; padding: 13px var(--gutter); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 18px; }
.mobile-nav a:hover { background: var(--paper); }

/* ---------- WhatsApp ---------- */
:root { --wa: #178a43; --wa-dark: #11703a; }
.btn-wa { background: var(--wa); color: var(--white); }
.btn-wa:hover { background: var(--wa-dark); }
.wa-float { display: none; }

/* ---------- mobile action bar ---------- */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--navy); box-shadow: 0 -2px 10px rgba(0,0,0,.15);
  padding-bottom: env(safe-area-inset-bottom);
}
.action-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; color: var(--white); text-decoration: none; font-weight: 600; }
.action-bar .action-wa { background: var(--wa); }
.action-bar .action-book { background: var(--yellow); color: var(--ink); }

/* ---------- hero ---------- */
.hero { background: var(--navy); color: #dbe3ec; padding: 40px 0 44px; }
.hero h1 { color: var(--white); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.hero-grid > * { min-width: 0; }
.eyebrow { font: 600 .95rem/1.2 var(--body); color: var(--yellow); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.hero-text { font-size: 1.1rem; max-width: 34em; }
.hero .btn-row { margin-top: 24px; }
.hero-side { display: grid; gap: 16px; }
.hero-img { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* number plate MOT check */
.plate-check { background: var(--white); color: var(--text); border-radius: var(--radius); padding: 22px; }
.plate-label { display: block; font: 700 1.5rem/1.1 var(--head); color: var(--ink); margin-bottom: 14px; }
.plate { display: flex; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--yellow); margin-bottom: 12px; }
.plate-band { display: flex; align-items: flex-end; justify-content: center; width: 42px; padding-bottom: 8px; background: #1d4f91; color: var(--white); font: 700 13px var(--body); flex: none; }
.plate input {
  flex: 1; width: 100%; min-width: 0; border: 0; background: transparent; padding: 10px 12px;
  font: 700 2rem/1 var(--head); letter-spacing: .08em; text-transform: uppercase; text-align: center; color: var(--ink);
}
.plate input::placeholder { color: rgba(22,25,29,.4); }
.plate input:focus { outline: none; }
.plate:focus-within { box-shadow: 0 0 0 3px rgba(29,79,145,.45); }
.plate-check .btn { width: 100%; }
.plate-small { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.hero-has-img .plate-check { padding: 18px; }

/* ---------- facts strip ---------- */
.facts { background: var(--paper); border-bottom: 1px solid var(--line); }
.facts-grid { display: grid; }
.fact { display: flex; align-items: center; gap: 14px; padding: 16px 0; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.fact + .fact { border-top: 1px solid var(--line); }
.fact svg { width: 26px; height: 26px; color: var(--navy); }
.fact small { display: block; font-weight: 500; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
a.fact:hover { color: var(--link); }

/* ---------- sections ---------- */
.section { padding: 52px 0; }
.section-alt { background: var(--paper); }
.section-title { margin-bottom: 26px; }
.more-link { margin-top: 22px; }
.more-link a, .text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.more-link a:hover, .text-link:hover { text-decoration: underline; }

.cards { display: grid; gap: 18px; }
.card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: var(--radius); text-decoration: none; color: var(--text); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-top-color: var(--yellow); box-shadow: 0 6px 18px rgba(17,38,61,.1); }
.card-img { aspect-ratio: 16 / 10; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.6rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-link { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--link); }
.badge { font: 600 .9rem/1 var(--body); background: var(--yellow); color: var(--ink); padding: 5px 8px; border-radius: 3px; }

.why { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.why li { display: flex; gap: 14px; }
.why li > svg { width: 28px; height: 28px; padding: 5px; background: var(--yellow); color: var(--ink); border-radius: 50%; margin-top: 2px; }
.why h3 { font-size: 1.3rem; margin-bottom: .25em; }
.why p { margin: 0; }
.split { display: grid; gap: 32px; align-items: center; }
.split-img { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.split-img img { width: 100%; height: 100%; object-fit: cover; }

.reviews { display: grid; gap: 18px; }
.review { margin: 0; background: var(--paper); border-left: 4px solid var(--yellow); padding: 22px; border-radius: 0 var(--radius) var(--radius) 0; }
.review blockquote { margin: 0 0 12px; font-size: 1.05rem; }
.review figcaption { font-weight: 600; color: var(--ink); }
.review figcaption span { font-weight: 400; color: var(--muted); }

.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.strip-item { aspect-ratio: 1; overflow: hidden; border-radius: 4px; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.strip-item:hover img { transform: scale(1.04); }

.find { border-top: 1px solid var(--line); }
.find-grid, .contact-grid { display: grid; gap: 32px; }
.find-address { font-size: 1.15rem; font-weight: 600; color: var(--ink); margin-bottom: 18px; }

.hours { border-collapse: collapse; width: 100%; max-width: 380px; margin-bottom: 8px; }
.hours th, .hours td { padding: 7px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.closed td { color: var(--muted); }
.hours-note { font-size: 14px; color: var(--muted); }

.map { position: relative; min-height: 320px; border-radius: var(--radius); overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-facade { height: 100%; min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px; gap: 4px;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 32px 32px; background-color: var(--paper); }
.map-facade > svg { width: 40px; height: 40px; color: #c62828; }
.map-facade p { background: var(--paper); padding: 0 8px; }
.map-facade .btn-row { justify-content: center; }
.map-small { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

.cta { background: var(--yellow); padding: 44px 0; }
.cta h2 { margin-bottom: .3em; }
.cta p { color: var(--ink); max-width: 36em; }
.cta-inner { display: grid; gap: 18px; align-items: center; }

/* ---------- inner pages ---------- */
.page-head { background: var(--paper); border-bottom: 1px solid var(--line); padding: 28px 0 32px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.page-intro { font-size: 1.12rem; max-width: 40em; }
.page-intro p:last-child { margin-bottom: 0; }
.page-404 { padding: 72px 0; }

.with-aside { display: grid; gap: 36px; }
.prose { max-width: 680px; min-width: 0; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child, .prose figure + h2 { margin-top: 0; }
.feature-img { margin: 0 0 32px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; }
.feature-img img { width: 100%; height: 100%; object-fit: cover; }

.ticks { list-style: none; padding: 0; margin: 0 0 2em; display: grid; gap: 4px 24px; }
.ticks li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ticks svg { color: #2e7d32; }

.faqs details { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; background: var(--white); }
.faqs summary { cursor: pointer; padding: 16px 44px 16px 18px; font-weight: 600; color: var(--ink); list-style: none; position: relative; }
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--navy); }
.faqs details[open] summary::after { content: '−'; }
.faqs details > p { padding: 0 18px; }
.faqs details > p:last-child { padding-bottom: 6px; }

.price-list { border-top: 3px solid var(--navy); }
.price-row { padding: 20px 0; border-bottom: 1px solid var(--line); }
.price-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.price-row h3 { margin-bottom: .3em; }
.price { font: 700 1.5rem/1 var(--head); color: var(--navy); white-space: nowrap; }
.price-row p { margin: 0; }
.footnote { font-size: 15px; color: var(--muted); margin-top: 16px; }

.repair-grid { display: grid; gap: 14px; }
.repair { border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: var(--radius); padding: 18px 20px; }
.repair h3 { margin-bottom: .2em; }
.repair p { margin: 0; }

.side-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; align-self: start; }
.side-price { margin: 0 0 4px; display: grid; }
.side-price span { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.side-price strong { font: 700 2.6rem/1.05 var(--head); color: var(--navy); }
.side-price small { color: var(--muted); font-size: 14px; }
.side-head { font: 700 1.2rem var(--head); color: var(--ink); margin: 10px 0 4px; }
.side-hours .hours { max-width: none; }
.side-address { display: flex; gap: 8px; font-size: 15px; margin: 0; }
.side-address svg { margin-top: 4px; color: var(--navy); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery-item { margin: 0; }
.gallery-item a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item a:hover img { transform: scale(1.03); }
.gallery-item figcaption { font-size: 14px; color: var(--muted); padding: 6px 2px 0; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(10,14,20,.9); }
.lightbox img { max-width: 94vw; max-height: 82vh; object-fit: contain; margin: 0 auto; }
.lightbox-caption { color: #e6e6e6; text-align: center; margin: 10px 0 0; }
.lightbox-close { position: fixed; top: 12px; right: 12px; width: 48px; height: 48px; font-size: 32px; line-height: 1; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 50%; cursor: pointer; }

.booking-embed { min-height: 400px; }
.booking-embed iframe { width: 100%; max-width: 100%; border: 0; }
.booking-alt { margin-top: 20px; color: var(--muted); }
.booking-empty { max-width: 560px; margin: 0 auto; text-align: center; padding: 40px 24px; border: 2px dashed var(--line); border-radius: var(--radius); }
.booking-empty > svg { width: 44px; height: 44px; color: var(--navy); margin-bottom: 12px; }

.contact-block { margin-bottom: 28px; }
.contact-block h2 { font-size: 1.3rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .35em; }
.big-link { font: 700 1.9rem/1.1 var(--head); color: var(--navy); text-decoration: none; word-break: break-word; }
.big-link:hover { text-decoration: underline; }
.contact-details .text-link svg { width: 20px; height: 20px; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #b9bfc7; font-size: 15px; border-top: 6px solid var(--yellow); }
.site-footer a { color: #e3e7ec; text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.footer-grid { display: grid; gap: 30px; padding-top: 44px; padding-bottom: 36px; }
.footer-name, .footer-head { font: 700 1.3rem var(--head); color: var(--white); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .03em; }
.footer-phone { font: 700 1.4rem var(--head); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-social { display: inline-flex; align-items: center; gap: 6px; }
.site-footer .hours th, .site-footer .hours td { border-color: rgba(255,255,255,.12); color: #d2d7de; }
.site-footer .hours tr.closed td { color: #8b929b; }
.site-footer .hours-note { color: #8b929b; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 16px; padding-bottom: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #8b929b; }

/* ---------- larger screens ---------- */
@media (min-width: 600px) {
  .cards, .reviews, .repair-grid { grid-template-columns: repeat(2, 1fr); }
  .ticks { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .strip { grid-template-columns: repeat(6, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; gap: 28px 40px; }
  .facts-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .fact + .fact { border-top: 0; }
}

@media (min-width: 960px) {
  :root { --gutter: 28px; }
  body { padding-bottom: 0; }
  .action-bar, .menu-btn, .mobile-nav { display: none !important; }
  .wa-float {
    position: fixed; right: 24px; bottom: 24px; z-index: 60;
    display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 16px;
    background: var(--wa); color: var(--white); border-radius: 999px; text-decoration: none; font-weight: 600;
    box-shadow: 0 6px 18px rgba(0,0,0,.22); transition: background .15s;
  }
  .wa-float:hover { background: var(--wa-dark); }
  .wa-float svg { width: 26px; height: 26px; }
  .topbar { display: block; }
  .header-inner { min-height: 76px; gap: 28px; }
  .main-nav { display: block; }
  .main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
  .main-nav a { display: block; padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; }
  .main-nav a:hover { color: var(--link); }
  .main-nav a[aria-current="page"] { border-bottom-color: var(--yellow); }
  .header-book { display: inline-flex; }

  .hero { padding: 72px 0 76px; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; }
  .hero-has-img .hero-side { position: relative; }
  .hero-has-img .plate-check { position: absolute; left: -40px; bottom: -40px; width: 300px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
  .hero-has-img .plate-label { font-size: 1.25rem; }
  .hero-has-img .plate input { font-size: 1.6rem; }

  .section { padding: 76px 0; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1.1fr 1fr; gap: 64px; }
  .find-grid { grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
  .contact-grid { grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start; }
  .cta-inner { grid-template-columns: 1fr auto; gap: 40px; }
  .page-head { padding: 40px 0 48px; }
  .with-aside { grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; }
  .side-card { position: sticky; top: 140px; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
  .map, .map-facade { min-height: 400px; }
}

@media (min-width: 1100px) {
  .header-phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--navy); text-decoration: none; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
