/* ============================================================
   MDK TRUCK WASHING — SITE STYLES
   Sections: variables, global elements, header, reusable UI,
   home page, interior pages, footer, responsive layouts.
   ============================================================ */

/* 1. Theme and global reset */
:root {
  --blue: #078cff;
  --blue-dark: #006ed4;
  --ink: #111820;
  --dark: #070a0f;
  --muted: #5c6876;
  --border: #dce2e8;
  --surface: #f4f7fa;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; font-family: Arial, Helvetica, sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* 2. Site header and navigation */
.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
  padding: 9px clamp(18px, 3vw, 50px);
  color: #fff;
  background: #05070a;
}
.logo-link { width: 105px; height: 105px; flex: 0 0 auto; margin-bottom: -30px; border: 3px solid white; border-radius: 50%; overflow: hidden; background: #fff; }
.logo-link img { width: 100%; height: 100%; object-fit: cover; }
.primary-nav, .header-actions { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.primary-nav a { font-weight: 700; border-bottom: 3px solid transparent; padding: 9px 0; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { border-color: var(--blue); }
.phone-link { white-space: nowrap; border: 1px solid white; padding: 10px 15px; border-radius: 9px; font-weight: 700; }
.menu-toggle { display: none; color: white; background: none; border: 1px solid #667; border-radius: 8px; padding: 8px 12px; }

/* 3. Reusable buttons, layout, and typography */
.button { display: inline-block; border: 0; border-radius: 9px; background: var(--blue); color: white; font-weight: 800; padding: 12px 19px; text-align: center; }
.button:hover { background: var(--blue-dark); }
.button-outline { border: 2px solid #fff; background: transparent; }
.button-outline:hover { background: rgba(255,255,255,.15); }
.container { width: min(1440px, calc(100% - 60px)); margin: auto; }
.section { padding: 45px 0; }
.section-heading { font-size: clamp(25px, 3vw, 36px); line-height: 1.12; margin: 8px 0 15px; }
.eyebrow { color: var(--blue); text-transform: uppercase; font-weight: 900; letter-spacing: .06em; }
.muted { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: white; box-shadow: 0 4px 18px #0714210d; }
.card img { width: 100%; height: 210px; object-fit: cover; }
.card-body { padding: 20px; }
.card h3 { margin: 0 0 10px; }
.card p { margin: 0 0 18px; color: var(--muted); }

/* 4. Home page hero */
.hero {
  min-height: 470px;
  display: flex;
  align-items: center;
  color: #fff;
  background: linear-gradient(90deg, rgba(0,0,0,.91) 0%, rgba(0,0,0,.69) 34%, rgba(0,0,0,.06) 73%), url('../assets/hero.jpg') center center / cover no-repeat;
}
.hero-content { width: min(700px, 60%); margin-left: clamp(35px, 11vw, 210px); padding: 55px 0; }
.hero h1 { font-size: clamp(38px, 5vw, 69px); font-style: italic; font-weight: 900; line-height: 1; letter-spacing: -.035em; margin: 14px 0; }
.hero h1 span { color: var(--blue); }
.hero p { max-width: 500px; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 22px; }
.trust-strip { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 27px; font-size: 13px; font-weight: 700; }
.trust-strip strong { color: var(--blue); font-size: 21px; vertical-align: middle; }

/* 5. Home content and quote form */
.service-intro { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 22px; }
.service-intro p { max-width: 520px; }
.feature-band { background: var(--surface); }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; align-items: center; }
.feature-grid > img { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); }
.benefits { list-style: none; padding: 0; margin: 18px 0; }
.benefits li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.benefits li::before { content: '✓'; color: var(--blue); font-weight: 900; margin-right: 12px; }
.quote-panel { background: var(--dark); color: white; border: 4px solid var(--blue); border-radius: 19px; padding: 25px; }
.quote-panel h2 { margin: 0 0 8px; font-size: 28px; }
.quote-panel p { margin: 0 0 17px; }
.quote-panel label { display: block; margin: 12px 0 5px; font-size: 13px; font-weight: 700; }
.quote-panel input, .quote-panel textarea, .quote-panel select { width: 100%; border: 1px solid #49515b; border-radius: 8px; background: #292e35; color: white; padding: 11px 12px; }
.quote-panel input::placeholder, .quote-panel textarea::placeholder { color: #bec5ce; }
.quote-panel .button { width: 100%; margin-top: 17px; }
.form-note { font-size: 12px; color: #c6d0dd; margin-top: 12px !important; }

/* 6. Inner pages and gallery */
.page-hero { padding: 60px 24px 45px; background: linear-gradient(120deg, #05080d, #123b63); color: #fff; text-align: center; }
.page-hero h1 { margin: 0; font-size: clamp(34px, 5vw, 54px); }
.page-hero p { margin: 10px auto 0; max-width: 720px; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.gallery-button { position: relative; border: 0; padding: 0; border-radius: var(--radius); overflow: hidden; background: #000; text-align: left; }
.gallery-button img { width: 100%; height: 310px; object-fit: cover; }
.gallery-button span { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; color: #fff; font-weight: 800; background: linear-gradient(transparent, #000c); }
.image-dialog { max-width: min(950px, 94vw); padding: 16px; border: 0; border-radius: var(--radius); }
.image-dialog::backdrop { background: #000b; }
.image-dialog img { max-height: 75vh; width: auto; margin: auto; }
.dialog-close { float: right; border: 0; background: #111; color: white; padding: 7px 12px; border-radius: 6px; }
.empty-review { max-width: 680px; margin: 0 auto; text-align: center; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.contact-detail { padding: 15px 0; border-bottom: 1px solid var(--border); }

/* 7. Footer */
.site-footer { background: #05070a; color: #e2e7ed; padding: 23px 30px; display: flex; justify-content: space-between; gap: 20px; font-size: 14px; }
.site-footer p { margin: 0; }
.site-footer a { color: #66b8ff; }

/* Footer social/contact links remain aligned on desktop and wrap on mobile. */
.footer-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.footer-links a:hover, .contact-detail a:hover { text-decoration: underline; }

/* 8. Responsive behavior */
@media (max-width: 1150px) {
  .header-actions .phone-link { display: none; }
  .primary-nav { gap: 15px; }
  .logo-link { width: 88px; height: 88px; }
}
@media (max-width: 850px) {
  .site-header { flex-wrap: wrap; }
  .menu-toggle { display: inline-block; margin-left: auto; }
  .header-actions { margin-left: auto; }
  .primary-nav { display: none; order: 5; width: 100%; flex-direction: column; align-items: stretch; padding: 12px 0; }
  .primary-nav.is-open { display: flex; }
  .hero-content { width: 82%; margin-left: 30px; }
  .hero { background-position: 62% center; }
  .cards { grid-template-columns: 1fr 1fr; }
  .feature-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .container { width: min(100% - 30px, 1440px); }
  .header-actions .button { font-size: 12px; padding: 10px; }
  .logo-link { width: 75px; height: 75px; margin-bottom: -18px; }
  .hero { min-height: 530px; background-position: 64% center; }
  .hero-content { width: calc(100% - 35px); margin: 0 18px; }
  .hero h1 { font-size: 40px; }
  .hero p { font-size: 16px; }
  .service-intro { display: block; }
  .cards, .gallery-grid { grid-template-columns: 1fr; }
  .gallery-button img { height: 230px; }
  .site-footer { display: block; text-align: center; }
}

@media (max-width: 600px) {
  .footer-links { justify-content: center; margin-top: 12px; }
}

/* 8. Real-photo before/after comparisons (no generated images) */
.comparison-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; margin:24px 0; }
.comparison-card { min-width:0; padding:13px; background:#fff; border:1px solid var(--border); border-radius:var(--radius); box-shadow:0 6px 20px #09182c10; }
.comparison-card h3 { font-size:16px; margin:2px 0 12px; }
.comparison { position:relative; aspect-ratio: 1.28; overflow:hidden; border-radius:10px; background:#111; isolation:isolate; }
.comparison > img, .comparison-after img { position:absolute; width:100%; height:100%; inset:0; object-fit:cover; }
.comparison-after { position:absolute; inset:0; clip-path:inset(0 0 0 var(--reveal)); pointer-events:none; }
.comparison-line { position:absolute; z-index:2; top:0; bottom:0; left:var(--reveal); border-left:3px solid #fff; filter:drop-shadow(0 1px 3px #111); pointer-events:none; }
.comparison-line span { position:absolute; top:50%; left:0; transform:translate(-50%,-50%); display:grid; place-items:center; width:38px; height:38px; border-radius:50%; background:#fff; color:#101820; font-size:22px; }
.comparison-label { position:absolute; z-index:2; bottom:12px; padding:5px 9px; border-radius:6px; background:#05090cda; color:#fff; font-size:12px; font-weight:800; pointer-events:none; }
.comparison-label-before { left:10px; }
.comparison-label-after { right:10px; background:var(--blue); }
.comparison-range { position:absolute; z-index:3; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:ew-resize; }
.gallery-subheading { margin-top:42px; }
@media (max-width:950px) { .comparison-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px) { .comparison-grid { grid-template-columns:1fr; } }

/* Gallery before/after pairs: static photos, no interactive slider. */
.gallery-intro { margin: 0 0 1.5rem; color: #526071; }
.gallery-pairs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.gallery-pair { min-width: 0; padding: 1rem; border: 1px solid #dce4ec; border-radius: 14px; background: #fff; }
.gallery-pair h3 { margin: 0 0 .85rem; font-size: 1.1rem; }
.gallery-pair-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.gallery-pair-photos .gallery-button { min-width: 0; }
.gallery-pair-photos .gallery-button img { width: 100%; height: 190px; object-fit: cover; }
@media (max-width: 760px) { .gallery-pairs-grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .gallery-pair-photos .gallery-button img { height: 140px; } }

/* Floating quote widget: compact launcher, bottom right, opens on demand. */
.quote-widget { position:fixed; bottom:22px; right:22px; z-index:1000; width:min(390px,calc(100vw - 28px)); font-family:inherit; }
.quote-widget-toggle { margin-left:auto; display:flex; align-items:center; gap:10px; justify-content:center; padding:15px 20px; background:var(--blue); color:#fff; border:2px solid #fff; border-radius:999px; box-shadow:0 8px 30px #07132155; font:inherit; font-weight:800; cursor:pointer; }
.quote-widget-toggle:hover { filter:brightness(1.12); }
.quote-widget-toggle[hidden], .quote-widget-panel[hidden] { display:none !important; }
.quote-widget-panel { background:var(--dark); color:#fff; border:2px solid var(--blue); border-radius:17px; overflow:hidden; box-shadow:0 15px 50px #050a11a6; max-height:min(82vh,740px); display:flex; flex-direction:column; }
.quote-widget-heading { display:flex; align-items:center; justify-content:space-between; background:var(--blue); padding:13px 17px; font-size:18px; }
.quote-widget-heading button { border:0; background:transparent; color:#fff; font-size:20px; cursor:pointer; padding:4px 8px; }
.quote-widget .quote-panel { overflow-y:auto; border:0; border-radius:0; padding:14px 18px 18px; }
.quote-widget .quote-panel p { margin-bottom:9px; }
.quote-widget .quote-panel label { margin:9px 0 4px; }
.quote-widget .quote-panel input,.quote-widget .quote-panel select,.quote-widget .quote-panel textarea { padding:9px 10px; }
.quote-widget .quote-panel .button { margin-top:12px; }
@media(max-width:520px) { .quote-widget { right:14px; bottom:14px; } .quote-widget-panel { max-height:85dvh; } }
