/* ==========================================================================
   DIAMOND BAR WATER HEATER PROS - MAIN STYLESHEET
   Niche: Local Water Heater Repair & Replacement Lead Generation / Referral
   Location: Diamond Bar, CA 91765
   Phone: (840) 837-9118
   Domain: waterheaterrepairdiamondbarca.com
   ========================================================================== */

:root {
  --primary: #0F2C59;          /* Deep Navy */
  --primary-hover: #163C77;    /* Lighter Navy */
  --primary-dark: #091B38;     /* Midnight Navy */
  --accent: #FF6B00;           /* Vibrant Orange */
  --accent-hover: #E05D00;     /* Deep Orange */
  --accent-light: #FFF5EE;    /* Soft Orange Tint */
  --secondary: #2563EB;        /* Action Blue */
  --text-dark: #0F172A;        /* Slate Dark */
  --text-body: #334155;        /* Slate Text */
  --text-muted: #64748B;       /* Muted Text */
  --bg-light: #F8FAFC;        /* Light Gray/Blue Tint */
  --bg-white: #FFFFFF;
  --bg-dark: #0F2C59;
  --border-light: #E2E8F0;
  --border-accent: #FFD8BE;
  --shadow-sm: 0 1px 3px rgba(15, 44, 89, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 44, 89, 0.12);
  --shadow-lg: 0 10px 25px rgba(15, 44, 89, 0.18);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-body);
  background-color: var(--bg-white);
  overflow-x: hidden;
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 10px;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  z-index: 10000;
  font-weight: 700;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}

/* Typography & Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.1rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 2.5vw + 1rem, 2.2rem);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
}

h3 {
  font-size: clamp(1.25rem, 1.8vw + 0.8rem, 1.5rem);
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

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

strong {
  color: var(--text-dark);
  font-weight: 700;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

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

.section {
  padding: 4rem 0;
}

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

.section-dark {
  background-color: var(--primary-dark);
  color: #FFFFFF;
}
.section-dark h2, .section-dark h3, .section-dark h4 {
  color: #FFFFFF;
}
.section-dark p {
  color: #E2E8F0;
}

.text-center {
  text-align: center;
}

.section-title-wrap {
  margin-bottom: 3rem;
}
.section-title-wrap p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 750px;
  margin: 0.5rem auto 0;
}

/* Top Emergency Announcement Bar */
.top-bar {
  background-color: var(--primary-dark);
  color: #FFFFFF;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.top-bar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.top-bar-item svg {
  width: 16px;
  height: 16px;
  fill: var(--accent);
  flex-shrink: 0;
}
.top-bar-phone {
  color: var(--accent);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.top-bar-phone:hover {
  text-decoration: underline;
}

/* Navigation Header */
.site-header {
  background-color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-light);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  gap: 1rem;
}
.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 48px;
  flex-shrink: 0;
}
.brand-logo img, .brand-logo svg {
  height: 100%;
  width: auto;
  max-width: 290px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 0.15rem;
  white-space: nowrap;
  position: relative;
  display: inline-block;
}
.nav-link:hover, .nav-link:focus, .nav-link.active {
  color: var(--accent);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--accent);
  border-radius: 2px;
}

.header-cta-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.header-cta-wrap .btn {
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
  white-space: nowrap;
}

/* Mobile Nav Toggle Button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--primary);
  flex-shrink: 0;
}
.nav-toggle svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* Buttons & Call To Actions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  text-align: center;
  white-space: nowrap;
}

.btn-accent {
  background-color: var(--accent);
  color: #FFFFFF !important;
  border-color: var(--accent);
}
.btn-accent:hover, .btn-accent:focus {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF !important;
  border-color: var(--primary);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary) !important;
  border-color: var(--primary);
}
.btn-outline:hover, .btn-outline:focus {
  background-color: var(--primary);
  color: #FFFFFF !important;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.15rem;
  border-radius: var(--radius-md);
}

.btn-phone svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #091B38 0%, #0F2C59 60%, #163C77 100%);
  color: #FFFFFF;
  padding: 4rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 107, 0, 0.15) 0%, transparent 50%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}
.hero-content h1 {
  color: #FFFFFF;
  margin-bottom: 1.25rem;
}
.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #E2E8F0;
  margin-bottom: 2rem;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.hero-badge-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #F1F5F9;
}
.hero-badge-item svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
}

/* Hero Quick Call Card */
.hero-card {
  background: #FFFFFF;
  color: var(--text-body);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-accent);
}
.hero-card h3 {
  color: var(--primary-dark);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
}
.hero-card p {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.call-box-large {
  background-color: var(--accent-light);
  border: 2px dashed var(--accent);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.call-box-number {
  display: inline-block;
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--accent);
  text-decoration: none;
  margin-top: 0.25rem;
  white-space: nowrap;
  letter-spacing: 0.5px;
  transition: transform 0.2s ease, color 0.2s ease;
}
.call-box-number:hover {
  color: var(--accent-hover);
  transform: scale(1.02);
}
.hero-feature-list {
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}
.hero-feature-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-dark);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.hero-feature-list li svg {
  width: 18px;
  height: 18px;
  fill: #10B981; /* Success Green */
  flex-shrink: 0;
}

