/* ============================================================
   BlueBird Fence — Mobile Hamburger Navigation
   File: css/mobile-nav.css
   ============================================================ */

/* ----- Nav bar ----- */
.mobile-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: fit-content;
  position: relative;
  z-index: 1001;
}

/* Remove or delete the .nav-center block entirely */


.mobile-nav-bar .nav-logo {
  font-size: 15px;
  font-weight: 700;
  color: var(--sos-white);
  text-decoration: none;
}

.mobile-nav-bar .nav-center {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0; /* was: margin: auto — this was centering and pushing things around */
}
.mobile-menu-overlay {
  position: absolute;
  top: 70px; /* was 111px — match this to your new nav bar height */
  left: 0;
  right: 0;
  width: 100vw;
  background: var(--sos-primary-red);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.mobile-nav-bar .nav-phone {
  font-size: 13px;
  font-weight: 600;
  color: var(--sos-white);
  text-decoration: none;
}

.mobile-nav-bar .nav-phone:hover {
  color: var(--sos-primary-red);
}

/* ----- Hamburger button ----- */
.hamburger-btn {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  border: none;
  background: var(--sos-primary-red);
  border-radius: 8px;
  padding: 6px;
  flex-shrink: 0;
}

.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--sos-white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

.hamburger-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----- Menu overlay ----- */
.mobile-menu-overlay {
  position: absolute;
  top: 111px;
  left: 0;
  right: 0;
  background: var(--sos-primary-red);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
}


.mobile-menu-overlay.is-open {
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ----- Menu lists ----- */
.mobile-menu-overlay ul.menu,
.mobile-menu-overlay ul.sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu-overlay ul.sub-menu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-overlay .menu-item.is-open > .sub-menu {
  max-height: 1400px;
}

/* ----- Menu links — level 1 ----- */
.mobile-menu-overlay .menu > .menu-item > a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--sos-white);
  text-decoration: none;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease, color 0.15s ease;
}

.mobile-menu-overlay .menu > .menu-item > a:hover {
  background: var(--sos-deep-red);
}

.mobile-menu-overlay .menu > .menu-item.is-open > a {
  background: var(--sos-primary-red);
  color: var(--sos-primary-red);
  border-bottom-color: transparent;
}

/* ----- Menu links — level 2 ----- */
.mobile-menu-overlay .sub-menu > .menu-item > a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sos-white);
  text-decoration: none;
  text-align: center;
  background: var(--sos-deep-red);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease, color 0.15s ease;
}

.mobile-menu-overlay .sub-menu > .menu-item > a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-overlay .sub-menu > .menu-item.is-open > a {
  background: var(--sos-primary-red);
  color: var(--sos-primary-red);
  border-bottom-color: transparent;
}

/* ----- Menu links — level 3 ----- */
.mobile-menu-overlay .sub-menu .sub-menu > .menu-item > a {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.2);
}

.mobile-menu-overlay .sub-menu .sub-menu > .menu-item > a:hover {
  background: rgba(0, 0, 0, 0.35);
}

/* ----- Menu links — level 4 ----- */
.mobile-menu-overlay .sub-menu .sub-menu .sub-menu > .menu-item > a {
  padding: 11px 20px;
  font-size: 12.5px;
  font-weight: 400;
  background: rgba(0, 0, 0, 0.3);
}

.mobile-menu-overlay .sub-menu .sub-menu .sub-menu > .menu-item > a:hover {
  background: rgba(0, 0, 0, 0.45);
}

/* ----- Chevron — white for closed, blue for open (on gold bg) ----- */
.mobile-menu-overlay .menu-item-has-children > a::after {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 0.22s ease;
}

.mobile-menu-overlay .menu-item-has-children.is-open > a::after {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' stroke='%231150bf' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transform: rotate(180deg);
}

/* ----- Get A Quote CTA ----- */
.mobile-menu-overlay .nav-cta > a {
  background: var(--sos-primary-red) !important;
  color: var(--sos-primary-red) !important;
  border-bottom-color: transparent !important;
}

.mobile-menu-overlay .nav-cta > a:hover {
  background: var(--sos-deep-red) !important;
  color: var(--sos-white) !important;
}

/* ----- Phone item in menu list ----- */
.mobile-menu-overlay .link-phone > a {
  color: var(--sos-primary-red) !important;
  font-weight: 600 !important;
}

/* ----- Current page highlight ----- */
.mobile-menu-overlay .current-menu-item > a,
.mobile-menu-overlay .current_page_item > a {
  color: var(--sos-primary-red) !important;
}
.mobile-menu-overlay .menu > .menu-item.current-menu-item > a
{background-color: var(--sos-black)}
.hamburger-btn.is-open {
  background: var(--sos-primary-red);
}
.hamburger-btn.is-open span {
  background: var(--sos-white);
}
.mobile-nav-bar {
  position: relative;
  z-index: 1001;
}

.mobile-menu-overlay {
  z-index: 1000; /* already set to 999, just confirm it's lower than nav-bar */
}
/* ----- Show on mobile only — adjust breakpoint to match your theme ----- */
@media (max-width: 1175px) {
  .mobile-nav-wrapper {
    display: block;
    width: 100vw;
    margin-left:0;
  }
  .mobile-nav-wrapper .site-title a {
    background-size: 100% auto;
    width: 130px;
    height: 85px;
    margin: 0;
  }
  .site-header .container .col.n1,
  .site-header .container .col.n3,
  .main-navigation,
  .hero-primary-cta-label,
  a.hero-primary-cta {
    display: none !important;
  }
  .site-header .col.n{width: 100%}
  #masthead{padding: 20px 0}
}


