/* ==============================================
   GlendoraCAPlumbingPros.com — Shared Stylesheet
   Design 3: Route 66 Bold
   Primary: #4D7C0F (Foothill Olive)
   Accent:  #B45309 (Rust Amber)
   ============================================== */

:root {
  --c-olive:        #4D7C0F;
  --c-olive-dark:   #3a5e0c;
  --c-olive-deeper: #1f3506;
  --c-rust:         #B45309;
  --c-rust-dark:    #92400e;
  --c-cream:        #f9fdf5;
  --c-white:        #ffffff;
  --c-text:         #1a1a1a;
  --c-body:         #374151;
  --c-muted:        #6b7280;
  --c-border:       #e5e7eb;
  --c-card:         #f7fbf2;
  --font: system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --max-w: 1200px;
  --r: 8px;
}

/* === BASE RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font); color: var(--c-text);
  background: var(--c-white); line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--c-rust); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
p { font-size: 0.975rem; line-height: 1.7; color: var(--c-body); margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }

/* === SKIP LINK === */
.skip-link {
  position: absolute; top: -120%; left: 1rem; z-index: 999;
  background: var(--c-rust); color: var(--c-white);
  padding: 0.5rem 1rem; border-radius: 0 0 var(--r) var(--r);
  font-weight: 600; transition: top 0.2s;
}
.skip-link:focus { top: 0; color: var(--c-white); text-decoration: none; }

/* === LAYOUT === */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }

/* === HEADER === */
header {
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 200;
}
nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem;
}

