/* ========================================================
   911 PLUMBING AMERICA - UNIFIED NAVBAR & FOOTER STYLESHEET
======================================================== */

:root {
  --nav-navy-dark: #091a2c;
  --nav-navy-bar: #0e2946;
  --nav-navy-footer: #081d33;
  --nav-header-text: #0a2540;
  --nav-red: #c8102e;
  --nav-red-dark: #9e0b22;
  --nav-yellow: #fdb813;
  --nav-yellow-dark: #e5b300;
  --nav-blue-icon: #60a5fa;
  --nav-border: #eef2f6;
}

/* ========================================================
   1. TOP ANNOUNCEMENT BAR
======================================================== */
.top-bar {
  background-color: var(--nav-navy-bar);
  color: #ffffff;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1001;
  width: 100%;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar-left span,
.top-bar-center,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 7px;
}

.top-bar-center {
  font-weight: 600;
}

.top-bar-center-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.top-bar-center-link:hover {
  opacity: 0.9;
  text-decoration: none;
}

.top-bar-center .stars-yellow {
  color: var(--nav-yellow);
  letter-spacing: 2px;
}

.top-bar-right {
  font-weight: 600;
}

/* ========================================================
   STICKY NAVBAR FOR SUBPAGES (Water Heaters, Sewer & Drains, etc.)
   Residential home page stays relative / in normal flow as requested.
======================================================== */
#site-header:not([data-page="home"]):not([data-page="residential"]),
#site-header.sticky-navbar-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 99999;
  width: 100%;
}

#site-header:not([data-page="home"]):not([data-page="residential"]) .site-header,
#site-header.sticky-navbar-header .site-header {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#site-header:not([data-page="home"]):not([data-page="residential"]) .top-bar,
#site-header.sticky-navbar-header .top-bar {
  transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
  overflow: hidden;
  max-height: 60px;
}

#site-header:not([data-page="home"]):not([data-page="residential"]).is-scrolled .top-bar,
#site-header.sticky-navbar-header.is-scrolled .top-bar {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* ========================================================
   2. MAIN NAVIGATION HEADER / NAVBAR
======================================================== */
.site-header,
.main-header {
  background: #ffffff;
  border-bottom: 1px solid var(--nav-border);
  position: relative;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  width: 100%;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 82px;
  width: 100%;
}

.logo-wrapper,
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img,
.site-logo {
  height: 58px;
  width: auto;
  max-width: 230px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.logo-wrapper:hover .logo-img,
.logo-link:hover .site-logo {
  transform: scale(1.02);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--nav-header-text);
  padding: 8px 4px;
  position: relative;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.nav-link:hover,
.nav-link.active {
  color: var(--nav-red);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--nav-red);
  border-radius: 2px;
}

.header-cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.header-phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #e31837 0%, #9e0b22 100%);
  color: #ffffff !important;
  padding: 10px 22px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.35);
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-phone-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(200, 16, 46, 0.45);
}

.emergency-tag {
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--nav-header-text);
  margin-top: 4px;
  text-transform: uppercase;
}

/* Mobile Hamburger Toggle */
.mobile-menu-toggle {
  display: none;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: var(--nav-header-text);
  font-size: 20px;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: #e2e8f0;
}

/* ========================================================
   3. MOBILE NAVIGATION DRAWER & BACKDROP
======================================================== */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  background: var(--nav-navy-dark);
  z-index: 10005;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  right: 0;
}

.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 10004;
  display: none;
}

.drawer-backdrop.active {
  display: block;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.drawer-logo {
  height: 42px;
  width: auto;
}

.drawer-close-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

.drawer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 30px;
  padding: 0;
}

.drawer-nav-list a {
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  display: block;
  padding: 8px 0;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s ease;
}

.drawer-nav-list a:hover,
.drawer-nav-list a.active {
  color: var(--nav-yellow);
}

.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.drawer-btn-call {
  background: var(--nav-red);
  color: #ffffff !important;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  padding: 12px;
  border-radius: 6px;
  font-size: 15px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.drawer-btn-schedule {
  background: var(--nav-yellow);
  color: #091a2c;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  padding: 12px;
  border-radius: 6px;
  font-size: 15px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ========================================================
   4. BOTTOM FOOTER BAR
======================================================== */
.main-footer-bar {
  background: var(--nav-navy-footer);
  padding: 16px 0;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 100;
  width: 100%;
}

.bottom-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.bottom-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.bottom-phone-link:hover {
  color: var(--nav-yellow) !important;
}

.bottom-phone-link .phone-icon-svg {
  font-size: 22px;
  color: #ffffff;
}

.bottom-schedule-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--nav-yellow);
  color: var(--nav-navy-footer);
  padding: 8px 28px;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  transform: skewX(-15deg);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.bottom-schedule-badge:hover {
  transform: skewX(-15deg) translateY(-2px);
  background: #ffc926;
}

.bottom-schedule-badge>* {
  transform: skewX(15deg);
}

.bottom-schedule-badge .badge-text-box {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.bottom-schedule-badge .badge-label {
  font-size: 13px;
  font-weight: 900;
}

.bottom-schedule-badge .badge-sub {
  font-size: 11px;
  font-weight: 800;
}

.bottom-sameday-text {
  font-family: 'Dancing Script', 'Yellowtail', cursive, sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

/* ========================================================
   5. RESPONSIVE BREAKPOINTS (Regular Screen Size > 1074px)
======================================================== */
@media (min-width: 1075px) {
  .site-header .nav-menu {
    display: flex !important;
  }

  .mobile-menu-toggle {
    display: none !important;
  }

  .header-cta-wrapper {
    display: flex !important;
  }
}

@media (max-width: 1074px) {
  .site-header .nav-menu {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #0b2b4f !important;
    color: #ffffff !important;
    border: 1px solid #0b2b4f !important;
  }

  /* Remove phone number button from top navbar in mobile view as requested */
  .header-cta-wrapper,
  .header-phone-btn,
  .emergency-tag {
    display: none !important;
  }
}

@media (max-width: 680px) {
  .top-bar-inner {
    justify-content: center;
    text-align: center;
  }

  .top-bar-left,
  .top-bar-right {
    display: none;
  }

  .navbar-container {
    height: 72px;
  }

  .logo-img,
  .site-logo {
    height: 46px;
  }

  .header-cta-wrapper {
    display: none;
  }

  .bottom-sameday-text {
    display: none;
  }

  .bottom-bar-inner {
    justify-content: space-around;
  }

  .bottom-phone-link {
    font-size: 20px;
  }

  .bottom-schedule-badge {
    padding: 6px 16px;
    font-size: 12px;
  }
}

@media (max-width: 440px) {
  .bottom-phone-link span {
    font-size: 16px;
  }
}

