/* ==========================================================================
   Washington Plumbing - Kirkland, WA
   Modern, Ultra-Fast, Responsive Stylesheet & Design System
   ========================================================================== */

:root {
  --primary: #0f2744;
  --primary-dark: #0a1b30;
  --primary-light: #1e3a5f;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --accent-bright: #38bdf8;
  --emergency: #dc2626;
  --emergency-hover: #b91c1c;
  --emergency-glow: rgba(220, 38, 38, 0.35);
  --success: #16a34a;
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --container: 1160px;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.06);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.06);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px; /* clearance for sticky mobile call bar */
}

@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content-container {
  max-width: 920px;
  margin: 0 auto;
}

/* ==========================================================================
   TOP BAR (Direct Dispatch Bar)
   ========================================================================== */
.top-bar {
  background: var(--primary-dark);
  color: #e2e8f0;
  padding: 0.55rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #38bdf8;
  font-weight: 600;
  font-size: 0.85rem;
}

.top-bar-badge::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.top-bar-phone {
  color: #ffffff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s ease;
}

.top-bar-phone:hover {
  color: var(--accent-bright);
  text-decoration: none;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo:hover {
  text-decoration: none;
  color: var(--primary);
}

.logo span {
  color: var(--accent);
}

.logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop > a,
.nav-dropdown-toggle {
  color: var(--text);
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-desktop > a:hover,
.nav-desktop > a.active,
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle[aria-expanded="true"] {
  color: var(--accent);
  background: var(--surface-alt);
  text-decoration: none;
}

/* Dropdown Menu (Desktop) */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  margin-top: 0.35rem;
  display: none;
  z-index: 1010;
  animation: fadeInDown 0.15s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.65rem 1.15rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus {
  background: var(--surface-alt);
  color: var(--accent);
  padding-left: 1.35rem;
}

.nav-desktop .phone-btn {
  margin-left: 0.6rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0.5rem;
  color: var(--primary);
  transition: background 0.2s ease;
}

.menu-toggle:hover {
  background: var(--surface-alt);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* Mobile Menu Drawer */
.mobile-menu {
  position: fixed;
  top: 74px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-menu > a {
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  border-radius: var(--radius-sm);
  display: block;
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.mobile-menu > a:hover,
.mobile-menu > a.active {
  background: var(--surface-alt);
  color: var(--accent);
}

/* Mobile Submenu Accordion */
.mobile-dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  min-height: 44px;
}

.mobile-dropdown-toggle:hover {
  background: var(--surface-alt);
  color: var(--accent);
}

.mobile-submenu {
  display: none;
  flex-direction: column;
  padding-left: 1rem;
  gap: 0.35rem;
}

.mobile-submenu.open {
  display: flex;
}

.mobile-submenu a {
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.mobile-submenu a:hover {
  color: var(--accent);
  background: var(--surface-alt);
}

/* ==========================================================================
   BUTTONS & CALL CONTROLS
   ========================================================================== */
.phone-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #ffffff !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
}

.phone-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.phone-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.phone-btn.emergency {
  background: var(--emergency);
}

.phone-btn.emergency:hover {
  background: var(--emergency-hover);
  box-shadow: 0 4px 14px var(--emergency-glow);
}

.phone-btn.large {
  padding: 0.95rem 1.85rem;
  font-size: 1.05rem;
  border-radius: var(--radius);
}

.phone-btn.secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(4px);
}

.phone-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: #ffffff;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* Strict constraint on all phone-btn SVG icons - never expand! */
.phone-btn svg,
.call-btn svg,
.mobile-call-link svg,
.footer-phone svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.phone-btn.large svg {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
}

/* Global SVG constraint to prevent runaway phone icons */
footer svg,
.site-footer svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  padding: 4rem 0 3.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.35rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.hero p {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 2rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ==========================================================================
   TRUST BAR
   ========================================================================== */
.trust-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: -1.75rem;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .trust-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary);
}

.trust-icon {
  color: #16a34a;
  font-weight: 800;
  font-size: 1.1rem;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  margin: 0 0.5rem;
  color: #94a3b8;
}

/* ==========================================================================
   CONTENT SECTIONS & TYPOGRAPHY
   ========================================================================== */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.section h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 1.75rem;
  margin-bottom: 0.85rem;
}

.section p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.lead-text {
  font-size: 1.2rem !important;
  line-height: 1.75 !important;
  color: var(--primary-light) !important;
  font-weight: 500;
  margin-bottom: 2rem !important;
}

/* Bullet list formatting */
.content-list {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.content-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.85rem;
  font-size: 1.025rem;
  line-height: 1.6;
}

.content-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 800;
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

@media (min-width: 640px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.card-icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.card h3, .card h4 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.card p {
  font-size: 0.975rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.card a.card-cta {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.card a.card-cta:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.feature-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.feature-item h4 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.feature-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ==========================================================================
   CALLOUT BOXES & CTAS
   ========================================================================== */
.callout-box {
  background: #eff6ff;
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2.5rem 0;
}

.callout-box h3 {
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 0.65rem;
  font-size: 1.3rem;
}

.callout-box p {
  color: var(--primary-light);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.emergency-cta-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  color: #ffffff;
  padding: 3.5rem 0;
  text-align: center;
  margin-top: 3rem;
  border-radius: var(--radius-lg);
}

.emergency-cta-banner h2 {
  color: #ffffff;
  margin-bottom: 1rem;
}

.emergency-cta-banner p {
  color: #cbd5e1;
  max-width: 680px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
}

/* ==========================================================================
   ACCORDIONS (FAQ)
   ========================================================================== */
.faq-section {
  margin-top: 2.5rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  background: var(--surface);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: var(--surface-alt);
}

.faq-question span.icon {
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.25s ease;
}

.faq-question[aria-expanded="true"] span.icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.35rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.faq-answer.open {
  display: block;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--primary-dark);
  color: #cbd5e1;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.footer-col p {
  font-size: 0.925rem;
  line-height: 1.65;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.925rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.75rem;
  font-size: 0.875rem;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  text-align: center;
}

.footer-bottom a {
  color: #94a3b8;
}

.footer-bottom a:hover {
  color: #ffffff;
}

/* ==========================================================================
   STICKY MOBILE CALL BAR (Bottom Tapper)
   ========================================================================== */
.mobile-call-bar {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--emergency);
  z-index: 9999;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.25);
}

.mobile-call-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem 1.25rem;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none !important;
  line-height: 1.2;
}

.mobile-call-link svg {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  flex-shrink: 0 !important;
}

@media (min-width: 900px) {
  .mobile-call-bar {
    display: none !important;
  }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
  .hero h1 {
    font-size: 3.1rem;
  }
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}
