/*
Theme Name: ESV Theme v13b (SEO + iPhone Header Fix)
Author: ChatGPT
Version: 3.2.1
Description: Custom theme for Environmental Services of Virginia. Landing gate has no header. Main pages are built into the theme (Home/Services/Hooklift/Drainfields/Contact).
*/

/* Base */
:root {
  --bg: #0b0b0b;
  --panel: #141414;
  --text: #f4f4f4;
  --muted: rgba(255,255,255,.72);
  --line: rgba(255,255,255,.12);
  --accent: #ff8a00; /* contractor orange */
  --accent2: #ffffff;
}
* { box-sizing: border-box; }
body { margin:0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.5; color: #111; background: #fff; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); color: var(--text); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1180px; margin: 0 auto; padding: 14px 18px; display:flex; align-items:center; justify-content:space-between; gap: 16px; }
.brand a { color: var(--text); text-decoration:none; font-weight: 900; letter-spacing: .02em; }
.brand small { display:block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.nav-menu { display:flex; flex-wrap:wrap; gap: 10px; justify-content:flex-end; }
.nav-menu a { color: rgba(255,255,255,.92); text-decoration:none; font-weight: 750; font-size: 14px; padding: 8px 10px; border-radius: 12px; }
.nav-menu a:hover { background: rgba(255,255,255,.10); }
.nav-cta a { background: var(--accent); color: #111; }
.nav-cta a:hover { background: #ff9e2a; }

/* Layout */
.container { max-width: 1180px; margin: 0 auto; padding: 30px 18px; }
.section { padding: 44px 0; }
.section-tight { padding: 26px 0; }
.h2 { font-size: 34px; margin: 0 0 10px 0; }
.p { margin: 0; color: rgba(0,0,0,.72); }

/* Hero */
.hero { position: relative; min-height: 78vh; display:flex; align-items:center; justify-content:center; text-align:center; padding: 80px 18px; background: #000; color: var(--text); overflow:hidden; }
.hero::before {
  content:"";
  position:absolute; inset:0;
  background: url("https://esvirginia.com/wp-content/uploads/2026/01/truck.jpg") center/cover no-repeat;
  transform: scale(1.02);
}
.hero::after {
  content:"";
  position:absolute; inset:0;
  background: rgba(0,0,0,.62);
}
.hero-inner { position:relative; z-index:2; max-width: 980px; }
.hero h1 { font-size: 56px; line-height: 1.05; margin: 0 0 10px 0; font-weight: 900; }
.hero p { margin: 0 0 18px 0; color: rgba(255,255,255,.82); letter-spacing: .08em; text-transform: uppercase; font-size: 14px; }
.hero .sub { margin-top: 10px; letter-spacing: 0; text-transform:none; font-size: 18px; color: rgba(255,255,255,.86); }
.btn-row { display:flex; gap: 12px; justify-content:center; flex-wrap:wrap; margin-top: 18px; }
.btn { display:inline-block; padding: 14px 20px; border-radius: 12px; font-weight: 900; letter-spacing: .04em; text-decoration:none; }
.btn.primary { background: var(--accent); color: #111; }
.btn.primary:hover { background: #ff9e2a; }
.btn.ghost { background: rgba(255,255,255,.10); color: var(--text); border: 1px solid rgba(255,255,255,.18); }
.btn.ghost:hover { background: rgba(255,255,255,.14); }

/* Cards */
.grid { display:grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.card { grid-column: span 6; background: #fff; border: 1px solid rgba(0,0,0,.10); border-radius: 18px; padding: 18px; }
.card h3 { margin: 0 0 8px 0; font-size: 22px; }
.card p { margin: 0 0 12px 0; color: rgba(0,0,0,.72); }
.card ul { margin: 0 0 14px 18px; color: rgba(0,0,0,.72); }
.card .btn { padding: 12px 16px; border-radius: 12px; }
.card .btn.primary { background: #111; color: #fff; }
.card .btn.primary:hover { background:#222; }
.badge { display:inline-block; font-size: 12px; font-weight: 800; letter-spacing:.08em; text-transform:uppercase; padding: 6px 10px; border-radius: 999px; background: rgba(0,0,0,.06); }

/* Highlight band */
.band { background: var(--bg); color: var(--text); padding: 44px 0; }
.band h2 { margin: 0 0 10px 0; font-size: 34px; }
.band p { margin: 0 0 18px 0; color: var(--muted); }

/* Footer */
.site-footer { background: var(--bg); color: var(--muted); border-top: 1px solid var(--line); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 22px 18px; font-size: 14px; display:flex; justify-content:space-between; flex-wrap:wrap; gap: 10px; }
.footer-inner a { color: var(--text); text-decoration: underline; }

/* Responsive */
@media (max-width: 900px) {
  .hero h1 { font-size: 40px; }
  .card { grid-column: span 12; }
}


/* === ESV Hooklift Pro Components === */

.esv-page-hero {
  position: relative;
  min-height: 78vh;
  display:flex;
  align-items:center;
  color: var(--text);
  background: #000;
  overflow:hidden;
}
.esv-page-hero__bg {
  position:absolute;
  inset:0;
  background-position:center;
  background-size:cover;
  transform: scale(1.03);
}
.esv-page-hero::after {
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.84));
}
.esv-page-hero__inner {
  position:relative;
  z-index:2;
  padding-top: 64px;
  padding-bottom: 64px;
}
.esv-kicker {
  display:inline-block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing:.16em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  margin-bottom: 14px;
}
.esv-title {
  margin: 0 0 10px 0;
  font-size: 52px;
  line-height: 1.05;
  color: #fff;
}
.esv-lead {
  margin: 0 0 18px 0;
  color: rgba(255,255,255,.85);
  font-size: 18px;
  max-width: 860px;
}
.esv-cta-row {
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items:center;
  justify-content:center;
  margin-top: 10px;
}
.esv-metrics {
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  max-width: 820px;
}
.esv-metric {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  padding: 14px 14px;
  text-align: left;
}
.esv-metric__top {
  font-size: 26px;
  font-weight: 950;
  color: #fff;
  letter-spacing: .02em;
}
.esv-metric__bot {
  font-size: 13px;
  color: rgba(255,255,255,.82);
}

.esv-split {
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  align-items: start;
}
.esv-split__media {
  position: relative;
}
.esv-media-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
}
.esv-media-card img {
  display:block;
  width: 100%;
  height: auto;
}
.esv-media-card__caption {
  padding: 12px 14px;
  color: rgba(0,0,0,.72);
  font-size: 14px;
}

.esv-checklist {
  margin: 12px 0 0 18px;
  color: rgba(0,0,0,.72);
}
.esv-checklist li { margin: 6px 0; }

.esv-band {
  background: #f6f6f6;
  padding: 44px 0;
}
.esv-band__title {
  margin: 0 0 10px 0;
  font-size: 34px;
}
.esv-pill-grid {
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}
.esv-pill {
  display:inline-block;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  font-weight: 800;
  font-size: 13px;
}

.esv-size-grid {
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.esv-size-card {
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  overflow:hidden;
}
.esv-size-card__head {
  background: #111;
  color: #fff;
  padding: 14px 16px;
  font-weight: 950;
  letter-spacing: .03em;
}
.esv-size-card__body {
  padding: 14px 16px;
  color: rgba(0,0,0,.72);
}

.esv-cta-strip {
  margin-top: 22px;
  border-radius: 18px;
  background: #111;
  color: #fff;
  padding: 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  border: 1px solid rgba(255,255,255,.10);
}
.esv-cta-strip__title {
  font-weight: 950;
  font-size: 18px;
}
.esv-cta-strip__sub {
  color: rgba(255,255,255,.78);
  font-size: 14px;
  margin-top: 2px;
}

.esv-steps {
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.esv-step {
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  display:flex;
  gap: 12px;
  align-items:flex-start;
}
.esv-step__num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #111;
  color:#fff;
  font-weight: 950;
  display:flex;
  align-items:center;
  justify-content:center;
}

.esv-band--dark {
  background: #0b0b0b;
  color: #fff;
}
.esv-band__dark-inner .esv-band__title { color:#fff; }
.esv-band__sub {
  margin: 0 0 16px 0;
  color: rgba(255,255,255,.80);
}

@media (max-width: 980px) {
  .esv-title { font-size: 40px; }
  .esv-split { grid-template-columns: 1fr; }
  .esv-size-grid { grid-template-columns: 1fr; }
  .esv-cta-strip { flex-direction: column; align-items:flex-start; }
  .esv-steps { grid-template-columns: 1fr; }
  .esv-metrics { grid-template-columns: 1fr; }
}


/* Header CTA Buttons */
.nav-cta {
  display:flex;
  gap:10px;
  margin-left:14px;
}
.portal-btn {
  background:#fff;
  color:#111;
  padding:8px 14px;
  border-radius:8px;
  font-weight:900;
  font-size:13px;
}
.portal-btn:hover { background:#f2f2f2; }
.book-btn {
  background:var(--accent,#ff8a00);
  color:#111;
  padding:8px 14px;
  border-radius:8px;
  font-weight:900;
  font-size:13px;
}
.book-btn:hover { background:#ffa133; }

@media(max-width:900px){
  .nav-cta { flex-wrap:wrap; }
}


/* === Portal + Order Buttons (Header & Hooklift) === */
.nav-cta {
  display:flex;
  gap:10px;
  align-items:center;
  margin-left:14px;
  flex-wrap:wrap;
}
.portal-btn {
  background:#fff !important;
  color:#111 !important;
  padding:8px 14px !important;
  border-radius:10px !important;
  font-weight:950 !important;
  font-size:13px !important;
  letter-spacing:.06em !important;
  text-transform:uppercase !important;
  border:1px solid rgba(0,0,0,.10) !important;
}
.portal-btn:hover { background:#f2f2f2 !important; }
.book-btn {
  background:var(--accent,#ff8a00) !important;
  color:#111 !important;
  padding:8px 14px !important;
  border-radius:10px !important;
  font-weight:950 !important;
  font-size:13px !important;
  letter-spacing:.06em !important;
  text-transform:uppercase !important;
  border:1px solid rgba(0,0,0,.10) !important;
}
.book-btn:hover { background:#ffa133 !important; }

.esv-link-band {
  background:#111;
  color:#fff;
  padding:44px 0;
}
.esv-link-band__inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.esv-link-band__kicker {
  display:inline-block;
  font-size:12px;
  font-weight:950;
  letter-spacing:.16em;
  text-transform:uppercase;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.16);
  margin-bottom:10px;
}
.esv-link-band__title {
  margin:0 0 6px 0;
  font-size:30px;
  color:#fff;
}
.esv-link-band__sub {
  margin:0;
  color:rgba(255,255,255,.78);
}
.esv-link-band__actions {
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

@media(max-width:900px){
  .esv-link-band__title { font-size:24px; }
}

/* === ESV Gallery === */
.esv-gallery{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px; /* tighter = more professional */
}
.esv-gallery__item{
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.10);
  background:#fff;
  transform: translateY(0);
  transition: transform .18s ease, box-shadow .18s ease;
}
.esv-gallery__item:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.12);
}
.esv-gallery__item img{
  display:block;
  width:100%;
  height: 160px; /* ~25% smaller than 220px */
  object-fit: cover;
  transform: scale(1.0);
  transition: transform .22s ease;
}
.esv-gallery__item:hover img{
  transform: scale(1.03);
}
@media(max-width:980px){
  .esv-gallery{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .esv-gallery__item img{ height: 150px; }
}
@media(max-width:520px){
  .esv-gallery{ grid-template-columns: 1fr; }
  .esv-gallery__item img{ height: 170px; }
}





/* === v3 Header CTA Fix: keep Portal/Login + Order Container side-by-side === */
.nav-cta{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:nowrap !important; /* do not stack */
}
.nav-cta a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  white-space:nowrap !important;
}
/* On small screens, shrink padding/font instead of wrapping */
@media(max-width:480px){
  .portal-btn, .book-btn{
    padding:7px 10px !important;
    font-size:12px !important;
    letter-spacing:.04em !important;
  }
}


/* Header right wrapper */
.esv-header-right{
  display:flex;
  align-items:center;
  gap:14px;
}

/* === ESV Lightbox === */
.esv-lightbox-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0,0,0,.86);
}
.esv-lightbox-modal.is-open{ display:flex; }
.esv-lightbox-inner{
  position: relative;
  max-width: min(1100px, 96vw);
  max-height: 92vh;
}
.esv-lightbox-img{
  display:block;
  width: auto;
  height: auto;
  max-width: 96vw;
  max-height: 86vh;
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
}
.esv-lightbox-close{
  position:absolute;
  top: -12px;
  right: -12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(0,0,0,.55);
  color:#fff;
  font-weight: 950;
  cursor:pointer;
}
.esv-lightbox-nav{
  position:absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(0,0,0,.55);
  color:#fff;
  font-weight: 950;
  cursor:pointer;
}
.esv-lightbox-prev{ left: -60px; }
.esv-lightbox-next{ right: -60px; }
@media(max-width:900px){
  .esv-lightbox-prev{ left: 10px; }
  .esv-lightbox-next{ right: 10px; }
}

/* === Hooklift Online CTA === */
.esv-online-cta{
  background: linear-gradient(135deg, #111, #1b1b1b);
  color:#fff;
  border-top: 4px solid var(--accent,#ff8a00);
  border-bottom: 1px solid rgba(255,255,255,.10);
  padding: 34px 0;
}
.esv-online-cta__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.esv-online-cta__kicker{
  display:inline-block;
  font-size:12px;
  font-weight:950;
  letter-spacing:.18em;
  text-transform:uppercase;
  padding: 8px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  margin-bottom: 10px;
}
.esv-online-cta__title{
  margin:0;
  font-size: 28px;
  font-weight: 950;
  color:#fff;
}
.esv-online-cta__sub{
  margin:6px 0 0 0;
  color: rgba(255,255,255,.78);
}
.esv-online-cta__actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.esv-online-cta .portal-btn,
.esv-online-cta .book-btn{
  padding: 12px 18px !important;
  font-size: 14px !important;
  border-radius: 12px !important;
}
@media(max-width:520px){
  .esv-online-cta__title{ font-size: 22px; }
}





/* === Home Two Column (Badass) === */
.esv-home-split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 10px;
}
.esv-home-box{
  position:relative;
  background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,0));
  border:1px solid rgba(0,0,0,.10);
  border-radius:22px;
  padding:28px;
  box-shadow:0 14px 44px rgba(0,0,0,.07);
  overflow:hidden;
}
.esv-home-box:before{
  content:"";
  position:absolute;
  inset:0;
  opacity:.06;
  background:
    radial-gradient(circle at 18% 18%, var(--accent,#ff8a00), transparent 55%),
    radial-gradient(circle at 85% 30%, #000, transparent 55%);
  pointer-events:none;
}
.esv-home-box__kicker{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:950;
  letter-spacing:.16em;
  text-transform:uppercase;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(0,0,0,.06);
  border:1px solid rgba(0,0,0,.08);
}
.esv-home-box h2{
  position:relative;
  margin:14px 0 8px 0;
  font-size:28px;
  font-weight:950;
}
.esv-home-box p{
  position:relative;
  margin:0 0 12px 0;
  color: rgba(0,0,0,.70);
}
.esv-home-points{
  position:relative;
  list-style:none;
  margin:14px 0 0 0;
  padding:0;
}
.esv-home-points li{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin:10px 0;
  color: rgba(0,0,0,.80);
}
.esv-home-points li:before{
  content:"✓";
  display:inline-flex;
  width:22px;
  height:22px;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background: rgba(255,138,0,.14);
  border: 1px solid rgba(255,138,0,.28);
  font-weight:950;
  flex: 0 0 22px;
  margin-top:1px;
}
.esv-home-actions{
  position:relative;
  display:flex;
  gap:12px;
  margin-top:18px;
  flex-wrap:wrap;
}
.esv-home-actions .btn{
  margin-top:0 !important;
}
.esv-home-box--hooklift{
  border-top:4px solid var(--accent,#ff8a00);
}
.esv-home-box--drain{
  border-top:4px solid rgba(0,0,0,.55);
}
@media(max-width:900px){
  .esv-home-split{ grid-template-columns:1fr; }
}



/* === v13b iPhone Header Fix === */
.esv-header, .site-header{ overflow-x:hidden; }
.esv-header .container, .site-header .container, header .container{
  width:100%;
  max-width:1200px;
}
/* Make header layout wrap safely on iPhone so buttons don't spill off-screen */
.esv-header .header-inner, .site-header .header-inner, .header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
/* Portal + Order buttons */
.nav-cta{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:nowrap !important;
  max-width:100% !important;
  margin-left:auto !important;
}
.nav-cta a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  white-space:nowrap !important;
}
/* On phones: center the CTA row under nav instead of pushing to the right */
@media(max-width: 820px){
  .nav-cta{
    width:100% !important;
    justify-content:center !important;
    margin-left:0 !important;
  }
}
/* Shrink buttons a touch on small iPhones */
@media(max-width: 420px){
  .portal-btn, .book-btn{
    padding:7px 10px !important;
    font-size:12px !important;
    letter-spacing:.04em !important;
  }
}
