/* =============================================
   BESTCLEAN24 — HEADER
   Level 1: Blue bar (logo + main nav)
   Level 2: White bar (services nav)
   + Mobile side panel
   + Floating phone bar (mobile only)
   ============================================= */


/* =============================================================
   LEVEL 1 — BLUE BAR
   ============================================================= */
.bc-header-main {
  background: var(--bc-blue);
  position: relative;
  z-index: 100;
}

.bc-header-main-inner {
  max-width: var(--bc-max-width);
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--bc-header-top);
  position: relative;
}

/* Logo — overflows into white bar */
.bc-logo {
  font-family: var(--bc-font);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--bc-white);
  text-decoration: none;
  letter-spacing: -0.03em;
  line-height: 1;
  position: relative;
  z-index: 110;
  transform: translateY(8px);
  transition: opacity 0.2s;
}

.bc-logo:hover,
.bc-logo:visited {
  color: var(--bc-white);
}

.bc-logo-24 {
  font-weight: 800;
}

/* Main nav */
.bc-nav-main {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bc-nav-main li {
  list-style: none;
}

.bc-nav-main a {
  font-family: var(--bc-font);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--bc-white);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity var(--bc-transition);
  position: relative;
  padding-bottom: 2px;
}

.bc-nav-main a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--bc-white);
  transition: width var(--bc-transition);
}

.bc-nav-main a:hover,
.bc-nav-main a:focus {
  opacity: 1;
  color: var(--bc-white);
}

.bc-nav-main a:hover::after {
  width: 100%;
}

/* Current page highlight */
.bc-nav-main .current-menu-item a,
.bc-nav-main .current_page_item a {
  opacity: 1;
}

.bc-nav-main .current-menu-item a::after,
.bc-nav-main .current_page_item a::after {
  width: 100%;
}


/* =============================================================
   WAVE SEPARATOR
   ============================================================= */
.bc-header-wave {
  position: relative;
  z-index: 95;
  margin-top: -2px;
  line-height: 0;
  background: var(--bc-blue);
}

.bc-header-wave svg {
  display: block;
  width: 100%;
  height: 18px;
}


/* =============================================================
   LEVEL 2 — WHITE SERVICES BAR
   ============================================================= */
.bc-header-services {
  background: var(--bc-white);
  position: relative;
  z-index: 90;
  border-bottom: 1px solid var(--bc-border);
}

.bc-header-services-inner {
  max-width: var(--bc-max-width);
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--bc-header-services);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bc-header-services-inner::-webkit-scrollbar {
  display: none;
}

.bc-nav-services {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  white-space: nowrap;
  margin: 0;
  padding: 0;
}

.bc-nav-services li {
  list-style: none;
}

.bc-nav-services a {
  font-family: var(--bc-font);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bc-blue);
  text-decoration: none;
  padding: 0 1.1rem;
  height: var(--bc-header-services);
  display: flex;
  align-items: center;
  transition: all var(--bc-transition);
  border-bottom: 2px solid transparent;
  position: relative;
}

.bc-nav-services a:hover,
.bc-nav-services a:focus {
  color: var(--bc-blue-dark);
  background: var(--bc-blue-light);
  border-bottom-color: var(--bc-blue);
}

/* Active service page */
.bc-nav-services .current-menu-item a,
.bc-nav-services .current_page_item a {
  border-bottom-color: var(--bc-blue);
  background: var(--bc-blue-light);
}

/* Separators between service links */
.bc-nav-services li:not(:last-child) a::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 16px;
  background: #E0E0E0;
}


/* =============================================================
   STICKY HEADER — compact on scroll
   ============================================================= */
.bc-header-wrap {
  position: relative;
  z-index: 1000;
}

.bc-header-wrap.is-sticky .bc-header-main {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.bc-header-wrap.is-sticky .bc-header-main-inner {
  height: 56px;
}

.bc-header-wrap.is-sticky .bc-logo {
  font-size: 1.4rem;
  transform: translateY(0);
}

.bc-header-wrap.is-sticky .bc-header-wave {
  display: none;
}

.bc-header-wrap.is-sticky .bc-header-services {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.bc-header-wrap.is-sticky .bc-header-services-inner {
  height: 42px;
}

.bc-header-wrap.is-sticky .bc-nav-services a {
  font-size: 0.72rem;
  height: 42px;
}

/* Spacer to prevent content jump */
.bc-header-spacer {
  display: none;
}

.bc-header-wrap.is-sticky + .bc-header-spacer {
  display: block;
  height: calc(56px + 42px);
}


/* =============================================================
   HAMBURGER — mobile only
   ============================================================= */
.bc-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
}

.bc-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bc-white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animated X state */
.bc-hamburger.is-active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.bc-hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.bc-hamburger.is-active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* =============================================================
   SIDE PANEL — mobile menu
   ============================================================= */
.bc-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1500;
  opacity: 0;
  transition: opacity 0.3s;
}

