/* King Brothers Plumbing Heating & Air - Shared Styles */
/* Fonts: Oswald (headings) + Nunito (body) */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Nunito:wght@400;500;600;700&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #c02b0a;
  --primary-dark: #9e2208;
  --navy: #1e3a5f;
  --navy-dark: #152a46;
  --navy-light: #2a4d7a;
  --warm-bg: #f9f7f4;
  --white: #ffffff;
  --text: #2d2d2d;
  --text-light: #5a5a5a;
  --border: #e0dbd4;
  --shadow: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
}

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

body {
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--primary);
  color: white;
  padding: .5rem 1rem;
  border-radius: 0 0 4px 4px;
  font-weight: 700;
  z-index: 9999;
  transition: top .2s;
}
.skip-link:focus { top: 0; color: white; }

/* ===== HEADER / NAV ===== */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.header-top {
  background: var(--primary);
  padding: .4rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  align-items: center;
  font-size: .85rem;
  color: rgba(255,255,255,.95);
  font-weight: 600;
}

.header-top a { color: white; }
.header-top a:hover { color: rgba(255,255,255,.8); }

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-wrap img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-family: 'Oswald', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.03em;
}

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

nav a {
  color: rgba(255,255,255,.9);
  font-weight: 600;
  font-size: .95rem;
  padding: .5rem .9rem;
  border-radius: 4px;
  transition: background .2s, color .2s;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

nav a:hover,
nav a.active { background: rgba(255,255,255,.12); color: white; }

.nav-cta {
  background: var(--primary) !important;
  color: white !important;
  padding: .5rem 1.2rem !important;
  border-radius: 4px !important;
}
.nav-cta:hover { background: var(--primary-dark) !important; }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  margin: 5px 0;
  transition: transform .3s;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.85);
  padding: 3rem 1.5rem 1.5rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-brand .logo-wrap img { height: 50px; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.footer-brand p { font-size: .9rem; opacity: .8; line-height: 1.6; }

.footer-col h4 {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: white;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .5rem; font-size: .9rem; }
.footer-col ul li a { color: rgba(255,255,255,.75); transition: color .2s; }
.footer-col ul li a:hover { color: white; }
.footer-col p { font-size: .9rem; opacity: .8; margin-bottom: .5rem; }
.footer-col .badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 3px;
  letter-spacing: .05em;
  margin-top: .5rem;
}

.footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  opacity: .6;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 2rem;
  border-radius: 4px;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: all .2s;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(192,43,10,.35);
}

.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,.7);
}
.btn-outline:hover {
  background: white;
  color: var(--navy);
  border-color: white;
}

.btn-navy {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.btn-navy:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: white;
  transform: translateY(-1px);
}

.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* ===== SECTION SHARED ===== */
.section { padding: 5rem 1.5rem; }
.section-sm { padding: 3rem 1.5rem; }
.container { max-width: 1200px; margin: 0 auto; }
.container-sm { max-width: 860px; margin: 0 auto; }

.section-label {
  font-family: 'Oswald', sans-serif;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: .6rem;
  display: block;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--navy);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 620px;
}

.text-center { text-align: center; }
.text-center .section-subtitle { margin: 0 auto; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--navy-dark);
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .4;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(21,42,70,.92) 55%, rgba(192,43,10,.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  font-family: 'Oswald', sans-serif;
  font-size: .82rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp .6s .2s forwards;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  color: white;
  line-height: 1.1;
  max-width: 680px;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeUp .6s .4s forwards;
}

.hero h1 span { color: var(--primary); }

.hero p {
  font-size: 1.2rem;
  color: rgba(255,255,255,.88);
  max-width: 540px;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp .6s .55s forwards;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp .6s .7s forwards;
}

.hero-badges {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  opacity: 0;
  animation: fadeUp .6s .85s forwards;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.85);
  font-size: .88rem;
  font-weight: 600;
}

.hero-badge svg { color: var(--primary); flex-shrink: 0; }

/* ===== SERVICES GRID ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: rgba(192,43,10,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.service-icon svg { color: var(--primary); }

.service-card h3 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: .5rem;
}

.service-card p { font-size: .92rem; color: var(--text-light); margin: 0; }

/* ===== STATS BAND ===== */
.stats-band {
  background: var(--navy);
  color: white;
  padding: 4rem 1.5rem;
}

.stats-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item .counter {
  font-family: 'Oswald', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
  line-height: 1;
  margin-bottom: .3rem;
}

.stat-item .stat-label {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  opacity: .75;
  font-weight: 600;
}

/* ===== TESTIMONIALS ===== */
.testimonials-section { background: var(--warm-bg); }

.testimonial-carousel {
  position: relative;
  max-width: 760px;
  margin: 2.5rem auto 0;
  overflow: hidden;
}

.tc-track { display: flex; transition: transform .5s ease; }

.tc-slide {
  min-width: 100%;
  padding: 2.5rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}

