/* ============================================================
   Septic Diagnostics — site.css (FULL FILE)
   Black + Green, senior-friendly, mobile-first.
   Includes:
   - Clean header reset (fixes overflow + stretching)
   - Boxed dropdown menu (stays on-screen)
   - Logo sizing rules (desktop + mobile)
   - Buttons, cards, sections, accordions
   - Form styling (contact.php)
   - Equipment card helpers
   - Mobile sticky CTA bar
   ============================================================ */

/* -------------------- Theme Tokens -------------------- */
:root{
  /* Brand */
  --black: #0b0f12;
  --green: #17a34a;
  --green2: #12823c;
  --green-soft: rgba(23,163,74,.12);

  /* Neutrals */
  --bg: #ffffff;
  --text: #0b0f12;
  --muted: #4b5563;
  --line: #e5e7eb;
  --soft: #f7faf8;
  --soft2: #f1f5f3;

  /* UI */
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --wrap: 1120px;

  /* Type */
  --base: 18.5px;
}

/* -------------------- Base / Reset -------------------- */
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: var(--base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img{ max-width:100%; height:auto; }
a{ color: inherit; text-decoration:none; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible{
  outline: 3px solid rgba(23,163,74,.35);
  outline-offset: 3px;
  border-radius: 12px;
}

/* Prevent accidental horizontal stretching */
html, body{ overflow-x: hidden; }

/* Wrapper */
.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 18px;
}

/* Typography helpers */
.section-title{
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.2;
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
}
.section-subtitle{
  margin: 0 0 18px 0;
  color: var(--muted);
  max-width: 70ch;
}
.lead{
  font-size: 1.05em;
  color: var(--muted);
  max-width: 70ch;
}
.note{ margin-top: 16px; color: var(--muted); }
.center{ text-align:center; }

/* -------------------- Buttons -------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border: 1px solid transparent;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 900;
  white-space: nowrap;
  user-select:none;
  transition: transform .04s ease, background .15s ease, border-color .15s ease, filter .15s ease;
}
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 20px rgba(23,163,74,.18);
}
.btn-primary:hover{ background: var(--green2); }

.btn-ghost{
  background: #fff;
  border-color: var(--line);
}
.btn-ghost:hover{ background: var(--soft); }

.btn-dark{
  background: var(--black);
  color: #fff;
}
.btn-dark:hover{ filter: brightness(.95); }

.btn-lg{ padding: 12px 16px; border-radius: 16px; }
.btn-xl{ padding: 14px 18px; border-radius: 18px; font-size: 1.02em; }

/* -------------------- Layout helpers -------------------- */
.grid{ display:grid; gap: 16px; }
.grid-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Cards */
.card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.card h3{
  margin: 0 0 8px 0;
  font-size: 20px;
  line-height: 1.25;
}
.card p{ margin: 0; color: var(--muted); }

.card-link{
  display:block;
  position: relative;
  overflow: hidden;
  transition: transform .06s ease, box-shadow .15s ease, border-color .15s ease;
}
.card-link::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width: 6px;
  background: var(--green);
  opacity: .9;
}
.card-link:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: rgba(23,163,74,.35);
}
.card-cta{
  display:inline-block;
  margin-top: 10px;
  font-weight: 950;
  color: var(--green2);
}

/* ============================================================
   HEADER (CLEAN RESET)
   Fixes: header stretching wider than content, logo squeeze on mobile
   ============================================================ */
.site-header{
  position: sticky;
  top: 0;
  z-index: 9990;      /* higher than page content */
}

.nav-dd{ position: relative; z-index: 9991; }

.nav-dd-panel{
  z-index: 9999;      /* highest */
}


.header-inner{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;

  overflow: visible;  /* IMPORTANT: allow dropdown to show */
}


/* Logo */
.brand{
  flex: 0 1 auto;
  min-width: 180px;  /* prevents tiny logo */
  display: flex;
  align-items: center;
}
.brand-logo{
  display:block;
  height: 64px;      /* desktop */
  width: auto;
  max-width: 320px;
}

