/**
 * Figma blog header — primary bar, secondary bar, scroll sticky bar
 * Frame: Latingles Designs (Copy) → Sticky Header (35511:22315)
 */

.ltb-header {
  position: relative;
  z-index: 4000;
  isolation: isolate;
  overflow: visible;
}

.ltb-header--no-scroll-bar .ltb-header-sticky {
  display: none;
}

/* Override legacy sticky header styles from blog.css */
.ltb-header.ltb-header--static,
.ltb-header:not(.ltb-header--static) {
  position: relative;
  top: auto;
  border-bottom: 0;
  overflow: visible;
}

.ltb-header-main {
  position: relative;
  z-index: 1;
  background: #fff;
  overflow: visible;
}

/* --------------------------------------------------------------------------
   Sticky bar (shown after scroll)
   -------------------------------------------------------------------------- */
.ltb-header-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  background: #ffe4e0;
  padding: 12px 24px;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s;
}

.ltb-header--scrolled .ltb-header-sticky {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ltb-header-sticky__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1344px;
  margin: 0 auto;
  width: 100%;
}

.ltb-header-sticky__tagline {
  flex: 1;
  margin: 0;
  padding: 0 24px;
  font-size: 17px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -1px;
  color: #121117;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ltb-header-sticky__cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  background: #121117;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -1px;
  line-height: 1;
  text-decoration: none;
  transition: background 0.15s ease;
}

.ltb-header-sticky__cta:hover {
  background: #2a2a32;
  color: #fff;
}

/* --------------------------------------------------------------------------
   Primary navigation bar
   -------------------------------------------------------------------------- */
.ltb-header-primary {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ltb-header-primary__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
  padding: 14px 64px;
  max-width: 1500px;
  margin: 0 auto;
  box-sizing: border-box;
}

.ltb-header-primary__start {
  display: flex;
  align-items: center;
  gap: 36px;
  min-width: 0;
}

.ltb-header-primary__end {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.ltb-header-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.ltb-header-logo img,
.ltb-header-logo .custom-logo {
  display: block;
  width: auto;
  height: auto;
}

.ltb-header-logo--full img,
.ltb-header-logo--full .custom-logo {
  height: 40px;
  max-width: 230px;
}

.ltb-header-logo--compact img,
.ltb-header-logo--compact .custom-logo {
  height: 28px;
  max-width: 161px;
}

.ltb-header-topnav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.ltb-header-topnav__link {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.32px;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}

.ltb-header-topnav__link:hover,
.ltb-header-topnav__link.is-active {
  color: #004aad;
}

.ltb-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 258px;
  height: 46px;
  padding: 0 32px;
  border: 2px solid #121117;
  border-radius: 8px;
  background: #ff2500;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.ltb-header-cta:hover {
  background: #e02200;
  color: #fff;
}

.ltb-header-locale {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 0 16px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #000;
}

.ltb-header-locale__label {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  white-space: nowrap;
}

.ltb-header-locale__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  box-sizing: border-box;
}

.ltb-header-locale__icon img {
  display: block;
  width: 13px;
  height: 8px;
}

.ltb-header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 180px;
  height: 40px;
  padding: 8px 12px 8px 16px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

.ltb-header-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: #121117;
  outline: none;
}

.ltb-header-search__input::placeholder {
  color: #999;
}

.ltb-header-search__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.ltb-header-search__submit img {
  display: block;
  width: 20px;
  height: 20px;
}

.ltb-header .ltb-hamburger {
  display: none;
}

/* --------------------------------------------------------------------------
   Secondary navigation bar
   -------------------------------------------------------------------------- */
.ltb-header-secondary {
  position: relative;
  z-index: 2;
  background: #fff;
  box-shadow: inset 0 -1px 0 0 #dbdbe5;
  overflow: visible;
}

.ltb-header-secondary__inner {
  display: flex;
  align-items: stretch;
  gap: 24px;
  min-height: 80px;
  padding: 0 64px;
  max-width: 1500px;
  margin: 0 auto;
  box-sizing: border-box;
  overflow: visible;
}