/* Logo */
.nav-logo {
  color: var(--c-olive-dark); font-size: 1.05rem; font-weight: 700;
  border-left: 4px solid var(--c-rust); padding-left: 0.75rem;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.nav-logo:hover { color: var(--c-olive); text-decoration: none; }

/* Desktop nav links */
.nav-menu { display: flex; align-items: center; }
.nav-menu > li { position: relative; }
.nav-menu > li > a {
  display: flex; align-items: center; gap: 4px;
  color: #374151; font-size: 0.875rem; font-weight: 500;
  padding: 0 0.85rem; height: 64px; text-decoration: none;
  border-bottom: 2px solid transparent; transition: border-color 0.15s, color 0.15s;
}
.nav-menu > li > a:hover { border-bottom-color: var(--c-olive); color: var(--c-olive-dark); text-decoration: none; }
.nav-menu > li.active > a { border-bottom-color: var(--c-olive); color: var(--c-olive-dark); }

/* Dropdowns */
.nav-dropdown {
  position: absolute; top: 100%; left: 0; z-index: 190;
  background: var(--c-white); border: 1px solid var(--c-border);
  border-top: none; border-radius: 0 0 var(--r) var(--r);
  min-width: 250px; box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
}
.nav-menu > li:hover .nav-dropdown,
.nav-menu > li:focus-within .nav-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown li a {
  display: block; padding: 0.6rem 1rem 0.6rem 1rem;
  font-size: 0.85rem; color: #374151; text-decoration: none;
  border-bottom: 1px solid var(--c-border); transition: background 0.12s;
}
.nav-dropdown li:last-child a { border-bottom: none; }
.nav-dropdown li a:hover { background: var(--c-card); color: var(--c-olive-dark); text-decoration: none; }
.nav-dropdown .view-all a { color: var(--c-rust); font-weight: 500; border-top: 1px solid var(--c-border); }

/* Header phone button — icon + label desktop, icon only mobile */
.nav-phone {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem; background: var(--c-rust); color: var(--c-white);
  border-radius: 6px; text-decoration: none; font-weight: 600; min-height: 44px;
  white-space: nowrap; margin-left: 0.5rem;
}
.nav-phone:hover { background: var(--c-rust-dark); text-decoration: none; color: var(--c-white); }
.nav-phone-icon { font-size: 1.1rem; }
.nav-phone-label { font-size: 0.9rem; }

/* Mobile toggle button */
.mobile-toggle {
  display: none; background: none; border: 1px solid var(--c-border);
  border-radius: 6px; padding: 0; font-size: 1.2rem; cursor: pointer;
  color: var(--c-text); min-height: 44px; min-width: 44px;
  align-items: center; justify-content: center; margin-left: 0.5rem;
}

/* === STICKY MOBILE CTA === */
.sticky-cta {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  background: var(--c-rust); color: var(--c-white);
  padding: 0.85rem 1.5rem; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 1rem; text-decoration: none; min-height: 54px;
}
.sticky-cta:hover { background: var(--c-rust-dark); text-decoration: none; color: var(--c-white); }
.sticky-cta-number { font-size: 1.05rem; }

/* === IMAGE SLOTS === */
.image-slot {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: var(--r); display: flex; align-items: center;
  justify-content: center; color: #9ca3af; font-size: 0.875rem;
  overflow: hidden; margin: 1.5rem auto;
}
.image-slot span { padding: 1rem; text-align: center; line-height: 1.4; }

/* === HERO === */
.hero {
  background: var(--c-olive-dark); color: var(--c-white);
  padding: 2.5rem 1.5rem 0; text-align: center;
}
.hero-inner { max-width: var(--max-w); margin: 0 auto; }
.hero h1 {
  font-size: clamp(1.45rem, 2.8vw + 0.6rem, 2.2rem);
  font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 0.85rem;
  color: var(--c-white);
}
.hero-sub {
  font-size: 1rem; opacity: 0.9; line-height: 1.65;
  max-width: 620px; margin: 0 auto 1.5rem; color: var(--c-white);
}
.hero .image-slot {
  background: linear-gradient(135deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.16); color: rgba(255,255,255,0.48);
  border-radius: var(--r) var(--r) 0 0;
  max-width: 900px; margin: 0 auto;
}

/* CTA Band */
.cta-band {
  background: var(--c-rust); color: var(--c-white);
  padding: 1.1rem 1.5rem; text-align: center;
}
.cta-band > a {
  display: inline-block; color: var(--c-white);
  font-size: clamp(1.1rem, 2vw + 0.4rem, 1.4rem);
  font-weight: 700; text-decoration: none; letter-spacing: -0.01em;
}
.cta-band > a:hover { text-decoration: underline; color: var(--c-white); }
.cta-band > p { font-size: 0.8rem; opacity: 0.88; margin-top: 0.2rem; margin-bottom: 0; color: var(--c-white); }

/* === SECTIONS === */
.section { padding: 3rem 1.5rem; }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-alt { background: var(--c-cream); }
.section h2 {
  font-size: clamp(1.2rem, 1.5vw + 0.5rem, 1.5rem);
  font-weight: 600; color: var(--c-olive-dark); margin-bottom: 1rem;
}
.section-sub { color: var(--c-muted); font-size: 0.925rem; margin-bottom: 1.5rem; max-width: 65ch; }

/* === SERVICE GRID === */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 0.9rem; margin-top: 1.25rem;
}
.service-card {
  border-top: 3.5px solid var(--c-olive);
  padding: 0.9rem 0.85rem;
  background: var(--c-card);
  border-radius: 0 0 var(--r) var(--r);
  transition: border-top-color 0.15s;
}
.service-card:hover { border-top-color: var(--c-rust); }
.service-card h3 {
  font-size: 0.88rem; font-weight: 600;
  color: var(--c-olive-dark); margin-bottom: 0.35rem;
}
.service-card h3 a { color: var(--c-olive-dark); text-decoration: none; }
.service-card h3 a:hover { color: var(--c-rust); text-decoration: underline; }
.service-card p {
  font-size: 0.8rem; color: var(--c-muted);
  line-height: 1.5; margin-bottom: 0;
}

/* === FEATURE TRIO (Three top services) === */
.feature-trio {
  display: grid; gap: 1.25rem; margin-top: 1.25rem;
}
.feature-card {
  background: var(--c-white); border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-rust);
  border-radius: 0 var(--r) var(--r) 0; padding: 1.25rem;
}
.feature-card h3 {
  font-size: 1rem; font-weight: 600;
  color: var(--c-olive-dark); margin-bottom: 0.65rem;
}
.feature-card p { font-size: 0.9rem; color: var(--c-body); margin-bottom: 0; }

/* === SERVICE AREAS === */
.area-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 0.35rem 1rem; margin-top: 0.75rem; }
.area-cols a { font-size: 0.875rem; color: var(--c-rust); padding: 0.2rem 0; display: block; text-decoration: none; }
.area-cols a:hover { text-decoration: underline; }
.areas-sub-heading { margin-top: 1.75rem; font-size: 1rem; font-weight: 600; color: var(--c-olive-dark); margin-bottom: 0.5rem; }

/* === FAQ === */
.faq-list { margin-top: 1rem; border-top: 1px solid var(--c-border); }
details.faq-item { border-bottom: 1px solid var(--c-border); }
details.faq-item summary {
  padding: 1rem 1rem 1rem 0; font-weight: 600; font-size: 0.95rem;
  color: var(--c-text); cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  outline-offset: 2px;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: '+'; font-size: 1.25rem; color: var(--c-olive);
  flex-shrink: 0; font-weight: 400; transition: transform 0.2s;
}
details.faq-item[open] summary::after { content: '\2212'; }
.faq-body {
  padding: 0 0 1.1rem 0; font-size: 0.9rem;
  color: var(--c-body); line-height: 1.7; max-width: 65ch; margin-bottom: 0;
}
.faq-body a { color: var(--c-rust); }

