.lbc-header{
  position: relative;
  background: var(--color-primary);
  color: var(--color-text-light);
  height: var(--header-height);
  z-index: var(--z-header);
  width: 100%;
}

.lbc-header.is-fixed{
  position: fixed;
  top: 0;
  left: 0;
}

/* Account for WordPress admin bar */
.admin-bar .lbc-header.is-fixed{
  top: 32px;
}

@media screen and (max-width: 782px){
  .admin-bar .lbc-header.is-fixed{
    top: 46px;
  }
}

.lbc-header__inner{
  max-width: var(--container-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.lbc-header-spacer{
  height: var(--header-height);
}
.lbc-header:not(.is-fixed) + .lbc-header-spacer{
  height: 0;
}

/* Brand */
.lbc-header__brand{
  min-width: 190px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.lbc-brand,
.lbc-header__brand .custom-logo-link{
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-text-light);
}
.lbc-brand img,
.lbc-header__brand .custom-logo-link img,
.lbc-header__brand .custom-logo{
  width: var(--lbc-logo-width, 150px) !important;
  height: var(--lbc-logo-height, auto) !important;
  max-height: calc(var(--header-height) - 16px) !important;
  display: block;
  object-fit: contain;
}
.lbc-brand__text{
  font-weight: var(--font-weight-extrabold);
  letter-spacing: .02em;
}

/* Nav */
.lbc-nav{
  flex: 1;
  display: flex;
  justify-content: center;
}
.lbc-nav__list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}
.lbc-nav__list a{
  color: var(--color-text-light-85);
  text-decoration: none;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: var(--font-size-sm);
  padding: var(--spacing-sm) 2px;
  position: relative;
  white-space: nowrap;
}
.lbc-nav__list a:hover{
  color: var(--color-text-light);
}

/* Active item (WordPress classes) */
.lbc-nav__list .current-menu-item > a,
.lbc-nav__list .current_page_item > a{
  color: var(--color-secondary);
}
.lbc-nav__list .current-menu-item > a::after,
.lbc-nav__list .current_page_item > a::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--color-secondary);
  border-radius: 2px;
  opacity: .9;
}

/* Language */
.lbc-lang{
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  min-width: 110px;
  justify-content: flex-end;
  font-weight: var(--font-weight-extrabold);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: var(--font-size-xs);
}
.lbc-lang a{
  color: var(--color-text-light-85);
  text-decoration: none;
  padding: 6px 0;
}
.lbc-lang a:hover{ color: var(--color-text-light); }
.lbc-lang a.is-active{ color: var(--color-secondary); }
.lbc-lang__divider{
  width: 1px;
  height: 12px;
  background: var(--color-text-light-75);
  display: inline-block;
}

/* Mobile */
.lbc-menu-btn,
.lbc-menu-btn:hover,
.lbc-menu-btn:focus,
.lbc-menu-btn:active{
  all: unset !important;
  display: none;
  color: var(--color-text-light) !important;
  padding: var(--spacing-sm) !important;
  cursor: pointer !important;
  order: 1;
}
.lbc-menu-btn__text{ display: none; }
.lbc-menu-btn__icon{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 18px;
  height: 14px;
  gap: 3px;
}
.lbc-menu-btn__icon span{
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-light);
  border-radius: 1px;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

/* Hamburger animation when open */
.lbc-menu-btn.is-open .lbc-menu-btn__icon span:nth-child(1){
  transform: translateY(5px) rotate(45deg);
}
.lbc-menu-btn.is-open .lbc-menu-btn__icon span:nth-child(2){
  opacity: 0;
}
.lbc-menu-btn.is-open .lbc-menu-btn__icon span:nth-child(3){
  transform: translateY(-5px) rotate(-45deg);
}

@media (min-width: 1025px){
  .lbc-menu-btn{ display: none !important; }
}

/* Mobile Drawer - Slides from bottom */
.lbc-mobile-drawer{
  display: none;
}