/* Referral Model Disclosure Banner */
.referral-disclosure-bar {
  background-color: #FEF3C7;
  border-left: 4px solid #D97706;
  color: #92400E;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 2rem;
  font-size: 0.925rem;
  line-height: 1.5;
}
.referral-disclosure-bar strong {
  color: #78350F;
}

/* Services Grid Layout */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.service-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.service-icon svg {
  width: 32px;
  height: 32px;
  fill: var(--accent);
}
.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}
.service-card h3 a {
  color: var(--text-dark);
  text-decoration: none;
}
.service-card h3 a:hover {
  color: var(--accent);
}
.service-card p {
  color: var(--text-body);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.service-card .card-link {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.service-card .card-link:hover {
  color: var(--accent);
}

/* Locations / Neighborhoods Grid */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.location-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}
.location-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.location-card svg {
  width: 36px;
  height: 36px;
  fill: var(--primary);
  margin-bottom: 0.75rem;
}
.location-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.location-card h3 a {
  color: var(--text-dark);
  text-decoration: none;
}
.location-card h3 a:hover {
  color: var(--accent);
}
.location-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Contextual Article Content Area */
.content-box {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.content-box h2 {
  border-bottom: 2px solid var(--accent-light);
  padding-bottom: 0.5rem;
}
.content-box blockquote {
  border-left: 4px solid var(--accent);
  background-color: var(--accent-light);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

/* Tables for SEO/Data Comparison */
.table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}
.data-table th, .data-table td {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-light);
}
.data-table th {
  background-color: var(--primary);
  color: #FFFFFF;
  font-weight: 700;
}
.data-table tr:nth-child(even) {
  background-color: var(--bg-light);
}

/* Process / How It Works Steps */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.process-step {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.step-number {
  width: 44px;
  height: 44px;
  background-color: var(--accent);
  color: #FFFFFF;
  font-weight: 900;
  font-size: 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background-color: var(--bg-white);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-question:hover {
  background-color: var(--bg-light);
}
.faq-icon {
  width: 20px;
  height: 20px;
  fill: var(--accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.faq-item.active .faq-icon {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
  background-color: var(--bg-white);
}
.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.25rem 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* Mid-Page Conversion CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin: 3rem 0;
  box-shadow: var(--shadow-md);
}
.cta-banner h2 {
  color: #FFFFFF;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.75rem;
}
.cta-banner p {
  color: #E2E8F0;
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto 1.75rem;
}
.cta-phone-btn-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Contact Page Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-dark);
}
.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background-color: var(--bg-white);
}
.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 1.5rem 0 1rem;
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.breadcrumbs li::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--text-muted);
}
.breadcrumbs li:last-child::after {
  content: "";
}
.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--accent);
}

/* Footer */
.site-footer {
  background-color: var(--primary-dark);
  color: #94A3B8;
  padding: 4rem 0 2rem;
  font-size: 0.925rem;
  border-top: 4px solid var(--accent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-col h4 {
  color: #FFFFFF;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}
.footer-links {
  list-style: none;
  padding: 0;
}
.footer-links li {
  margin-bottom: 0.6rem;
}
.footer-links a {
  color: #94A3B8;
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: #64748B;
}

/* Sticky Mobile Call Bar (< 768px) */
.sticky-mobile-call-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--primary-dark);
  border-top: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  z-index: 9999;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
}
.sticky-mobile-call-bar .btn {
  width: 100%;
  padding: 0.85rem;
  font-size: 1.1rem;
}

/* Responsive Media Queries */
@media (max-width: 1280px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #FFFFFF;
    flex-direction: column;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 3px solid var(--accent);
    gap: 0.75rem;
    align-items: flex-start;
  }
  .nav-menu.is-active {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
  .nav-link.active::after {
    display: none;
  }
  .nav-link.active {
    color: var(--accent);
    font-weight: 800;
  }
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-cta-wrap .btn {
    display: none;
  }
  .sticky-mobile-call-bar {
    display: block;
  }
  body {
    padding-bottom: 70px; /* Offset for sticky bar */
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