/* === FINAL CTA SECTION === */
.cta-section {
  background: var(--c-olive-dark); color: var(--c-white);
  padding: 3rem 1.5rem; text-align: center;
}
.cta-section-inner { max-width: 640px; margin: 0 auto; }
.cta-section h2 { color: var(--c-white); margin-bottom: 0.75rem; }
.cta-section p { color: rgba(255,255,255,0.88); margin-bottom: 1.25rem; font-size: 0.975rem; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--c-rust); color: var(--c-white);
  padding: 0.85rem 1.75rem; border-radius: var(--r);
  font-size: 1.05rem; font-weight: 700; text-decoration: none;
}
.cta-btn:hover { background: var(--c-rust-dark); text-decoration: none; color: var(--c-white); }
.cta-addr { font-size: 0.8rem; opacity: 0.6; margin-top: 1rem; margin-bottom: 0; }
.cta-section .image-slot {
  background: linear-gradient(135deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.16); color: rgba(255,255,255,0.48);
  margin: 0 auto 1.75rem;
}

/* === FOOTER === */
footer {
  background: var(--c-olive-deeper); color: rgba(255,255,255,0.82);
  padding: 2.75rem 1.5rem 1.5rem;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem; margin-bottom: 2rem;
}
.footer-logo {
  color: var(--c-white); font-size: 1rem; font-weight: 700;
  display: block; margin-bottom: 0.6rem; text-decoration: none;
}
.footer-logo:hover { text-decoration: none; color: rgba(255,255,255,0.85); }
.footer-brand p { font-size: 0.82rem; opacity: 0.72; line-height: 1.6; max-width: 30ch; margin-bottom: 0.5rem; color: rgba(255,255,255,0.72); }
.footer-trust { font-size: 0.75rem; opacity: 0.55; }
footer h3 {
  color: var(--c-white); font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.85rem;
}
.footer-links li { margin-bottom: 0.45rem; }
.footer-links a {
  color: rgba(255,255,255,0.65); font-size: 0.82rem;
  text-decoration: none; transition: color 0.12s;
}
.footer-links a:hover { color: var(--c-white); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.25rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom p { font-size: 0.77rem; opacity: 0.5; margin-bottom: 0; color: rgba(255,255,255,0.5); }
.footer-bottom a { color: rgba(255,255,255,0.5); font-size: 0.77rem; text-decoration: none; }
.footer-bottom a:hover { color: var(--c-white); text-decoration: underline; }

/* === BREADCRUMB === */
.breadcrumb { padding: 0.75rem 1.5rem; max-width: var(--max-w); margin: 0 auto; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; }
.breadcrumb li { font-size: 0.8rem; color: var(--c-muted); }
.breadcrumb li + li::before { content: '/'; margin-right: 0.35rem; }
.breadcrumb a { color: var(--c-rust); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* === PROSE BLOCK === */
.prose p { max-width: 65ch; }

/* === VISIT-ALL LINK === */
.view-all-link {
  display: inline-block; margin-top: 1.25rem;
  color: var(--c-rust); font-weight: 600; font-size: 0.9rem;
}
.view-all-link:hover { text-decoration: underline; }

/* ===========================
   RESPONSIVE BREAKPOINTS
   =========================== */

/* Tablet ≤1023px */
@media (max-width: 1023px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .feature-trio { grid-template-columns: 1fr; }
}

/* Mobile ≤767px */
@media (max-width: 767px) {
  /* Nav collapses to drawer */
  .nav-menu {
    display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    background: var(--c-white); flex-direction: column; align-items: stretch;
    padding: 1rem 1.5rem 2rem; gap: 0; overflow-y: auto; z-index: 199;
    border-top: 1px solid var(--c-border);
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu > li > a {
    height: auto; padding: 0.8rem 0; border-bottom: 1px solid var(--c-border);
    border-top: none; width: 100%; font-size: 0.95rem;
  }
  .nav-menu > li > a:hover { border-bottom-color: var(--c-border); }
  .nav-dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-radius: 0; min-width: 0;
    display: none; padding-left: 0.75rem;
  }
  .nav-menu > li.is-open .nav-dropdown { display: block; }
  .nav-dropdown li a { border-bottom: 1px solid var(--c-border); font-size: 0.88rem; padding: 0.6rem 0; }
  .mobile-toggle { display: inline-flex; }

  /* Header phone: icon only, no label, no number */
  .nav-phone-label { display: none; }
  .nav-phone { min-width: 44px; padding: 0.6rem; justify-content: center; }

  /* Sticky CTA visible */
  .sticky-cta { display: flex; }
  body { padding-bottom: 58px; }

  /* Hero */
  .hero { padding: 2rem 1rem 0; }
  .hero h1 { font-size: 1.4rem; }

  /* Section padding */
  .section { padding: 2.25rem 1rem; }

  /* Service grid */
  .service-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

  /* Feature trio */
  .feature-trio { gap: 0.85rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  footer { padding: 2rem 1rem 1.25rem; }

  /* CTA band */
  .cta-band > a { font-size: 1.1rem; }
}

/* Small mobile ≤479px */
@media (max-width: 479px) {
  .service-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .area-cols { grid-template-columns: 1fr 1fr; }
  nav { padding: 0 1rem; }
  .section { padding: 2rem 1rem; }
}

/* Desktop: feature trio as 3 columns */
@media (min-width: 768px) {
  .feature-trio { grid-template-columns: repeat(3, 1fr); }
}

/* Widescreen */
@media (min-width: 1024px) {
  .feature-trio { grid-template-columns: repeat(3, 1fr); }
}

/* === INNER PAGE HERO === */
.page-hero { background: var(--c-olive-dark); color: var(--c-white); padding: 2rem 1.5rem; }
.page-hero-inner { max-width: var(--max-w); margin: 0 auto; }
.page-hero h1 { font-size: clamp(1.3rem, 2.5vw + 0.3rem, 1.8rem); font-weight: 600; line-height: 1.2; color: var(--c-white); margin-bottom: 0.4rem; }
.page-hero .hero-sub { font-size: 0.9rem; opacity: 0.88; color: var(--c-white); margin-bottom: 0; }

/* === TRUST CARDS (About) === */
.trust-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.trust-card { background: var(--c-card); border-radius: var(--r); padding: 1.1rem 1rem; border-top: 3px solid var(--c-rust); }
.trust-card h3 { font-size: 0.9rem; font-weight: 600; color: var(--c-olive-dark); margin-bottom: 0.5rem; }
.trust-card p { font-size: 0.85rem; color: var(--c-body); line-height: 1.6; margin-bottom: 0; }

/* === CONTACT PAGE === */
.contact-split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 2.5rem; align-items: start; }
.phone-primary { font-size: 1.5rem; font-weight: 700; color: var(--c-rust); display: block; text-decoration: none; margin-bottom: 0.25rem; }
.phone-primary:hover { text-decoration: underline; color: var(--c-rust-dark); }
.hours-table { margin-top: 0.75rem; border-collapse: collapse; }
.hours-table td { font-size: 0.875rem; color: var(--c-body); padding: 0.25rem 0; }
.hours-table td:first-child { padding-right: 1.5rem; font-weight: 500; color: var(--c-text); }
.info-cards { display: grid; gap: 0.85rem; }
.contact-info-card { background: var(--c-card); border-radius: var(--r); padding: 1.1rem; }
.contact-info-card h3 { font-size: 0.85rem; font-weight: 600; color: var(--c-olive-dark); margin-bottom: 0.5rem; text-transform: none; letter-spacing: 0; }
.contact-info-card p { font-size: 0.85rem; color: var(--c-body); line-height: 1.65; margin-bottom: 0; }

/* === CONTACT FORM === */
.contact-form { max-width: 620px; }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--c-text); margin-bottom: 0.4rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 0.65rem 0.85rem; border: 1px solid var(--c-border);
  border-radius: 6px; font-size: 0.95rem; font-family: var(--font);
  background: var(--c-white); color: var(--c-text); transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--c-olive); box-shadow: 0 0 0 2px rgba(77,124,15,0.12);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-submit {
  background: var(--c-rust); color: var(--c-white); border: none;
  padding: 0.85rem 2rem; border-radius: 6px; font-size: 1rem;
  font-weight: 600; cursor: pointer; min-height: 44px;
  font-family: var(--font); transition: background 0.15s; margin-top: 0.25rem;
}
.form-submit:hover { background: var(--c-rust-dark); }
.form-note { font-size: 0.8rem; color: var(--c-muted); margin-top: 0.75rem; margin-bottom: 0; }
.honeypot-field { display: none !important; }

@media (max-width: 767px) {
  .contact-split { grid-template-columns: 1fr; gap: 1.5rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-row .form-group:first-child { margin-bottom: 1.1rem; }
}