.ltb-header-secondary-menu {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px 28px;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ltb-header-secondary-menu > li {
  position: relative;
  display: flex;
  align-items: center;
}

.ltb-header-secondary-menu > li > a {
  padding: 28px 0;
}

.ltb-header-secondary-menu a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.32px;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.ltb-header-secondary-menu a:hover,
.ltb-header-secondary-menu a.is-active,
.ltb-header-secondary-menu li.current-menu-item > a {
  color: #004aad;
}

.ltb-header-secondary-menu .ltb-header-chevron {
  display: block;
  width: 12px;
  height: 8px;
  transition: transform 0.2s ease;
}

.ltb-header-secondary-menu li:hover > a .ltb-header-chevron {
  transform: rotate(180deg);
}

.ltb-header-secondary-menu .sub-menu {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  padding: 8px 0;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  z-index: 10;
}

.ltb-header-secondary-menu li:hover > .sub-menu,
.ltb-header-secondary-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.ltb-header-secondary-menu .sub-menu li {
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ltb-header-secondary-menu .sub-menu a {
  display: block;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #334155;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.ltb-header-secondary-menu .sub-menu a:hover,
.ltb-header-secondary-menu .sub-menu li.current-menu-item > a {
  background: #f8fafc;
  color: #004aad;
}

/* --------------------------------------------------------------------------
   Mobile drawer
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .ltb-header-primary__inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .ltb-header-secondary__inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .ltb-header-cta {
    min-width: 0;
    padding: 0 20px;
  }

  .ltb-header-sticky__tagline {
    font-size: 15px;
    padding: 0 12px;
  }
}

@media (max-width: 960px) {
  .ltb-header-topnav,
  .ltb-header-locale,
  .ltb-header-search {
    display: none;
  }

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

  .ltb-header .ltb-hamburger {
    display: flex;
  }

  .ltb-header-secondary {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #dbdbe5;
    box-shadow: none;
    z-index: 3;
    max-height: min(70vh, 520px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.ltb-nav-open {
    overflow: hidden;
  }

  body.ltb-nav-open .ltb-header-secondary {
    display: block;
  }

  .ltb-header-secondary__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    padding: 0 16px 12px;
    overflow: visible;
  }

  .ltb-header-secondary-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .ltb-header-secondary-menu > li {
    border-bottom: 1px solid #f1f5f9;
  }

  .ltb-header-secondary-menu .menu-item-has-children {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .ltb-header-secondary-menu a,
  .ltb-header-secondary-menu > li > a {
    display: flex;
    width: 100%;
    padding: 14px 0;
  }

  .ltb-header-secondary-menu .menu-item-has-children > a {
    flex: 1;
    min-width: 0;
    width: auto;
  }

  .ltb-header-secondary-menu .menu-item-has-children > a .ltb-header-chevron {
    display: none;
  }

  .ltb-header-secondary-menu .ltb-sub-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    margin-right: -4px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #121117;
  }

  .ltb-header-secondary-menu .ltb-sub-toggle::before {
    content: '';
    display: block;
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform 0.2s ease;
  }

  .ltb-header-secondary-menu .menu-item-has-children.is-open > .ltb-sub-toggle::before {
    transform: rotate(-135deg);
    margin-top: 3px;
  }

  .ltb-header-secondary-menu .sub-menu {
    display: none;
    position: static;
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    padding: 0 0 12px 16px;
    margin: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .ltb-header-secondary-menu .menu-item-has-children.is-open > .sub-menu {
    display: block;
  }

  .ltb-header-secondary-menu .sub-menu > li {
    border-bottom: 0;
  }

  .ltb-header-secondary-menu .sub-menu a {
    padding: 8px 0;
    font-size: 14px;
    color: #4b5563;
  }

  .ltb-header-secondary-menu .sub-menu a:hover,
  .ltb-header-secondary-menu .sub-menu li.current-menu-item > a {
    background: transparent;
    color: #004aad;
  }

  .ltb-header-primary {
    position: relative;
  }

  .ltb-header-sticky__tagline {
    display: none;
  }
}

@media (max-width: 520px) {
  .ltb-header-primary__inner {
    min-height: 60px;
    padding: 10px 16px;
    gap: 12px;
  }

  .ltb-header-logo--full img,
  .ltb-header-logo--full .custom-logo {
    max-width: 155px;
    height: auto;
  }

  .ltb-header .ltb-hamburger {
    width: 44px;
    height: 44px;
    padding: 10px;
    margin-right: -10px;
  }

  .ltb-header-sticky {
    padding: 8px 14px;
  }

  .ltb-header-sticky .ltb-header-logo--compact img,
  .ltb-header-sticky .ltb-header-logo--compact .custom-logo {
    max-width: 125px;
    height: auto;
  }

  .ltb-header-sticky__cta {
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 6px;
  }
}

@media (max-width: 360px) {
  .ltb-header-primary__inner {
    padding-left: 12px;
    padding-right: 12px;
  }

  .ltb-header-logo--full img,
  .ltb-header-logo--full .custom-logo {
    max-width: 128px;
  }

  .ltb-header-sticky .ltb-header-logo--compact img,
  .ltb-header-sticky .ltb-header-logo--compact .custom-logo {
    max-width: 105px;
  }

  .ltb-header-sticky__cta {
    font-size: 12px;
    padding: 0 10px;
  }
}
