/* =========================
   Base / Reset
========================= */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  color: #333;
  background: #f5f5f5;
  line-height: 1.6;
  overflow-x: hidden; /* safety net against page-wide horizontal scroll */
}

/* Reusable container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* =========================
   Variables (tweak here)
========================= */
:root{
  /* Header sizes (desktop) */
  --logo-desktop-h: 110px;
  --phone-desktop-h: 110px;
  --phone-nudge-y: 3px;        /* +down / -up fine-tune for phone icon */

  /* Mobile behavior (≤820px; compact phone centered) */
  --logo-mobile-h: 75px;       /* keep logo larger/smaller on tiny screens */
  --phone-mobile-h: 70px;      /* compact phone visual height */
  --phone-slot-w-mobile: 140px;/* squeeze to give logo more room */
  --mobile-header-gap: 0px;
  --mobile-header-xpad: 0px;

  /* Hero mobile focal point (≤560px) */
  --intro-bg-mobile-x: 85%;
  --intro-bg-mobile-y: 50%;

  /* Small-phone form sizing */
  --form-mobile-w: 74vw;
  --form-mobile-max: 380px;
  --form-mobile-pad: .75rem;
  --form-mobile-border: 4px;
  --form-mobile-radius: 20px;
  --form-mobile-label: 1rem;
  --form-mobile-input: .95rem;
  --form-mobile-btn: 1.05rem;

  /* reCAPTCHA scale for tiny screens */
  --recap-scale: 0.72;         /* tweak 0.70–0.90 */

  /* Sticky offsets */
  --sticky-offset-desktop: calc(var(--logo-desktop-h) + 8px);
  --sticky-offset-mobile: calc(var(--logo-mobile-h) + 6px);

  /* tiny overlap to hide any gap between headers */
  --seam-guard: 1px;

  /* how much the hero should tuck under the header */
  --hero-bleed: 2px;
}

/* =========================
   Top Header (Logo + Phone)
========================= */
.top-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #EAEAEA;
  display: grid;
  grid-template-columns: auto 1fr auto; /* logo | spacer | phone */
  align-items: center;
  padding: 2px 12px;
  gap: 12px;
  width: 100%;
  border-bottom: 0px solid #d4d4d4;
}

/* Logo left (desktop) */
.top-header .icon { display:flex; align-items:center; }
.top-header img.logo{
  height: var(--logo-desktop-h);
  width: auto;
  object-fit: contain;
}

/* Phone right (desktop) */
.top-header .number{
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: center;
}
.top-header .number picture,
.top-header .number img{
  height: var(--phone-desktop-h);
  width: auto;
  object-fit: contain;
  transform: translateY(var(--phone-nudge-y));
}
/* Safety: undo legacy overrides */
.top-header .number .phone{ max-height:none !important; width:auto !important; }

/* Mobile: center compact phone, give logo more room */
@media (max-width: 820px){
  .top-header{
    gap: var(--mobile-header-gap);
    padding: 0 var(--mobile-header-xpad);
  }
  .top-header img.logo{
    height: var(--logo-mobile-h) !important;
    width: auto !important;
  }
  .top-header .number{
    justify-self: center;
    width: var(--phone-slot-w-mobile);
  }
  .top-header .number picture,
  .top-header .number img{
    height: var(--phone-mobile-h);
    width: auto;
    object-fit: contain;
    transform: translateY(var(--phone-nudge-y));
  }
}

