/* Little Falls Car Wash (stmaryscarwash.com) — static rebuild of the WordPress/The7 site */

:root {
  --accent: #1469e8;
  --nav: #0066bf;
  --body-bg: #1e73be;
  --text: #8b8d94;
  --heading: #333333;
  --grey-fill: #eaeaea;
  --yellow-fill: #eebc05;
  --footer: #1a1c20;
  --menu-hover: #adadad;
  --box: 1240px;
  --gutter: 50px;
  --font: "Roboto", Helvetica, Arial, Verdana, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--body-bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: #1ebbf0; }

h1, h2, h3 { color: var(--heading); font-weight: 700; margin: 0 0 10px; }
h1 { font-size: 52px; line-height: 62px; }
h2 { font-size: 34px; line-height: 44px; }
h3 { font-size: 24px; line-height: 34px; }
p { margin: 0 0 10px; }
figure { margin: 0; }

.center { text-align: center; }

/* ---------- Boxed page ---------- */
.page {
  max-width: var(--box);
  margin: 0 auto;
  background: #fff;
  overflow-x: clip;
}

.wrap { padding: 0 var(--gutter); }

/* ---------- Page loader (The7 spinner) ---------- */
.loader { display: none; }

.js .loader {
  position: fixed;
  inset: 0;
  z-index: 9901;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: opacity 0.35s ease-out, visibility 0.35s ease-out;
}

.js .loader.done { opacity: 0; visibility: hidden; }

.loader rect {
  fill: rgba(51, 51, 51, 0.25);
  opacity: 0.2;
  animation: spinner 1s linear infinite;
}

.loader rect:nth-child(2) { animation-delay: 0.083s; }
.loader rect:nth-child(3) { animation-delay: 0.166s; }
.loader rect:nth-child(4) { animation-delay: 0.25s; }
.loader rect:nth-child(5) { animation-delay: 0.33s; }
.loader rect:nth-child(6) { animation-delay: 0.416s; }
.loader rect:nth-child(7) { animation-delay: 0.5s; }
.loader rect:nth-child(8) { animation-delay: 0.58s; }
.loader rect:nth-child(9) { animation-delay: 0.666s; }
.loader rect:nth-child(10) { animation-delay: 0.75s; }
.loader rect:nth-child(11) { animation-delay: 0.83s; }
.loader rect:nth-child(12) { animation-delay: 0.916s; }

@keyframes spinner { from { opacity: 1; } to { opacity: 0; } }

/* ---------- Desktop header ---------- */
.branding {
  display: flex;
  justify-content: center;
  height: 130px;
  background: #fff;
}

.branding img { width: 381px; height: 130px; }

.menu-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0 30px;
  background: var(--nav);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: block;
  margin: 18px 14px;
  padding: 4px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  text-decoration: none;
  transition: color 0.2s;
}

.main-nav li:first-child a { margin-left: 0; }
.main-nav li:last-child a { margin-right: 0; }

.main-nav a:hover,
.main-nav a.is-active { color: var(--menu-hover); }

.header-phone {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 40px;
  color: #fff;
  font-family: Arial, Helvetica, Verdana, sans-serif;
  font-size: 14px;
  line-height: 18px;
  text-decoration: none;
}

.header-phone svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Mobile header + slide-out menu (below 992px) ---------- */
.mobile-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 var(--gutter);
  background: #fff;
  transition: height 0.3s, box-shadow 0.3s;
}

.mobile-logo img { width: auto; height: 80px; transition: height 0.3s; }

.mobile-header.is-stuck { height: 60px; box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.07); }
.mobile-header.is-stuck .mobile-logo img { height: 60px; }

.menu-toggle {
  width: 40px;
  height: 40px;
  padding: 12px 9px;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin-bottom: 5px;
  background: #333;
  border-radius: 2px;
}

.menu-toggle span:last-child { margin-bottom: 0; }

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  width: 330px;
  max-width: 100vw;
  padding: 45px 15px 30px 30px;
  background: #fff;
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.5s ease, visibility 0.5s;
}

.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li { border-bottom: 1px solid rgba(51, 51, 51, 0.12); }

.mobile-menu a {
  display: block;
  padding: 15px 25px 15px 0;
  color: #333;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  text-decoration: none;
  transition: color 0.2s;
}

.mobile-menu a:hover,
.mobile-menu a.is-active { color: var(--accent); }

