/* =========================================
   Chief Mountain Plumbing & Heating
   Global Styles — Red, Black & White
   ========================================= */

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

/* ---- CSS Variables ---- */
:root {
  --red:         #c41a1a;
  --red-dark:    #9e1414;
  --red-light:   #e02020;
  --black:       #0d0d0d;
  --black-soft:  #161616;
  --black-card:  #1e1e1e;
  --black-border:#2e2e2e;
  --white:       #ffffff;
  --off-white:   #f5f5f5;
  --grey-light:  #d4d4d4;
  --grey-mid:    #8a8a8a;
  --grey-dark:   #444444;

  --text-primary:   #ffffff;
  --text-secondary: #c8c8c8;
  --text-muted:     #7a7a7a;

  --radius:    0px;
  --radius-sm: 0px;
  --transition: 0.25s ease;

  --shadow: 0 4px 24px rgba(0,0,0,0.6);
  --shadow-red: 0 4px 24px rgba(196,26,26,0.35);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Open Sans', sans-serif;
  background: var(--black);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--red); }

/* =========================================
   PIPE SVG DECORATIONS (inline SVG via CSS)
   Used as ::before/::after backgrounds
   ========================================= */

/* Horizontal pipe segment */
.pipe-h {
  position: absolute;
  height: 6px;
  background: var(--black-border);
  border-top: 2px solid #3a3a3a;
  border-bottom: 2px solid #111;
  pointer-events: none;
}

/* Vertical pipe segment */
.pipe-v {
  position: absolute;
  width: 6px;
  background: var(--black-border);
  border-left: 2px solid #3a3a3a;
  border-right: 2px solid #111;
  pointer-events: none;
}

/* Pipe elbow / fitting */
.pipe-fitting {
  position: absolute;
  width: 18px;
  height: 18px;
  background: #333;
  border: 2px solid #444;
  pointer-events: none;
}

/* =========================================
   NAVBAR
   ========================================= */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  background: var(--black);
  border-bottom: 3px solid var(--red);
  transition: box-shadow var(--transition);
}
#navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.7);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-logo img {
  height: 48px;
  width: auto;
  display: block;
}
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.nav-logo-name {
  font-family: 'Oswald', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
}
.nav-logo-sub {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-light);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }


.nav-cta {
  background: var(--red) !important;
  color: var(--white) !important;
  font-family: 'Oswald', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  padding: 0.6rem 1.4rem !important;
  transition: background var(--transition) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--red-dark) !important; color: var(--white) !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--white);
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0;
  background: var(--black-soft);
  border-bottom: 3px solid var(--red);
  padding: 2rem 2rem;
  flex-direction: column;
  gap: 1.2rem;
  z-index: 999;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-light);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--black-border);
  transition: color var(--transition);
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--white); }

/* Mobile search inside mobile menu */
.mobile-search-wrap {
  position: relative;
  width: 100%;
}

#mobile-search-input {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-left: 3px solid var(--red);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: 'Open Sans', sans-serif;
  outline: none;
}
#mobile-search-input::placeholder { color: var(--text-muted); }
#mobile-search-input:focus { border-color: var(--red); }

#mobile-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-top: 3px solid var(--red);
  z-index: 600;
  display: none;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.7);
}
#mobile-search-dropdown.open { display: block; }

/* =========================================
   NAVBAR INLINE SEARCH
   ========================================= */
.nav-search-wrap {
  position: relative;
}

.nav-search-form {
  display: flex;
  align-items: center;
  background: var(--black-card);
  border: 1px solid var(--black-border);
  transition: border-color var(--transition);
}
.nav-search-form:focus-within {
  border-color: var(--red);
}

#nav-search-input {
  width: 200px;
  padding: 0.45rem 0.8rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: 'Open Sans', sans-serif;
  outline: none;
  transition: width var(--transition);
}
#nav-search-input:focus { width: 240px; }
#nav-search-input::placeholder { color: var(--text-muted); }

.nav-search-icon {
  padding: 0 0.6rem;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  height: 100%;
  display: flex;
  align-items: center;
  background: transparent;
  transition: color var(--transition);
}
.nav-search-icon:hover {
  color: var(--white);
}

/* Dropdown results */
#nav-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 360px;
  background: var(--black-card);
  border: 1px solid var(--black-border);
  border-top: 3px solid var(--red);
  z-index: 500;
  display: none;
  max-height: 420px;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
#nav-search-dropdown.open { display: block; }

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--black-border);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #252525; }



.search-result-text h4 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 2px;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.04em;
}
.search-result-text p { font-size: 0.76rem; color: var(--text-secondary); line-height: 1.4; }

.search-no-results {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* =========================================
   SECTION / LAYOUT UTILITIES
   ========================================= */
.section { padding: 6rem 3rem; }
.section-inner { max-width: 1200px; margin: 0 auto; }

/* Red accent label */
.section-label {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-family: 'Oswald', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  margin-bottom: 1.2rem;
}

.section-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-title span { color: var(--red); }

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.75;
}