.tc-slide blockquote {
  font-size: 1.1rem;
  line-height: 1.75;
  font-style: italic;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.tc-stars { color: #f59e0b; margin-bottom: .75rem; font-size: 1.1rem; }

.tc-cite {
  font-style: normal;
  font-weight: 700;
  color: var(--navy);
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  letter-spacing: .05em;
}

.tc-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.5rem;
}

.tc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  opacity: .3;
  cursor: pointer;
  transition: opacity .3s;
}
.tc-dot.active { opacity: 1; }

/* ===== SERVICE AREAS ===== */
.areas-section { background: white; }

.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .75rem;
  margin-top: 2rem;
}

.area-chip {
  background: var(--warm-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .6rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}

.area-chip svg { color: var(--primary); flex-shrink: 0; }

/* ===== FAQ ACCORDION ===== */
.faq-list { max-width: 720px; margin: 2.5rem auto 0; }

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
  gap: 1rem;
  font-family: 'Oswald', sans-serif;
  letter-spacing: .02em;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; content: ''; }
.faq-chevron { transition: transform .3s; flex-shrink: 0; color: var(--primary); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }

.faq-item[open] summary { color: var(--primary); }

.faq-answer {
  padding: 0 0 1.2rem;
  color: var(--text-light);
  line-height: 1.75;
  font-size: .97rem;
}

/* ===== SPECIALS BANNER ===== */
.specials-band {
  background: var(--primary);
  color: white;
  padding: 3rem 1.5rem;
}

.specials-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.special-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.special-item svg { flex-shrink: 0; margin-top: .15rem; }
.special-item h4 { font-size: 1.05rem; font-weight: 600; margin-bottom: .25rem; }
.special-item p { font-size: .88rem; opacity: .9; margin: 0; }

/* ===== SCROLL REVEAL ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: .1s; }
.reveal:nth-child(3) { transition-delay: .2s; }
.reveal:nth-child(4) { transition-delay: .3s; }
.reveal:nth-child(5) { transition-delay: .4s; }
.reveal:nth-child(6) { transition-delay: .5s; }

/* ===== FLOATING CLICK-TO-CALL ===== */
.floating-cta {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  background: var(--primary);
  color: white;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(192,43,10,.4);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}
.floating-cta:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(192,43,10,.5);
  color: white;
}
.floating-cta:focus-visible { outline: 3px solid white; outline-offset: 3px; }

@media (min-width: 768px) {
  .floating-cta { bottom: 2rem; right: 2rem; width: 64px; height: 64px; }
}

/* ===== CONTACT FORM ===== */
.contact-form {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--primary);
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--navy);
  font-size: .9rem;
  font-family: 'Oswald', sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  transition: border-color .2s;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}
.form-success svg { color: #16a34a; margin: 0 auto 1rem; }
.form-success h3 { color: var(--navy); margin-bottom: .5rem; }
.form-success p { color: var(--text-light); }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  background: linear-gradient(105deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 4rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: white;
  margin-bottom: .75rem;
}

.page-hero p { color: rgba(255,255,255,.8); font-size: 1.1rem; margin: 0; }

.breadcrumb {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-bottom: 1.2rem;
  font-size: .85rem;
  color: rgba(255,255,255,.6);
}
.breadcrumb a { color: rgba(255,255,255,.6); }
.breadcrumb a:hover { color: white; }
.breadcrumb span { color: rgba(255,255,255,.4); }

/* ===== ABOUT SPLIT ===== */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-split img {
  border-radius: 12px;
  width: 100%;
  height: 500px;
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

/* ===== MAP ===== */
#service-area-map {
  height: 380px;
  border-radius: 10px;
  margin-top: 2rem;
  border: 2px solid var(--border);
}

/* ===== IMAGE SECTION ===== */
.image-section {
  position: relative;
  overflow: hidden;
}

.image-section img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(21,42,70,.85) 0%, rgba(21,42,70,.4) 100%);
  display: flex;
  align-items: center;
}

.image-overlay .container { color: white; }
.image-overlay h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); color: white; margin-bottom: 1rem; }
.image-overlay p { font-size: 1.1rem; opacity: .9; max-width: 500px; margin-bottom: 1.5rem; }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== CONTACT INFO CARDS ===== */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.contact-card {
  background: white;
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--primary);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.contact-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(192,43,10,.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-card-icon svg { color: var(--primary); }

.contact-card h3 {
  font-size: 1rem;
  color: var(--navy);
  margin: 0;
}

.contact-card p, .contact-card a {
  font-size: .95rem;
  color: var(--text-light);
  margin: 0;
}

/* ===== BEFORE/AFTER SLIDER ===== */
.ba-slider {
  position: relative;
  overflow: hidden;
  max-width: 760px;
  margin: 2.5rem auto 0;
  border-radius: 12px;
  aspect-ratio: 16/9;
  user-select: none;
  box-shadow: var(--shadow-lg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-split { grid-template-columns: 1fr; }
  .about-split img { height: 320px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: 1; }
  .header-top { justify-content: center; flex-wrap: wrap; gap: .75rem; }
}

@media (max-width: 768px) {
  nav ul { display: none; }
  nav ul.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-dark); padding: 1rem; gap: .25rem; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
  .hamburger { display: block; }
  .header-main { position: relative; }
  .hero { min-height: auto; padding: 5rem 0 3rem; }
  .section { padding: 3.5rem 1rem; }
}
