/* ==========================================================================
   BEMAXX HEADER CSS (components/header.css)
   Official Palette:
     - Primary Blue: #0088E0
     - Dark Blue: #005A9E
     - Accent Red: #E4002B
     - Heading/Text: #1F2937
   ========================================================================== */

:root {
  --bx-header-bg: #ffffff;
  --bx-primary-blue: #0088E0;
  --bx-dark-blue: #005A9E;
  --bx-menu-link-color: #1F2937;
  --bx-accent-red: #E4002B;
  --bx-accent-red-hover: #c80026;
  --bx-font-heading: 'Roboto', sans-serif;
  --bx-font-nav: 'Poppins', sans-serif;
}

.bx-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bx-header-bg);
  box-shadow: 0 2px 14px rgba(0, 90, 158, 0.06);
  border-bottom: 1.5px solid #edf2f7;
  z-index: 99999;
  font-family: var(--bx-font-nav);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.bx-header.bx-header-scrolled {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 90, 158, 0.12);
  border-bottom-color: rgba(0, 136, 224, 0.18);
}

.bx-header-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 12px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.3s ease;
}

.bx-header.bx-header-scrolled .bx-header-container {
  padding: 8px 30px;
}

/* --- Brand Logo Link & Image --- */
.bx-brand-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.bx-header-logo-img {
  height: 52px;
  width: auto;
  max-width: 250px;
  object-fit: contain;
  display: block;
  transition: height 0.3s ease;
}

.bx-header.bx-header-scrolled .bx-header-logo-img {
  height: 44px;
}

/* --- Navigation Links (Poppins, 17px, line-height: 28px) --- */
.bx-nav {
  display: flex;
  align-items: center;
}

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

.bx-nav-item {
  position: relative;
}

.bx-nav-link {
  font-family: var(--bx-font-nav);
  font-size: 17px;
  line-height: 28px;
  font-weight: 500;
  color: var(--bx-menu-link-color);
  text-decoration: none;
  padding: 6px 0;
  display: inline-block;
  position: relative;
  transition: color 0.2s ease;
}

.bx-nav-link:hover {
  color: var(--bx-primary-blue);
}

/* Active Link State with Exact Blue Underline */
.bx-nav-link.active {
  color: var(--bx-primary-blue);
  font-weight: 600;
}

.bx-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2.8px;
  background-color: var(--bx-primary-blue);
  border-radius: 3px;
}

/* --- Get Quote Red Pill Button (#E4002B) --- */
.bx-quote-wrapper {
  display: flex;
  align-items: center;
}

.bx-quote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--bx-accent-red);
  color: #ffffff !important;
  font-family: var(--bx-font-nav);
  font-size: 15px;
  font-weight: 600;
  padding: 11px 26px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(228, 0, 43, 0.35);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.bx-quote-btn:hover {
  background-color: var(--bx-accent-red-hover);
  box-shadow: 0 6px 20px rgba(228, 0, 43, 0.48);
  transform: translateY(-1px);
}

.bx-arrow {
  transition: transform 0.2s ease;
}

.bx-quote-btn:hover .bx-arrow {
  transform: translateX(4px);
}

.bx-mobile-quote {
  display: none;
}

/* --- Mobile Hamburger Toggle Button --- */
.bx-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.bx-bar {
  width: 100%;
  height: 2.5px;
  background-color: var(--bx-menu-link-color);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.bx-menu-toggle.open .bx-bar:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.bx-menu-toggle.open .bx-bar:nth-child(2) {
  opacity: 0;
}

.bx-menu-toggle.open .bx-bar:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1060px) {
  .bx-nav-list {
    gap: 20px;
  }
  .bx-nav-link {
    font-size: 15.5px;
  }
  .bx-quote-btn {
    padding: 9px 20px;
    font-size: 14.5px;
  }
}

@media (max-width: 992px) {
  .bx-header-container {
    padding: 10px 20px;
  }

  .bx-header-logo-img {
    height: 44px;
  }

  .bx-menu-toggle {
    display: flex;
  }

  .bx-quote-wrapper {
    display: none;
  }

  .bx-nav {
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    height: calc(100vh - 68px);
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
  }

  .bx-nav.nav-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .bx-nav-list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  .bx-nav-item {
    width: 100%;
    border-bottom: 1px solid #f1f5f9;
  }

  .bx-nav-link {
    width: 100%;
    padding: 14px 0;
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  .bx-nav-link.active::after {
    bottom: -1px;
    width: 40px;
  }

  .bx-mobile-quote {
    display: block;
    width: 100%;
    margin-top: 25px;
  }

  .bx-mobile-quote .bx-quote-btn {
    width: 100%;
    padding: 13px 20px;
    font-size: 16px;
    line-height: 1.35;
  }
}