/* PAGE HERO (shared) */
.page-hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  padding: 9rem 3rem 5rem;
  position: relative;
  overflow: hidden;
  background: var(--black-soft);
  border-bottom: 4px solid var(--red);
}
.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}
.page-hero-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.page-hero-title span { color: var(--red); }
.page-hero-subtitle { font-size: 1.05rem; color: var(--text-secondary); max-width: 560px; line-height: 1.75; }

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.8rem 2rem;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-white {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.btn-white:hover { background: var(--off-white); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--black); }
.btn-outline-red {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn-outline-red:hover { background: var(--red); color: var(--white); }
.btn-lg { padding: 1rem 2.4rem; font-size: 1rem; }

/* =========================================
   DIVIDER
   ========================================= */
.red-divider {
  height: 3px;
  background: var(--red);
  width: 60px;
  margin-bottom: 1.5rem;
}

/* =========================================
   STARS
   ========================================= */
.stars { display: inline-flex; gap: 2px; color: var(--red); font-size: 1rem; }

/* =========================================
   BADGE
   ========================================= */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: 'Oswald', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--black-border);
  color: var(--grey-light);
  background: var(--black-card);
}
.badge-red {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}
.badge-white {
  background: var(--white);
  border-color: var(--white);
  color: var(--black);
}

/* =========================================
   PIPE DIVIDER — used between sections
   A horizontal decorative pipe graphic
   ========================================= */
.pipe-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0;
  height: 24px;
  position: relative;
  overflow: hidden;
}
.pipe-divider svg {
  display: block;
  width: 100%;
  height: 24px;
}

/* =========================================
   FLOATING CALL BUTTON
   ========================================= */
#float-call {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: var(--white);
  padding: 0.9rem 1.5rem;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: var(--shadow-red);
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  border-left: 4px solid var(--red-dark);
}
#float-call:hover { background: var(--red-dark); transform: translateY(-2px); }

/* =========================================
   FOOTER
   ========================================= */
#footer {
  background: var(--black-soft);
  border-top: 4px solid var(--red);
  padding: 4rem 3rem 2rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--black-border);
}

.footer-brand img { height: 56px; width: auto; margin-bottom: 1.2rem; }
.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.8; max-width: 320px; margin-bottom: 1.5rem; }

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  transition: color var(--transition);
}
.footer-contact-item:hover { color: var(--white); }
.footer-contact-item .fci-icon {
  width: 8px; height: 8px;
  background: var(--red);
  flex-shrink: 0;
  display: inline-block;
}

.footer-heading {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}

.footer-links { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-links a::before {
  content: '';
  width: 12px; height: 2px;
  background: var(--red);
  flex-shrink: 0;
  transition: width var(--transition);
}
.footer-links a:hover { color: var(--white); }
.footer-links a:hover::before { width: 18px; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; }
.footer-bottom-right { color: var(--text-muted); font-size: 0.8rem; font-family: 'Oswald', sans-serif; letter-spacing: 0.06em; text-transform: uppercase; }
.footer-bottom-right span { color: var(--red); }

/* =========================================
   FADE-UP ANIMATION
   ========================================= */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }

/* =========================================
   LIGHTBOX / IMAGE MODAL
   ========================================= */
.lightbox-trigger {
  cursor: zoom-in;
  position: relative;
}

.zoom-hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(13, 13, 13, 0.88);
  border: 1px solid var(--black-border);
  color: var(--white);
  padding: 6px 12px;
  font-size: 0.72rem;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  border-left: 2px solid var(--red);
  pointer-events: none;
  opacity: 0.9;
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
  z-index: 3;
}

.lightbox-trigger:hover .zoom-hint {
  opacity: 1;
  transform: translateY(-2px);
  background: var(--red);
  border-color: var(--red);
}

.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(5, 5, 5, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 2rem;
  box-sizing: border-box;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content-wrap {
  position: relative;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.lightbox-modal.active .lightbox-content-wrap {
  transform: scale(1);
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  image-orientation: from-image;
  border: 1px solid var(--black-border);
  border-top: 3px solid var(--red);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(196, 26, 26, 0.2);
  display: block;
}

.lightbox-caption {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  background: rgba(20, 20, 20, 0.9);
  padding: 8px 18px;
  border: 1px solid var(--black-border);
  border-bottom: 2px solid var(--red);
}

.lightbox-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  background: rgba(22, 22, 22, 0.9);
  border: 1px solid var(--black-border);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100000;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  outline: none;
}

.lightbox-close-btn svg {
  width: 24px;
  height: 24px;
  stroke: var(--white);
  transition: transform var(--transition);
}

.lightbox-close-btn:hover {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.08);
}

.lightbox-close-btn:hover svg {
  transform: rotate(90deg);
}

body.lightbox-open {
  overflow: hidden;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 5rem 2rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  #navbar { padding: 0 1.5rem; }
  .section { padding: 4rem 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  #float-call .call-label { display: none; }
  #float-call { padding: 1rem 1rem; }
  .page-hero { padding: 8rem 1.5rem 4rem; }
  .lightbox-modal { padding: 1rem; }
  .lightbox-close-btn { top: 1rem; right: 1rem; width: 42px; height: 42px; }
  .lightbox-caption { font-size: 0.82rem; padding: 6px 12px; }
}