.lbc-mobile-overlay{
  display: none;
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 1024px){
  .lbc-nav{ display: none; }
  .lbc-menu-btn,
  .lbc-menu-btn:hover,
  .lbc-menu-btn:focus,
  .lbc-menu-btn:active,
  button.lbc-menu-btn,
  .lbc-header .lbc-menu-btn,
  .lbc-header button.lbc-menu-btn{ 
    all: unset !important;
    display: inline-flex !important; 
    align-items: center !important; 
    gap: var(--spacing-sm) !important;
    order: 1 !important;
    color: var(--color-text-light) !important;
    padding: var(--spacing-sm) !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
  }
  .lbc-header__inner{ 
    padding: 0 var(--spacing-lg);
    justify-content: space-between;
  }
  
  /* Mobile header layout: hamburger | logo | lang */
  .lbc-header__brand{
    order: 2;
    min-width: auto;
    flex: 1;
    justify-content: center;
  }
  
  /* Mobile logo size */
  .lbc-brand img,
  .lbc-header__brand .custom-logo-link img,
  .lbc-header__brand .custom-logo{
    width: var(--lbc-logo-width-mobile, 120px) !important;
    height: var(--lbc-logo-height-mobile, auto) !important;
    max-height: calc(var(--header-height) - 12px) !important;
  }
  
  .lbc-lang{
    order: 3;
    min-width: auto;
    justify-content: flex-end;
  }

  /* RTL: hamburger right, logo center, lang left */
  [dir="rtl"] .lbc-header__inner,
  html[lang="ar"] .lbc-header__inner{
    flex-direction: row-reverse;
  }
  [dir="rtl"] .lbc-menu-btn,
  html[lang="ar"] .lbc-menu-btn{
    order: 1;
  }
  [dir="rtl"] .lbc-header__brand,
  html[lang="ar"] .lbc-header__brand{
    order: 2;
  }
  [dir="rtl"] .lbc-lang,
  html[lang="ar"] .lbc-lang{
    order: 3;
    justify-content: flex-start;
  }

  /* Mobile overlay */
  .lbc-mobile-overlay{
    display: block;
    position: fixed;
    inset: 0;
    background: var(--color-overlay);
    z-index: var(--z-overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
  }
  .lbc-mobile-overlay.is-visible{
    opacity: 1;
    visibility: visible;
  }

  /* Mobile Drawer - Bottom Sheet Style */
  .lbc-mobile-drawer{
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal);
    background: var(--color-primary);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    max-height: 85vh;
    overflow: hidden;
    color: var(--color-text-light);
    
    /* Start off-screen at bottom */
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    
    /* Smooth eased animation - feels like drawer being pulled up */
    transition: 
      transform 0.5s cubic-bezier(0.32, 0.72, 0, 1),
      opacity var(--transition-slow),
      visibility 0.5s ease;
  }
  
  /* Open state - slide up into view */
  .lbc-mobile-drawer.is-open{
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  /* Rounded handle bar at top */
  .lbc-mobile-drawer__handle{
    width: 40px;
    height: 4px;
    background: var(--color-text-light-30);
    border-radius: 2px;
    margin: var(--spacing-md) auto var(--spacing-sm);
  }

  /* Drawer content */
  .lbc-mobile-drawer__content{
    padding: var(--spacing-lg) var(--spacing-xl) var(--spacing-2xl);
    overflow-y: auto;
    max-height: calc(85vh - 24px);
  }

  /* Ensure mobile menu text is readable on dark background */
  .lbc-mobile-drawer,
  .lbc-mobile-drawer *,
  .lbc-mobile-drawer a{
    color: var(--color-text-light);
  }

  /* Mobile navigation list */
  .lbc-mobile-nav__list{
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .lbc-mobile-nav__list li{
    border-bottom: 1px solid var(--color-text-light-10);
  }
  .lbc-mobile-nav__list li:last-child{
    border-bottom: none;
  }
  .lbc-mobile-nav__list a{
    display: block;
    color: var(--color-text-light-90);
    text-decoration: none;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: var(--font-size-base);
    padding: var(--spacing-lg) 0;
    transition: color var(--transition-base);
  }
  .lbc-mobile-nav__list a:hover,
  .lbc-mobile-nav__list a:focus{
    color: var(--color-secondary);
  }
  .lbc-mobile-nav__list .current-menu-item > a,
  .lbc-mobile-nav__list .current_page_item > a{
    color: var(--color-secondary);
  }

  /* RTL drawer text alignment */
  [dir="rtl"] .lbc-mobile-nav__list a,
  html[lang="ar"] .lbc-mobile-nav__list a{
    text-align: right;
  }
}