/* ============================================================
   Altadena Plumbing Pros — Global Stylesheet
   Design: Teal Nav + Split Sidebar (Design 3)
   Primary: #C2410C (Foothill Terracotta)
   Accent:  #0F766E (Deep Teal)
   ============================================================ */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: #1c1917;
  background: #fff;
  line-height: 1.65;
  font-size: 1rem;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: #C2410C;
  color: #fff;
  padding: .5rem 1rem;
  font-weight: 700;
  z-index: 9999;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  color: #0d1117;
}
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); }
h3 { font-size: 1.1rem; }

p { margin-bottom: 1.25rem; max-width: 72ch; }
p:last-child { margin-bottom: 0; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 3.5rem 0; }

/* ---------- Navigation ---------- */
.site-nav {
  background: #0F766E;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

.nav-logo {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: .25rem;
  align-items: center;
}

.nav-menu > li { position: relative; }

.nav-menu > li > a,
.nav-menu > li > button {
  display: flex;
  align-items: center;
  gap: .3rem;
  color: rgba(255,255,255,.9);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  padding: .5rem .75rem;
  border-radius: 4px;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

.nav-menu > li > a:hover,
.nav-menu > li > button:hover,
.nav-menu > li > a:focus,
.nav-menu > li > button:focus {
  background: rgba(255,255,255,.12);
  outline: none;
}

.nav-menu > li > a:focus-visible,
.nav-menu > li > button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.dropdown-icon {
  font-size: .65rem;
  transition: transform .2s;
}
[aria-expanded="true"] .dropdown-icon { transform: rotate(180deg); }

/* Dropdown panel */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  min-width: 240px;
  z-index: 200;
  padding: .5rem 0;
}
.dropdown.is-open { display: block; }

.dropdown a {
  display: block;
  padding: .55rem 1.1rem;
  font-size: .875rem;
  color: #374151;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.dropdown a:hover,
.dropdown a:focus { background: #f3f4f6; color: #C2410C; outline: none; }
.dropdown a:focus-visible { outline: 2px solid #C2410C; outline-offset: -2px; }

.dropdown-divider {
  height: 1px;
  background: #e5e7eb;
  margin: .4rem 0;
}
.dropdown .view-all {
  color: #0F766E;
  font-weight: 600;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  color: #fff;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Sticky phone CTA */
.nav-phone {
  background: #C2410C;
  color: #fff !important;
  font-weight: 700;
  font-size: .875rem;
  padding: .55rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}
.nav-phone:hover { background: #9a3412; }
.nav-phone:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Trust bar ---------- */
.trust-bar {
  background: #C2410C;
  padding: .7rem 1.25rem;
}
.trust-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  align-items: center;
  justify-content: center;
}
.trust-item {
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.trust-check { color: rgba(255,255,255,.8); }

/* ---------- Hero (homepage) ---------- */
.hero {
  display: grid;
  grid-template-columns: 58% 42%;
  min-height: 420px;
}

.hero-content {
  padding: 3.5rem 2.5rem 3.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}

.hero-eyebrow {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #C2410C;
  margin-bottom: .75rem;
}

.hero h1 {
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
}

.hero-sub {
  font-size: .9375rem;
  color: #4b5563;
  margin-bottom: 1.75rem;
  max-width: 52ch;
}

.hero-ctas {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-primary {
  background: #C2410C;
  color: #fff;
  font-size: .9375rem;
  font-weight: 700;
  padding: .85rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: background .15s;
  min-height: 44px;
}
.btn-primary:hover { background: #9a3412; }

.btn-secondary {
  color: #0F766E;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.btn-secondary:hover { color: #0a5c56; }

.hero-panel {
  background: #0F766E;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1.5rem;
  gap: 1rem;
}

.hero-image-slot { flex: 1; }

.hero-chips {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.hero-chip {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 4px;
  color: #fff;
  font-size: .8125rem;
  font-weight: 600;
  padding: .6rem .9rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: background .12s;
  min-height: 44px;
}
.hero-chip:hover { background: rgba(255,255,255,.18); }
.hero-chip-arrow { color: #fb923c; font-style: normal; }

/* ---------- Image slot placeholder ---------- */
.image-slot {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: .75rem;
  text-align: center;
  overflow: hidden;
}
.image-slot span { padding: .75rem; line-height: 1.4; }

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.service-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: border-color .15s, box-shadow .15s;
  flex: 1 1 0;
}
.service-card:hover {
  border-color: #0F766E;
  box-shadow: 0 2px 10px rgba(15,118,110,.1);
}
.service-card:focus-visible {
  outline: 2px solid #C2410C;
  outline-offset: 2px;
}

.service-card-icon {
  width: 36px;
  height: 36px;
  background: #fff7ed;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.service-card h3 {
  font-size: .9375rem;
  color: #111827;
  margin: 0;
}

.service-card p {
  font-size: .8125rem;
  color: #6b7280;
  margin: 0;
  flex: 1;
  max-width: none;
}

.service-card-link {
  font-size: .8125rem;
  color: #C2410C;
  font-weight: 600;
  margin-top: auto;
}

/* ---------- Section headings ---------- */
.section-eyebrow {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #C2410C;
  margin-bottom: .6rem;
}

.section-heading { margin-bottom: 1rem; }

.section-lead {
  font-size: 1rem;
  color: #4b5563;
  margin-bottom: 2rem;
  max-width: 60ch;
}

/* ---------- Two-col content block ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

/* ---------- Teal section ---------- */
.section-teal {
  background: #0F766E;
  color: #fff;
}
.section-teal h2, .section-teal h3 { color: #fff; }
.section-teal p { color: rgba(255,255,255,.85); max-width: none; }
.section-teal .section-eyebrow { color: #fb923c; }

/* ---------- Light gray section ---------- */
.section-gray { background: #f9fafb; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: .75rem; max-width: 800px; }

details {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}
details[open] { border-color: #0F766E; }

summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: .9375rem;
  cursor: pointer;
  list-style: none;
  color: #111827;
  gap: 1rem;
}
summary::-webkit-details-marker { display: none; }
summary:hover { background: #f9fafb; }
summary:focus-visible { outline: 2px solid #C2410C; outline-offset: -2px; }

.faq-icon {
  font-size: 1.2rem;
  color: #C2410C;
  flex-shrink: 0;
  transition: transform .2s;
  font-style: normal;
}
details[open] .faq-icon { transform: rotate(45deg); }

.faq-body {
  padding: 0 1.25rem 1rem;
  font-size: .9375rem;
  color: #374151;
  line-height: 1.65;
}
.faq-body p { margin-bottom: .75rem; max-width: none; }
.faq-body p:last-child { margin-bottom: 0; }

/* ---------- Locations grid ---------- */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
}
.location-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: .75rem 1rem;
  text-decoration: none;
  color: #374151;
  font-size: .875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: border-color .15s, color .15s;
  min-height: 44px;
}
.location-card:hover { border-color: #0F766E; color: #0F766E; }
.location-card:focus-visible { outline: 2px solid #C2410C; outline-offset: 2px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: #1c1917;
  padding: 3rem 1.25rem;
  text-align: center;
}
.cta-banner h2 { color: #fff; margin-bottom: .75rem; }
.cta-banner p { color: rgba(255,255,255,.7); margin: 0 auto 1.75rem; max-width: 52ch; }
.cta-banner .btn-primary { font-size: 1rem; padding: 1rem 2rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0d1117;
  color: rgba(255,255,255,.75);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand-name {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .75rem;
  display: block;
}
.footer-brand-desc {
  font-size: .8125rem;
  line-height: 1.65;
  margin-bottom: 1rem;
  max-width: 30ch;
}
.footer-phone {
  display: inline-block;
  background: #C2410C;
  color: #fff;
  font-weight: 700;
  font-size: .875rem;
  padding: .6rem 1.1rem;
  border-radius: 5px;
  text-decoration: none;
}

.footer-col h4 {
  color: #fff;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .9rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.footer-col a {
  color: rgba(255,255,255,.65);
  font-size: .8125rem;
  text-decoration: none;
  transition: color .12s;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.footer-bottom p { font-size: .75rem; color: rgba(255,255,255,.45); margin: 0; max-width: none; }
.footer-bottom a { color: rgba(255,255,255,.45); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,.7); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  padding: .6rem 0;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: .25rem;
  font-size: .8125rem;
  color: #6b7280;
}
.breadcrumb li + li::before { content: '›'; margin-right: .25rem; }
.breadcrumb a { color: #0F766E; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: #374151; font-weight: 500; }

/* ---------- Floating mobile call button ---------- */
.mobile-call-fab {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 1.25rem;
  background: #C2410C;
  color: #fff;
  font-weight: 700;
  font-size: .875rem;
  padding: .85rem 1.25rem;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(194,65,12,.4);
  z-index: 90;
  min-height: 44px;
  align-items: center;
  gap: .4rem;
}

/* ---------- Page-specific: service page ---------- */
.page-hero {
  background: #0F766E;
  padding: 2.5rem 1.25rem;
  color: #fff;
}
.page-hero h1 { color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .6rem; }
.page-hero p { color: rgba(255,255,255,.85); font-size: .9375rem; margin: 0; }

.service-intro { padding: 2.5rem 0 0; }

.content-body h2 {
  margin-top: 2rem;
  margin-bottom: .75rem;
  padding-top: .25rem;
}
.content-body h3 { margin-top: 1.5rem; margin-bottom: .5rem; }
.content-body ul, .content-body ol {
  margin: .75rem 0 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.content-body li { font-size: .9375rem; color: #374151; line-height: 1.6; }

.price-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #C2410C;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.price-box h3 { margin: 0 0 .5rem; font-size: 1rem; }
.price-box p { margin: 0; font-size: .9375rem; color: #374151; max-width: none; }

.related-links {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
}
.related-links h3 { font-size: .9375rem; margin-bottom: .75rem; }
.related-links ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.related-links a { color: #0F766E; font-size: .875rem; text-decoration: none; font-weight: 500; }
.related-links a:hover { text-decoration: underline; }

/* ---------- Comparison table ---------- */
.comparison-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; }
.comparison-table th {
  background: #0F766E;
  color: #fff;
  padding: .75rem 1rem;
  text-align: left;
  font-size: .8125rem;
  font-weight: 600;
}
.comparison-table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  vertical-align: top;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:nth-child(even) td { background: #f9fafb; }
.table-wrap { overflow-x: auto; }

/* ---------- Inline callout ---------- */
.callout {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid #C2410C;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: .9375rem;
  color: #374151;
}
.callout strong { color: #9a3412; }

/* ---------- Outbound link style ---------- */
.outbound { color: #0F766E; text-decoration: underline; text-underline-offset: 2px; }
.outbound:hover { color: #085c56; }

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

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 55% 45%; }
}

@media (max-width: 768px) {
  /* Nav */
  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #0a5c56;
    flex-direction: column;
    align-items: stretch;
    padding: .5rem 0 1rem;
    gap: 0;
    box-shadow: 0 6px 16px rgba(0,0,0,.2);
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu > li > a, .nav-menu > li > button {
    border-radius: 0;
    padding: .75rem 1.25rem;
    justify-content: space-between;
  }
  .nav-toggle { display: flex; }
  .site-nav { position: sticky; }

  /* Dropdown mobile */
  .dropdown {
    position: static;
    background: rgba(0,0,0,.15);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }
  .dropdown a { color: rgba(255,255,255,.85); padding: .6rem 2rem; font-size: .875rem; }
  .dropdown a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .dropdown-divider { background: rgba(255,255,255,.12); }

  /* Hero */
  .hero { grid-template-columns: 1fr; }
  .hero-content { padding: 2.5rem 1.25rem; }
  .hero-panel { display: none; }

  /* Two-col → single */
  .two-col { grid-template-columns: 1fr; gap: 1.5rem; }
  .two-col.reverse { direction: ltr; }

  /* Services grid */
  .services-grid { grid-template-columns: 1fr 1fr; }

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

  /* Mobile FAB */
  .mobile-call-fab { display: flex; }

  section { padding: 2.5rem 0; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .locations-grid { grid-template-columns: 1fr 1fr; }
  .trust-bar-inner { justify-content: flex-start; }
}

@media (max-width: 360px) {
  h1 { font-size: 1.35rem; }
  .hero-ctas { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; text-align: center; justify-content: center; }
  .comparison-table { font-size: .8rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