/* Center menu */
.nav{
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

/* Actions right */
.header-actions{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ----- Dropdown Menu (boxed) ----- */
.nav-dd{
  position: relative;
  display: inline-block;
}
.nav-dd-btn{
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 900;
  user-select: none;
}
.nav-dd-btn::-webkit-details-marker{ display:none; }

.nav-dd-panel{
  display: none;
  position: absolute;
  top: calc(100% + 10px);

  /* Center under the button on desktop */
  left: 50%;
  transform: translateX(-50%);

  width: min(92vw, 360px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 9999;
}
.nav-dd[open] .nav-dd-panel{ display:block; }

.nav-dd-panel a{
  display:block;
  padding: 12px 12px;
  border-radius: 12px;
  font-weight: 900;
  color: var(--black);
}
.nav-dd-panel a:hover{ background: var(--soft); }

/* Mobile header rules */
@media (max-width: 720px){
  /* Hide header buttons on mobile — sticky bar becomes main CTA */
  .header-actions{ display: none; }

  /* Keep logo big and left, not squeezed */
  .brand{ min-width: 220px; }
  .brand-logo{ height: 56px; max-width: 260px; }

  /* Dropdown opens aligned to the right edge so it never goes off-screen */
  .nav{ justify-content: flex-end; }
  .nav-dd-panel{
    left: auto;
    right: 0;
    transform: none;
    width: min(92vw, 360px);
  }
}

/* ===========================
   GALLERY
   =========================== */

.gallery-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery-item{
  display:block;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.gallery-item img{
  display:block;
  width:100%;
  height: 220px;
  object-fit: cover;
}

@media (max-width: 980px){
  .gallery-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-item img{ height: 210px; }
}
@media (max-width: 720px){
  .gallery-grid{ grid-template-columns: 1fr; }
  .gallery-item img{ height: 240px; }
}

/* --- Lightbox (no JS) using :target --- */
.lightbox{
  display: none !important; /* FORCE hidden everywhere */
}

.lightbox:target{
  display: block !important;   /* ONLY show the one that is targeted */
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.lightbox-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
}

.lightbox-panel{
  position: relative;
  margin: 6vh auto 0 auto;
  width: min(980px, 92vw);
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lightbox-panel img{
  display:block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  background: #000;
}

.lightbox-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  font-weight: 900;
}

.lightbox-actions{
  padding: 14px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 720px){
  .lightbox-panel{ margin-top: 3vh; }
  .lightbox-actions{ justify-content: stretch; }
  .lightbox-actions .btn{ flex: 1; }
}


/* ============================================================
   HERO + SECTIONS
   ============================================================ */
.hero{
  padding: 34px 0 18px 0;
  background:
    radial-gradient(900px 260px at 20% 10%, var(--green-soft), transparent 55%),
    linear-gradient(180deg, var(--soft) 0%, #fff 65%);
  border-bottom: 1px solid var(--line);
}
.hero-inner{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}
.eyebrow{
  display:inline-flex;
  gap:10px;
  align-items:center;
  margin: 0 0 8px 0;
  color: var(--muted);
  font-weight: 900;
}
.eyebrow::before{
  content:"";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(23,163,74,.12);
}
.hero h1{
  margin: 0 0 10px 0;
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.cta-row{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 10px 0;
}
.trust{
  margin: 10px 0 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.trust li{ margin: 4px 0; }

.sidecard{
  border: 1px solid rgba(23,163,74,.25);
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.sidecard-title{ margin: 0 0 6px 0; font-size: 18px; }
.sidecard-text{ margin: 0 0 10px 0; color: var(--muted); }
.sidecard-link{ font-weight: 950; color: var(--green2); }

.choices, .services, .how, .reviews, .area{ padding: 34px 0; }

.emergency{
  padding: 34px 0;
  background: var(--soft2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.emergency-inner{
  display:grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 16px;
  align-items: start;
}
.checklist{ margin: 12px 0 16px 0; padding-left: 22px; }
.checklist li{ margin: 8px 0; }

.callout{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.callout h3{ margin: 0 0 8px 0; font-size: 20px; }
.callout p{ margin: 0 0 12px 0; color: var(--muted); }

/* Accordion (details/summary) */
.accordion{
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}
.accordion summary{
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 950;
}
.accordion summary::-webkit-details-marker{ display:none; }
.accordion[open] summary{
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.accordion-body{ padding: 14px 16px; color: var(--muted); }

/* Steps */
.step{
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
}
.step-num{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--soft);
  border: 1px solid rgba(23,163,74,.25);
  display:grid;
  place-items:center;
  font-weight: 950;
  margin-bottom: 10px;
  color: var(--green2);
}
.step h3{ margin: 0 0 6px 0; font-size: 20px; }
.step p{ margin: 0; color: var(--muted); }

/* Quotes */
.quote{
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
}
.quote blockquote{
  margin: 0 0 10px 0;
  font-weight: 900;
  color: var(--text);
}
.quote figcaption{ color: var(--muted); font-size: 0.95em; }

/* Area */
.area{
  background:
    radial-gradient(900px 240px at 80% 40%, var(--green-soft), transparent 58%),
    linear-gradient(180deg, #fff 0%, var(--soft) 100%);
  border-top: 1px solid var(--line);
}
.area-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 16px;
}

/* -------------------- Footer -------------------- */
.site-footer{
  border-top: 1px solid var(--line);
  padding: 26px 0 86px 0; /* room for mobile bar */
  background: #fff;
}
.footer-inner{
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  color: var(--muted);
}
.footer-links{
  display:flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.footer-links a{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 900;
  color: var(--black);
}
.footer-links a:hover{ background: var(--soft); }
.site-footer a.phone{ font-weight: 950; color: var(--black); }

/* -------------------- Mobile Sticky CTA Bar -------------------- */
.mobile-bar{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display:none;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.mobile-bar-btn{
  flex: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 14px 12px;
  border-radius: 18px;
  font-weight: 950;
}
.mobile-bar-call{
  background: #fff;
  border: 1px solid var(--line);
}
.mobile-bar-book{
  background: var(--green);
  color: #fff;
}

/* -------------------- Forms (contact.php) -------------------- */
.form-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field{ display:block; }
.field span{
  display:block;
  font-weight: 900;
  margin-bottom: 6px;
}
.field input, .field select, .field textarea{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1em;
}
.field textarea{ resize: vertical; }
.field-full{ grid-column: 1 / -1; }

.form-actions{
  margin-top: 14px;
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* -------------------- Equipment helpers -------------------- */
.equip .equip-photo{
  display:block;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid var(--line);
  background: #fff;
}
.equip .equip-photo img{
  display:block;
  width:100%;
  height:auto;
}
.equip .equip-tag{
  margin: 8px 0 10px 0;
  font-weight: 900;
  color: var(--green2);
}
.equip-list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.equip-list li{ margin: 6px 0; }
.equip-text{ margin: 0; color: var(--muted); }

/* -------------------- Responsive -------------------- */
@media (max-width: 980px){
  .hero-inner{ grid-template-columns: 1fr; }
  .emergency-inner{ grid-template-columns: 1fr; }
  .area-inner{ flex-direction: column; align-items:flex-start; }
}
@media (max-width: 860px){
  .grid-3{ grid-template-columns: 1fr; }
  .form-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 720px){
  body{ font-size: 19px; }

  /* Main CTA on mobile */
  .mobile-bar{ display:flex; }

  /* Hide hero CTAs on mobile (avoid duplicates with sticky bar) */
  .cta-row{ display:none; }
}

/* -------------------- Hard-force brand colors (prevents blue buttons) -------------------- */
.btn-primary{ background: var(--green) !important; }
.btn-primary:hover{ background: var(--green2) !important; }
.mobile-bar-book{ background: var(--green) !important; color:#fff !important; }

/* ---------------- ADDING FIX -----------------------*/

@media (max-width: 720px){
  .brand-logo{
    height: 68px;         /* make it clearly bigger */
    max-width: 85vw;      /* allow it to be wide */
  }
}

@media (max-width: 720px){
  .brand{
    min-width: 0;
    max-width: 85vw;
  }
}

/* ===== Mobile logo: give it room + make it bigger ===== */
@media (max-width: 720px){

  /* Let the logo take available space */
  .brand{
    flex: 1 1 auto;     /* <-- key: logo can grow */
    min-width: 0;
    max-width: none;
  }

  /* Make the logo physically larger */
  .brand-logo{
    height: 68px;       /* try 68; bump to 72 if you want bigger */
    width: auto;
    max-width: none;    /* <-- key: remove the cap that keeps it small */
    display: block;
  }

  /* Keep menu from stealing space */
  .nav{
    flex: 0 0 auto;
    justify-content: flex-end;
  }
}

.brand-logo{
  height: 64px;
  width: auto;
  max-width: 320px;
}

/* Mobile */
@media (max-width: 720px){
  .brand-logo{
    height: 64px;      /* SAME size as desktop if you want */
    max-width: 90vw;   /* allows it to be wide */
  }
}

/* Dropdown grouping inside nav panel */
.nav-group{
  margin: 6px 0;
  padding: 6px 6px 8px 6px;
  border-radius: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.nav-group-head{
  display:block;
  padding: 12px 12px;
  border-radius: 12px;
  font-weight: 950;
}

.nav-sub{
  padding: 4px 0 0 0;
}

.nav-sub a{
  display:block;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 900;
  color: var(--black);
  opacity: .95;
}

.nav-sub a:hover{ background: #fff; }

/* ===== Dropdown submenu (Services group) ===== */

/* keep the panel links clean */
.nav-dd-panel > a{
  display:block;
  padding: 12px 12px;
  border-radius: 12px;
  font-weight: 900;
  color: var(--black);
}
.nav-dd-panel > a:hover{ background: var(--soft); }

/* group container */
.nav-dd-panel .nav-group{
  margin: 6px 0;
  padding: 6px;
  border-radius: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
}

/* "Services" header row inside group */
.nav-dd-panel .nav-group-head{
  display:block;
  padding: 12px 12px;
  border-radius: 12px;
  font-weight: 950;
  background: #fff;
  border: 1px solid var(--line);
}
.nav-dd-panel .nav-group-head:hover{ background: #fff; }

/* sub-links: slightly indented + lighter */
.nav-dd-panel .nav-sub{
  padding-top: 6px;
}
.nav-dd-panel .nav-sub a{
  display:block;
  padding: 10px 12px 10px 18px; /* indent */
  border-radius: 12px;
  font-weight: 850;
  color: var(--black);
  opacity: .95;
}
.nav-dd-panel .nav-sub a:hover{ background: #fff; }