.mobile-menu-close {
  position: fixed;
  top: 15px;
  right: 13px;
  z-index: 210;
  width: 30px;
  height: 30px;
  padding: 0;
  background: var(--accent);
  border: 0;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.mobile-menu-close span {
  position: absolute;
  top: 14px;
  left: 7px;
  width: 16px;
  height: 2px;
  background: #fff;
  transform: rotate(45deg);
}

.mobile-menu-close span + span { transform: rotate(-45deg); }

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(17, 17, 17, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}

body.menu-open .mobile-menu { transform: translateX(0); visibility: visible; }
body.menu-open .menu-overlay,
body.menu-open .mobile-menu-close { opacity: 1; visibility: visible; }

/* ---------- Hero (single-slide Revolution Slider, fades in) ---------- */
.hero {
  aspect-ratio: 1240 / 550;
  background: url("../images/173506_1761155.jpg") center / cover no-repeat;
  animation: heroIn 1s ease-in-out both;
}

@keyframes heroIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Content rows (WPBakery layout) ---------- */
.main { padding: 70px 0; }

/* keep anchor targets clear of the sticky mobile header */
@media (max-width: 991px) { section[id], .box[id] { scroll-margin-top: 60px; } }

.el { margin-bottom: 35px; }
.el > :last-child { margin-bottom: 0; }

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 30px;
  align-items: start;
}

.cols-2 figure h2 { text-align: center; }

/* Rows with a background colour extend 15px past the content edges */
.fill {
  margin: 0 -15px;
  padding: 35px 15px 0;
  display: flow-root;
}

.grey { background: var(--grey-fill); }
.yellow { background: var(--yellow-fill); }

.padded { padding-top: 35px; }

.video-full, .video-center { padding-bottom: 8px; }
.video-full iframe { display: block; width: 100%; height: 420px; border: 0; }

.video-center iframe {
  display: block;
  width: 760px;
  max-width: 100%;
  height: 415px;
  margin: 0 auto;
  border: 0;
}

/* Masonry media grid (2 columns, 5px gutter) */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-right: -5px;
  margin-bottom: 30px;
}

.gallery-item { display: block; padding: 0 5px 5px 0; cursor: zoom-in; }
.gallery-item img { width: 100%; }

/* Grey boxes (Purified Water / Pet Wash / Propane) */
.boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
  margin: 0 -15px;
  padding: 15px 0;
}

.boxes.single { grid-template-columns: 1fr; }

.box {
  padding: 35px 15px 0;
  display: flow-root;
  background: var(--grey-fill);
}

.box img { width: 100%; }
.box .propane-img { width: 953px; margin-left: auto; margin-right: auto; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 10px var(--gutter);
  background: var(--footer);
  color: #eee;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

/* ---------- Scroll-to-top button ---------- */
.scroll-top {
  position: fixed;
  right: -45px;
  bottom: 10px;
  z-index: 109;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.4s ease, background-color 0.3s;
}

.scroll-top svg { width: 24px; height: 24px; fill: #fff; }
.scroll-top.on { right: 10px; opacity: 1; }
.scroll-top:hover { background: rgba(0, 0, 0, 0.5); }

/* ---------- Lightbox (gallery) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  animation: lbFade 0.6s ease both;
}

.lightbox[hidden] { display: none; }

.lb-inner { position: relative; }

.lb-img {
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 90px);
  border: 4px solid #fff;
  border-radius: 3px;
  background: #fff;
  animation: lbFade 0.6s ease both;
}

.lb-prev, .lb-next {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34%;
  background: none;
  border: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.6s;
}

.lb-prev { left: 0; }
.lb-next { right: 0; }
.lb-prev:hover, .lb-next:hover, .lb-prev:focus-visible, .lb-next:focus-visible { opacity: 1; }

.lb-prev::after, .lb-next::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border: solid #fff;
  border-width: 0 0 4px 4px;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.6));
}

.lb-prev::after { left: 22px; transform: rotate(45deg); }
.lb-next::after { right: 22px; transform: rotate(-135deg); }

.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
  padding-top: 8px;
  color: #ccc;
  font-size: 12px;
}

.lb-close {
  background: none;
  border: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

.lb-close:hover { opacity: 1; }

@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Grid entrance animation (animate.css zoomIn, as used by WPBakery) ---------- */
.js .animate { opacity: 0; }
.js .animate.animated { opacity: 1; animation: zoomIn 1s both; }

@keyframes zoomIn {
  from { opacity: 0; transform: scale3d(0.3, 0.3, 0.3); }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .animate, .hero, .lightbox, .lb-img { opacity: 1 !important; animation: none !important; }
  .js .loader { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .site-header { display: none; }
  .mobile-header { display: flex; }
  .scroll-top { display: none; }
  h1 { font-size: 34px; }
}

@media (max-width: 767px) {
  :root { --gutter: 20px; }
  h1 { line-height: 44px; }
  h2 { font-size: 28px; line-height: 38px; }
  .cols-2, .boxes, .gallery { grid-template-columns: 1fr; }
  .video-full iframe, .video-center iframe { height: auto; aspect-ratio: 16 / 9; }
  .site-footer { justify-content: center; text-align: center; }
}
