/* ===== Base ===== */
:root{
  --ink:#77a6be;
  --ink2:#173d4f;
  --sun:#ffbf3c;
  --line:#e6edf2;
  --card:#ffffff;
}

*{box-sizing:border-box}
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background: #f4f6f8;
  color: #213746;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

.contact-container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  color: #000;
}

/* ===== Header ===== */
.header-gradient {
  background: transparent; /* hero image + overlay will show through */
  color: #fff;
  position: relative;
  /* z-index removed to avoid stacking issues with hero image */
}

/* Hero image + overlay (LCP-friendly) */
.header-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(11,42,58,.78), rgba(19,73,98,.78));
  pointer-events: none;
}
.hero-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  z-index:0;            /* behind overlay/content, above page bg */
}
/* ensure header content is above overlay/image */
.header-gradient .container,
.header-gradient .hero {
  position: relative;
  z-index: 2;
}

.nav-row {
  display:flex; align-items:center; justify-content:space-between; padding: 0px 0;
}
.brand-pill { margin:0; }
.brand-link{
  display:inline-flex; align-items:center; gap:10px;
  color:#ffffff; text-decoration:none; font-weight:800; padding-top:6px;
}
/* visual/logo size; intrinsic w/h remain in HTML for CLS */
.logo { height: 40px; width: auto; vertical-align: middle; display:block; }
@media (min-width: 768px){ .logo { height: 48px; } }