/* =========================
   Main Header (Nav + CTAs)
========================= */
.main-header{
  position: sticky;
  top: calc(var(--sticky-offset-desktop) - var(--seam-guard));
  z-index: 900;
  background: #7A7A7A;
  color: #fff;
  box-shadow: 0 4px 6px rgba(0,0,0,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;

  /* JS controls transform; keep easing off */
  transform: none;
  transition: transform 0s !important;

  will-change: transform;
  backface-visibility: hidden;
  transform-origin: top;
}

/* Mobile offset matches top header */
@media (max-width: 820px){
  .main-header{ top: calc(var(--sticky-offset-mobile) - var(--seam-guard)); }
}

/* Nav */
.nav-menu{
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nav-menu a{
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  font-weight: bold;
  border-radius: 6px;
  transition: background-color .2s ease, color .2s ease;
}
.nav-menu a:hover,
.nav-menu a:focus-visible{
  background: rgba(255,255,255,.12);
  outline: none;
}
.nav-menu a.active{ color: #f4a261; }

/* CTAs */
.main-header .buttons{
  display:flex;
  align-items:center;
  gap:10px;
}
.main-header .buttons .cta-service,
.main-header .buttons .cta-quote{
  margin:0;
  padding:10px 20px;
  font-size:18px;
  text-decoration:none;
  border-radius:8px;
  font-weight:bold;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.main-header .buttons .cta-service{ background:#77C97E; color:#fff; }
.main-header .buttons .cta-quote{  background:#f4a261; color:#fff; }
.main-header .buttons .cta-service:hover,
.main-header .buttons .cta-service:focus-visible{
  background:#51AF58; transform:translateY(-2px);
  box-shadow:0 0 15px rgba(55,165,55,.45);
}
.main-header .buttons .cta-quote:hover,
.main-header .buttons .cta-quote:focus-visible{
  background:#e38b42; transform:translateY(-2px);
  box-shadow:0 0 15px rgba(255,165,0,.45);
}

/* Compact stack on small screens */
@media (max-width: 820px){
  .main-header{
    display:grid;
    grid-template-columns: 1fr;
    grid-auto-rows: min-content;
    gap:8px;
    padding:10px 12px;
  }
  .nav-menu{ justify-content:center; }
  .main-header .buttons{ justify-content:center; flex-wrap:wrap; }
  .main-header .buttons .cta-service,
  .main-header .buttons .cta-quote{ font-size:16px; padding:10px 16px; }
}

/* Keep nav links on one line, shrink evenly on tiny screens */
@media (max-width: 480px){
  .nav-menu{
    width: 100%;
    flex-wrap: nowrap;
    gap: 0;
  }
  .nav-menu a{
    flex: 1 1 25%;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    padding: 8px 6px;
    font-size: clamp(11px, 3.4vw, 13px);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .main-header,
  .main-header .buttons .cta-service,
  .main-header .buttons .cta-quote,
  .nav-menu a{
    transition: none !important;
  }
}

/* =========================
   Intro Section
========================= */
.intro{
  padding: 0 1rem 2rem;
  background: #f4f4f4 url('img/home-back1.jpg') center/cover no-repeat;
  color:#fff;
  display:flex;
  justify-content:center;
  align-items:center;
  margin-top: calc(-1 * var(--hero-bleed));
}
.intro-content{ display:flex; justify-content:center; align-items:center; width:100%; }
.intro-grid{
  display:grid;
  align-items:center;
  grid-template-columns: repeat(2, 1fr);
  gap:20px;
  width:100%;
  max-width:1400px;
  margin:0 auto;
  padding-top: 2rem;
}

/* Home map */
.intro .google-map{ width:100%; display:flex; justify-content:center; }
.intro .google-map iframe{
  box-sizing: border-box;
  width: 600px;
  height: 400px;
  max-width: none;
  border: 5px solid #7A7A7A;
  border-radius: 26px;
  box-shadow: 0 4px 8px rgba(0,0,0,.2);
}
@media (max-width: 660px){
  .intro .google-map iframe{
    width: calc(100vw - 88px);
    height: 300px;
  }
}

.intro-text{
  padding:20px;
  text-align:center;
  text-shadow:2px 2px 4px rgba(0,0,0,.5);
}
.intro-text h2{ font-size:3rem; margin:0 0 15px; }
.intro-text p{ font-size:1.5rem; margin:0; }

/* Intro: stack on smaller screens */
@media (max-width: 1460px){
  .intro-grid{ grid-template-columns: 1fr; }
  .intro-text{ max-width: 620px; margin: 0 auto; }
}
@media (max-width: 700px){
  .intro-text h2{ font-size:2rem; }
  .intro-text p{ font-size:1.05rem; }
}

/* Hero image: bias right as screen gets smaller */
.intro{ background-position: 60% 50%; }
@media (max-width: 1400px){ .intro{ background-position: 70% 50%; } }
@media (max-width: 1024px){ .intro{ background-position: 80% 50%; } }
@media (max-width: 820px) { .intro{ background-position: 85% 50%; } }
@media (max-width: 560px) { .intro{ background-position: var(--intro-bg-mobile-x) var(--intro-bg-mobile-y) !important; } }

/* =========================
   Why Choose Us
========================= */
.why-choose-us{ padding:40px 20px; background:#f9f9f9; }
.why-choose-us .wcu-container{ max-width:1200px; margin:0 auto; text-align:center; }
.why-choose-us h2{ font-size:4em; margin:0 0 20px; color:#7A7A7A; }
.features{ display:flex; justify-content:space-around; flex-wrap:wrap; gap:20px; }
.feature{
  flex:1 1 280px;
  max-width:300px;
  padding:20px;
  background:#fff;
  border-radius:8px;
  box-shadow:0 4px 8px rgba(0,0,0,.1);
  text-align:center;
}
.feature img{ width:160px; height:160px; margin-bottom:10px; object-fit:contain; }
.feature h3{ font-size:1.5em; margin:0 0 10px; color:#005a9c; }
.feature p{ font-size:1em; color:#666; }

/* =========================
   Reviews
========================= */
.review{
  padding:75px 20px;
  display:flex;
  justify-content:space-evenly;
  align-items:center;
  gap:20px;
}
.face-review, .goog-review{ width:760px; max-height:900px; }
@media (max-width: 1100px){
  .review{ padding:40px 16px; flex-direction:column; }
  .face-review, .goog-review{ width:100%; max-width:760px; }
}

/* =========================
   FAQ
========================= */
.faq-section{ text-align:center; padding:40px 20px; background:#f9f9f9; }
.faq-section h2{ font-size:4em; margin:0 0 20px; color:#7A7A7A; }
.faq-container{ display:flex; justify-content:center; }
.faq-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:20px;
  max-width:1200px;
  width:100%;
  margin:0 auto;
  padding:20px;
}
.faq-item{
  background:#fff;
  padding:20px;
  border-radius:10px;
  transition: background-color .3s ease, transform .3s ease;
  cursor:pointer;
  max-width:400px;
  margin:0 auto;
  box-shadow:0 4px 8px rgba(0,0,0,.1);
  border:1px solid #ddd;
}
.faq-question{
  font-size:1.25rem;
  font-weight:bold;
  color:#005a9c;
  margin-bottom:10px;
  padding:10px;
  border-radius:5px;
  background:#F9F9F9;
}
.faq-item p{
  text-align:center;
  display:none;
  font-size:1rem;
  color:#666;
  margin-top:10px;
}
.faq-item:hover{ background:#f0f0f0; transform:scale(1.02); }
.faq-item:hover p{ display:block; }
@media (max-width: 980px){ .faq-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px){ .faq-grid{ grid-template-columns: 1fr; } }

/* =========================
   Contact Form Section
========================= */
.form-section{
  padding: 2rem 1rem;
  background: #f4f4f4 url('img/form-back1.jpg') center/cover no-repeat;
  color:#fff;
  display:flex;
  justify-content:center;
  align-items:center;
}
.form-container{ display:flex; justify-content:center; width:100%; }
.form-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap:20px;
  max-width:1200px;
  width:100%;
  margin:0 auto;
  padding:20px;
}
.form-text{ text-shadow:2px 2px 4px rgba(0,0,0,.5); }
.form-text h2{ font-size:3em; margin:0 0 20px; }

.contact-form{
  background: rgba(255,255,255,.85);
  color:#333;
  padding: 1rem;
  border-radius:28px;
  border:5px solid #7A7A7A;
  box-shadow:0 4px 8px rgba(0,0,0,.3);
  width: 580px;
  box-sizing:border-box;
}
.form-group{ margin-bottom:1rem; }
label{
  font-size:1.1rem;
  font-weight:bold;
  color:#005a9c;
  display:block;
  margin-bottom:.3rem;
}
input, select, textarea{
  width:100%;
  padding:.5rem;
  border:1px solid #ccc;
  border-radius:4px;
  font-size:.95rem;
  box-sizing:border-box;
}
textarea{ resize: vertical; }
.submit-btn{
  background:#007bff;
  padding:.75rem 1rem;
  color:#fff;
  border:none;
  border-radius:12px;
  font-size:1.2rem;
  cursor:pointer;
  transition: background-color .3s ease;
}
.submit-btn:hover{ background:#0056b3; }
.captcha{ margin-bottom:1rem; text-align:center; }

/* Netlify honeypot (accessible hide) */
.hp{ position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }

/* Modal */
.modal-overlay{
  position: fixed;
  inset: 0;
  padding: 16px;
  background: rgba(0,0,0,.6);
  z-index: 9999;

  /* hidden by default */
  display: none;
  pointer-events: none;
}
.modal-overlay[aria-hidden="false"]{
  display: grid;           /* center the dialog */
  place-items: center;
  pointer-events: auto;
}
/* (optional belt-and-braces if the element has the hidden attribute) */
[hidden].modal-overlay{ display: none !important; }

.modal{
  position:relative;
  background:#fff;
  color:#333;
  border-radius:12px;
  width:min(92vw, 520px);
  max-height:90vh;
  overflow:auto;
  padding:24px;
  box-shadow:0 10px 40px rgba(0,0,0,.2);
}
.modal h3{ margin:0 0 8px; font-size:clamp(1.15rem, 2.2vw, 1.5rem); }
.modal p{ margin:0 0 16px; line-height:1.5; }
.modal-close{
  position:absolute; top:10px; right:12px; border:0; background:transparent;
  font-size:24px; line-height:1; cursor:pointer;
}
.btn-ok{
  display:inline-block; border:0; padding:.65rem 1rem; border-radius:10px;
  background:#005a9c; color:#fff; font-size:1rem; cursor:pointer;
}
@media (prefers-reduced-motion: no-preference){
  .modal{ transform:translateY(8px); opacity:.01; transition:transform .18s ease, opacity .18s ease; }
  .modal-overlay[aria-hidden="false"] .modal{ transform:none; opacity:1; }
}

@media (max-width: 767px){
  .form-grid{ grid-template-columns: 1fr; }
  .contact-form{ width:100%; padding:1rem; }
}

/* Tiny screens: proportionally shrink the form a bit */
@media (max-width: 480px){
  .contact-form{
    width: min(var(--form-mobile-w), var(--form-mobile-max));
    margin: 0 auto;
    padding: var(--form-mobile-pad);
    border-width: var(--form-mobile-border);
    border-radius: var(--form-mobile-radius);
  }
  .form-grid{ gap: 14px; }
  label{ font-size: var(--form-mobile-label); }
  input, select, textarea{ font-size: var(--form-mobile-input); padding: .5rem; }
  .submit-btn{ font-size: var(--form-mobile-btn); padding: .65rem .9rem; }
}

/* reCAPTCHA: truly center the scaled widget on tiny screens */
@media (max-width: 480px){
  .contact-form .form-group{
    display: block;
    overflow: hidden; /* avoids hanging off to the right */
    text-align: center;
  }
  .contact-form .g-recaptcha{
    display: block;
    width: 302px;            /* intrinsic width of checkbox widget */
    height: 78px;            /* intrinsic height */
    transform-origin: top left;
    transform: scale(var(--recap-scale));
    margin-left: calc((100% - (302px * var(--recap-scale))) / 2);
  }
}

/* =========================
   Footer
========================= */
.footer{ background:#7A7A7A; color:#fff; }
.footer-container{ max-width:1200px; margin:0 auto; padding:20px; }

/* Two equal halves for images */
.footer-imgs{
  display:grid;
  grid-template-columns: 1fr 1fr;   /* left | right */
  align-items:center;
  justify-items:center;
  column-gap: clamp(16px, 5vw, 64px);
  margin-bottom:12px;
}
.footer-cell{ display:flex; justify-content:center; }
.footer-cell img{ display:block; width:100%; height:auto; }

/* Control sizes independently via wrapper widths */
.footer-logo{ width: clamp(140px, 28vw, 450px); }  /* logo size */
.footer-arc { width: clamp(120px, 20vw, 280px); }  /* ARC size */

/* Optional: push away from centre line */
.footer-imgs.away .footer-logo{ justify-content:flex-end; padding-right:clamp(8px,2vw,28px); }
.footer-imgs.away .footer-arc { justify-content:flex-start; padding-left: clamp(8px,2vw,28px); }

/* Footer text columns */
.footer-section{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:20px;
  text-align:center;
  flex-wrap:wrap;
}
.footer-sec{ flex:1 1 220px; max-width:300px; }
.footer-section h4{ margin:10px 0; }
.footer-section ul{ list-style:none; margin:0; padding:0; }
.footer-section li{ margin:5px 0; }
.footer-section a{ color:#ccc; text-decoration:none; }
.footer-section a:hover{ color:#fff; text-decoration:none; }
.footer-privacy{ text-align:center; margin-top:1rem; }
.footer-privacy a{ color:#ccc; text-decoration:none; }
.footer-privacy a:hover{ color:#fff; }

/* =========================
   Services Page
========================= */
.services{ padding:40px 20px; background:#fff; }
.services h2, .services h3{ color:#005a9c; }
.services p, .services ul{ margin-bottom:15px; }
.services a{ color:#005a9c; text-decoration:none; }
.services .container{ max-width:1200px; margin:0 auto; }
.services h2{ text-align:center; font-size:2.5em; margin-bottom:30px; }

/* Cards */
.service-card{
  background:#e0e0e0;
  border-radius:8px;
  padding:20px;
  margin-bottom:30px;
  box-shadow:0 2px 8px rgba(0,0,0,.1);
  min-width: 0; /* allow shrink on mobile */
}
.service-card h3{ margin-top:0; font-size:1.75em; }
.service-card ul{ list-style: disc; padding-left:20px; }
.service-card li{ margin-bottom:10px; font-size:1.1em; }

/* Plain images (non-pan) */
.service-card img {
  display:block;
  max-width:100%;
  height:auto;
  border-radius:6px;
  margin:0 auto 20px;
  object-fit:cover;
}

/* Pan-X wrapper (horizontal swipe on phones) */
.service-card .pan-x{
  position: relative;
  overflow: auto hidden;          /* horizontal scroll only */
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;            /* prefer sideways gestures */
  border-radius: 8px;
  background: transparent;
}
.service-card .pan-x img{
  display:block;
  margin:0;                       /* remove extra gap */
  border-radius:0;
}

/* Desktop: behave like a normal image */
@media (min-width: 821px){
  .service-card .pan-x{ max-height: 480px; } /* optional cap */
  .service-card .pan-x img{ width:100%; height:auto; }
}

/* Mobile: portrait viewport + horizontal pan (ZOOM) */
@media (max-width: 820px){
  .service-card .pan-x{
    aspect-ratio: 3 / 4;          /* portrait box */
  }
  .service-card .pan-x img{
    height:100% !important;       /* fill vertical -> image becomes wider */
    width:auto !important;        /* allow horizontal overflow */
    min-width:500%;               /* ensure there's something to swipe */
    object-fit:cover;
    object-position:center;
  }
}

/* =========================
   About Page (updated)
========================= */
.about{ background:#fff; padding:60px 20px; }
.about .container{ max-width:1000px; margin:0 auto; }
.about h2{
  text-align:center;
  font-size:2.4rem;
  margin:0 0 20px;
  color:#005a9c;
  text-shadow:1px 1px 2px rgba(0,0,0,.15);
}
.about h3{ font-size:1.4rem; margin:28px 0 10px; color:#005a9c; }
.about p, .about li{ font-size:1.05rem; color:#444; line-height:1.7; }
.about ul{ list-style:none; margin:0 0 10px 0; padding:0; }
.about ul li{ position:relative; padding-left:28px; margin:10px 0; }
.about ul li::before{
  content:"✓";
  position:absolute; left:0; top:0;
  color:#77C97E; font-weight:700;
}
@media (max-width: 768px){
  .about{ padding:36px 16px; }
  .about h2{ font-size:2rem; }
  .about h3{ font-size:1.2rem; }
  .about p, .about li{ font-size:1rem; }
}