.bc-panel-overlay.is-active {
  opacity: 1;
}

.bc-side-panel {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  height: 100dvh;
  background: var(--bc-blue);
  z-index: 2000;
  transition: right 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  overflow-y: auto;
  padding: 4.5rem 1.5rem 2rem;
  -webkit-overflow-scrolling: touch;
}

.bc-side-panel.is-active {
  right: 0;
}

.bc-panel-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--bc-white);
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 0.5rem;
  line-height: 1;
}

.bc-panel-close:hover {
  opacity: 1;
}

.bc-panel-label {
  font-family: var(--bc-font);
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.6rem;
  padding-left: 0.25rem;
}

.bc-panel-nav {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.bc-panel-nav li {
  list-style: none;
}

.bc-panel-nav a {
  display: block;
  font-family: var(--bc-font);
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 0.55rem 0.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color 0.2s, padding-left 0.2s;
}

.bc-panel-nav a:hover {
  color: var(--bc-white);
  padding-left: 0.5rem;
}

.bc-panel-sep {
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 0.25rem 0 1.25rem;
}

.bc-panel-cta {
  margin-top: 1.5rem;
}

.bc-panel-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-family: var(--bc-font);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  border-radius: var(--bc-radius);
  background: var(--bc-white);
  color: var(--bc-blue);
  border: 2px solid var(--bc-white);
  transition: all var(--bc-transition);
}

.bc-panel-phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-family: var(--bc-font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--bc-white);
  text-decoration: none;
}

.bc-panel-phone svg {
  width: 18px;
  height: 18px;
  stroke: var(--bc-white);
  fill: none;
  stroke-width: 2;
}


/* =============================================================
   FLOATING PHONE BAR — mobile only, slides up on scroll
   ============================================================= */
.bc-float-bar {
  display: none; /* shown only on mobile via media query */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1400;
  background: var(--bc-blue);
  padding: 10px 16px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  box-shadow: 0 -4px 20px rgba(0,49,244,0.25);
  text-decoration: none;
  cursor: pointer;
}

.bc-float-bar.is-visible {
  transform: translateY(0);
}

.bc-float-bar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bc-float-bar-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--bc-white);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Phone shake when bar appears */
.bc-float-bar.is-visible .bc-float-bar-icon svg {
  animation: bc-phone-ring 0.6s ease-in-out 0.4s;
}

.bc-float-bar-text {
  color: var(--bc-white);
  font-family: var(--bc-font);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.bc-float-bar-text small {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  opacity: 0.7;
  margin-top: 1px;
}

.bc-float-bar-arrow {
  width: 20px;
  height: 20px;
  stroke: var(--bc-white);
  fill: none;
  stroke-width: 2;
  opacity: 0.5;
}

@keyframes bc-phone-ring {
  0% { transform: rotate(0deg); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-12deg); }
  45% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); }
  75% { transform: rotate(3deg); }
  100% { transform: rotate(0deg); }
}


/* =============================================================
   MOBILE RESPONSIVE
   ============================================================= */
@media (max-width: 900px) {
  .bc-hamburger {
    display: flex;
  }

  .bc-nav-main {
    display: none;
  }

  .bc-header-services {
    display: none;
  }

  .bc-header-wave {
    display: none;
  }

  .bc-panel-overlay {
    display: block;
    pointer-events: none;
  }

  .bc-panel-overlay.is-active {
    pointer-events: auto;
  }

  .bc-header-main-inner {
    padding: 0 1.25rem;
    height: 64px;
  }

  .bc-logo {
    font-size: 1.7rem;
    transform: translateY(0);
  }

  /* Floating bar visible on mobile */
  .bc-float-bar {
    display: flex;
  }

  /* Sticky adjustments */
  .bc-header-wrap.is-sticky .bc-header-main-inner {
    height: 56px;
  }

  .bc-header-wrap.is-sticky .bc-logo {
    font-size: 1.4rem;
  }

  .bc-header-wrap.is-sticky + .bc-header-spacer {
    height: 56px;
  }

  /* Float bar safe area for phones with home indicator */
  .bc-float-bar {
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .bc-logo {
    font-size: 1.5rem;
  }
}