nav ul { list-style:none; margin:0; padding:0; }
nav ul li { display:inline-block; margin-left: 14px; }
nav ul li a {
  color:#fff; text-decoration:none; font-weight: 700; padding:6px 10px; border-radius: 12px;
}
nav ul li a:hover, nav ul li a.active { background: rgba(255,255,255,.15); }
.pill { background: #ffffff; color: var(--ink); }
.pill.primary { background: var(--sun); color:#1a2a33; }
.hide-on-mobile { display:inline-block; }
.hamburger { display: none; }

/* ===== Hero ===== */
.hero { color:#fff; text-align: left; padding: 28px 0 40px; background: transparent; }
.hero-compact { padding-bottom: 28px; }
.hero-inner { display:flex; align-items:center; }
.hero-copy { max-width: 760px; }
.hero-inner h2 { margin: 0 0 12px; font-size: 2.2em; line-height: 1.15; }
.hero-inner p { margin: 0 0 10px; font-size: 1.05em; color:#e6f1f8; }
.highlight { color:#ffde8a; }
.tag{display:inline-block;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.35);padding:6px 10px;border-radius:999px;font-size:13px;margin-bottom:10px}
.cta-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.btn{display:inline-block;text-decoration:none;border-radius:14px;padding:10px 14px;font-weight:800}
.btn.sun{background:var(--sun);color:#1a2a33}
.btn.light{background:var(--line);color:#000}
.badges{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
.badge{background:#ffffff; color:#1a2a33; border:1px solid var(--line); padding:8px 12px; border-radius:999px; font-size:13px}

/* ===== Compare (About + Before/After) ===== */
.compare { background: #fff; padding: 20px 0; }
.center { text-align: center; }

.compare .compare-grid {
  display: grid;
  grid-template-columns: 1fr; /* mobile: stacked; About first */
  gap: 16px;
  align-items: start;
  margin-top: 10px;
}
@media (min-width: 900px) {
  .compare .compare-grid {
    grid-template-columns: 1fr 1fr; /* desktop: side by side */
    gap: 24px;
  }
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius: 16px;
  box-shadow:0 8px 26px rgba(0,0,0,.05);
}

.about-blurb { border-radius: 16px; padding: 0px; }
.about-blurb h3 {
  margin: 0 0 8px;
  font-weight: 800;
  color: #2b2b2b;
}
.about-blurb p { margin: 0 0 14px; color: #333; line-height: 1.6; }
.about-blurb p:last-child { margin-bottom: 0; }

/* Before/After slider — auto sizes to image height (keep your working setup) */
.compare .ba {
  position: relative;
  overflow: hidden;
  background: #000;
  width: 100%;
  display: block; /* base img sets height */
  border-radius: 16px;
  border:1px solid var(--line);
}
.compare .ba > img {
  display: block;
  width: 100%;
  height: auto;            /* natural aspect ratio drives container height */
  object-fit: cover;
}
.compare .ba .after {
  position: absolute;
  inset: 0;                /* fill the container whose height is set by base img */
  overflow: hidden;
  z-index: 1;
}
.compare .ba .after img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  clip-path: inset(0 30% 0 0);   /* default 70% reveal of AFTER; JS updates live */
  -webkit-clip-path: inset(0 30% 0 0);
  transition: clip-path .12s linear, -webkit-clip-path .12s linear;
}

/* Labels, arrows, counter, range */
.compare .ba .labels {
  position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 3;
}
.compare .ba .labels span {
  background: #ffffffee; color: #17232b; font-size: 12px;
  border: 1px solid var(--line); padding: 5px 9px; border-radius: 999px;
}
.compare .ba .ba-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center;
  background: #ffffffd9; color: #111; border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; z-index: 4; user-select: none;
}
.compare .ba .ba-prev { left: 10px; }
.compare .ba .ba-next { right: 10px; }
.compare .ba .ba-arrow:hover { background: #fff; }
.compare .ba .ba-count {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  background: #ffffffee; border: 1px solid var(--line); color: #17232b;
  padding: 5px 9px; border-radius: 999px; font-size: 12px;
}
.compare .ba input[type="range"] {
  position: absolute; left: 10px; right: 10px; bottom: 10px; height: 6px;
  appearance: none; background: #ffffffcc; border-radius: 999px; margin: 0; z-index: 2;
}
.compare .ba input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.08);
}

.compare .cap {
  font-size: 13px; color: #5b6b76; margin-top: 8px; text-align: center;
}

/* ===== Services ===== */
.services { padding: 20px 0 5px 0; background:#fff; text-align: center;}
.services h2 { margin-top: 0; }
.services .services-grid {
  display: grid;
  grid-template-columns: 1fr;       /* mobile: one atop another */
  gap: 16px;
  margin-top: 10px;
}
@media (min-width: 700px) {
  .services { text-align: left; } .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .services .services-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}
.service-card {
  border: 1px solid var(--line); border-radius: 16px; padding: 16px; background:#fff; text-align: left;
}
.service-card h3 { margin: 0 0 6px; color: #2b2b2b; }
.service-card ul { margin: 8px 0 0 18px; padding: 0; }
.service-card li { margin: 4px 0; }

/* ===== CTA ===== */
.cta {
  text-align: center;
  padding-top: 5px;
  padding-bottom: 20px;
  margin: 0;
  background:#fff;
}
.cta h2 { margin-bottom: 10px; font-size: 1.6em; }
.cta p { margin-bottom: 20px; font-size: 1.1em; }

/* ===== Footer ===== */
footer {
  background: #2b2b2b; color: #fff; text-align: center; padding: 10px 0; margin-top: 0;
}

/* ===== Sticky CTA (mobile) ===== */
.sticky{
  position:sticky; bottom:0; background:#ffffffee; border-top:1px solid var(--line);
  backdrop-filter:saturate(1.2) blur(4px); padding:10px; z-index: 20;
}
.sticky .cta-row{justify-content:center}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  /* mobile nav layout */
  .hide-on-mobile{ display:none; }
  nav ul { display: none; width: 100%; text-align: center; margin-top: 10px; }
  nav ul.open { display: block; }
  nav ul li { display: block; margin: 10px 0; }
  .brand-link{ margin-bottom: 6px; align-self: center; }
  .brand-pill{ align-self: center; }

  .hero .cta-row { justify-content: center; text-align: center; }
  .hero .btn { flex: 1 1 auto; text-align: center; }
}

/* ==== CONTACT PAGE (lightweight, no conflicts) ==== */
.contact-section {
  padding: 20px 0;
  background: #fff;
}
.contact-section .container { max-width: 900px; }

.contact-section h2 { margin-top: 0; }

.contact-section form {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.form-group { margin-bottom: 15px; }
.form-group label { display:block; margin-bottom:6px; font-weight:700; color:#17232b; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea{
  width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:12px;
  background:#fff; color:#17232b; font:inherit; box-sizing:border-box;
}
.form-group textarea { height:150px; resize:vertical; }
.form-group small { display:block; margin-top:6px; color:#5b6b76; font-size:12px; }

/* Submit button reuses site button style */
.contact-section button[type="submit"]{
  background:var(--sun); color:#1a2a33; border:0; padding:12px 18px; border-radius:14px; font-weight:800; cursor:pointer;
}
.contact-section button[type="submit"]:hover{ filter:brightness(.95); }

/* reCAPTCHA containment on narrow screens */
.g-recaptcha{ overflow:hidden; }
@media (max-width:360px){
  .g-recaptcha{ transform:scale(.9); transform-origin:0 0; }
}

/* === Compare section: unify headings (About + Before & After) === */
.compare .about-blurb h3,
.compare h2.center {
  font-size: 1.6em;        /* same size for both */
  line-height: 1.2;
  font-weight: 800;
  color: #2b2b2b;
  margin: 0 0 12px;
  text-align: left;        /* desktop/tablet default */
}
/* On smaller screens, center both headings */
@media (max-width: 900px) {
  .compare .about-blurb h3,
  .compare h2.center {
    text-align: center;
  }
}

/* === Before/After: cap size, no cropping (keeps layout tidy) === */
.compare .ba {
  position: relative;
  display: block;
  background: #000;
  aspect-ratio: 4 / 3;     /* frame shape; adjust if you prefer */
  max-height: 360px;       /* desktop cap */
}
.compare .ba > img,
.compare .ba .after img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;      /* no cropping */
}
.compare .ba .after {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
@media (max-width: 1000px) {
  .compare .ba { max-height: 300px; }
}
@media (max-width: 700px) {
  .compare .ba { max-height: 240px; }
}

/* Labels on top of images & slider track */
.compare .ba .labels { z-index: 5; }
.compare .ba .ba-count { z-index: 5; }

/* States used by JS */
.compare .ba .labels span.is-dominant { opacity: 1; font-weight: 700; }
.compare .ba .labels span.is-muted    { opacity: .6; }
.compare .ba .labels span.is-hidden   { opacity: 0; pointer-events: none; }
