/*
 * Hampton child header override.
 * Built on the theme's native header architecture:
 * - header-default.php outputs the desktop wrapper + original hamburger button
 * - header-navi.php outputs logo + panel_right + menu_main_wrap_nav
 * - header-mobile.php outputs the off-canvas drawer
 *
 * Desktop is preserved.
 * Mobile phone header is handled separately with .afk-mobile-header-row.
 */

/* ==========================================================
   DESKTOP / GENERAL HEADER
   ========================================================== */

.top_panel_navi.afk-header-native {
  padding-bottom: 0 !important;
}

.top_panel_navi.afk-header-native .menu_main_wrap {
  position: relative;
  min-height: 80px;
  padding: 0 34px;
  box-sizing: border-box;
}

.top_panel_navi.afk-header-native .logo {
  float: left;
  display: inline-flex;
  align-items: center;
  margin: 0;
  max-width: min(42vw, 680px);
  min-height: 80px;
  position: relative;
  z-index: 3;
}

.top_panel_navi.afk-header-native .logo img,
.top_panel_navi.afk-header-native .logo img.logo_main,
.top_panel_navi.afk-header-native .logo img.logo_fixed,
.top_panel_navi.afk-header-native .logo img.logo_mobile {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: clamp(88px, 5.8vw, 152px);
}

.top_panel_navi.afk-header-native .panel_right {
  float: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-height: 80px;
  position: relative;
  z-index: 3;
}

.top_panel_navi.afk-header-native .panel_right .socials_wrap {
  top: 0;
  margin-right: 0;
}

.top_panel_navi.afk-header-native .socials_header_wrap,
.top_panel_navi.afk-header-native .socials_header_wrap_inner,
.top_panel_navi.afk-header-native .socials_header_wrap .socials {
  display: flex;
  align-items: center;
}

.top_panel_navi.afk-header-native .top_panel_custom_text {
  padding: 0;
  max-height: none;
  display: inline-flex;
  align-items: center;
}

.top_panel_navi.afk-header-native .top_panel_custom_text span {
  display: inline;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  font-weight: inherit;
}

.top_panel_navi.afk-header-native .top_panel_custom_text a,
.top_panel_navi.afk-header-native .top_panel_custom_text .sc_button,
.top_panel_navi.afk-header-native .top_panel_custom_text .theme_button,
.afk-mobile-drawer__cta a,
.afk-mobile-drawer__cta .sc_button,
.afk-mobile-drawer__cta .theme_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  padding: 16px 34px;
  border-radius: 999px;
  line-height: 1;
  font-size: 18px;
  font-weight: 600;
}

.top_panel_navi.afk-header-native .menu_main_wrap_nav {
  float: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: calc(100% - 980px);
  margin: 0;
  z-index: 2;
  pointer-events: auto;
}

.top_panel_navi.afk-header-native .menu_main_nav_area {
  float: none;
  padding-right: 0;
  margin-right: 0;
  text-align: center;
  visibility: visible;
  white-space: nowrap;
}

.top_panel_navi.afk-header-native .menu_main_nav,
.top_panel_navi.afk-header-native .menu_main_nav > li,
.top_panel_navi.afk-header-native .menu_main_nav > li > a {
  float: none;
}

.top_panel_navi.afk-header-native .menu_main_nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
}

.top_panel_navi.afk-header-native .menu_main_nav > li > a {
  margin: 0 1rem;
  padding: 0.45rem 0;
  line-height: 1.25;
}

.top_panel_navi.afk-header-native .search_wrap {
  display: none !important;
}

/* ==========================================================
   FIXED HEADER
   ========================================================== */

.top_panel_fixed .top_panel_navi.afk-header-native .menu_main_wrap {
  min-height: 80px;
}

.top_panel_fixed .top_panel_navi.afk-header-native .logo,
.top_panel_fixed .top_panel_navi.afk-header-native .panel_right {
  min-height: 80px;
}

.top_panel_fixed .top_panel_navi.afk-header-native .logo img,
.top_panel_fixed .top_panel_navi.afk-header-native .logo img.logo_main,
.top_panel_fixed .top_panel_navi.afk-header-native .logo img.logo_fixed,
.top_panel_fixed .top_panel_navi.afk-header-native .logo img.logo_mobile {
  max-height: 96px;
}

/* ==========================================================
   LARGE DESKTOP
   ========================================================== */

@media (min-width: 1440px) {
  .top_panel_navi.afk-header-native .menu_main_wrap {
    padding-left: clamp(34px, 4vw, 76px);
    padding-right: clamp(34px, 4vw, 76px);
  }

  .top_panel_navi.afk-header-native .logo {
    max-width: min(44vw, 760px);
  }

  .top_panel_navi.afk-header-native .menu_main_wrap_nav {
    max-width: calc(100% - 1080px);
  }

  .top_panel_navi.afk-header-native .logo img,
  .top_panel_navi.afk-header-native .logo img.logo_main,
  .top_panel_navi.afk-header-native .logo img.logo_fixed,
  .top_panel_navi.afk-header-native .logo img.logo_mobile {
    max-height: clamp(122px, 7.6vw, 210px);
  }
}

@media (min-width: 1800px) {
  .top_panel_navi.afk-header-native .logo {
    max-width: 820px;
  }

  .top_panel_navi.afk-header-native .menu_main_wrap_nav {
    max-width: calc(100% - 1180px);
  }

  .top_panel_navi.afk-header-native .logo img,
  .top_panel_navi.afk-header-native .logo img.logo_main,
  .top_panel_navi.afk-header-native .logo img.logo_fixed,
  .top_panel_navi.afk-header-native .logo img.logo_mobile {
    max-height: 228px;
  }
}

/* ==========================================================
   MEDIUM DESKTOP
   ========================================================== */

@media (max-width: 1366px) and (min-width: 768px) {
  .top_panel_navi.afk-header-native .menu_main_wrap {
    padding-left: 24px;
    padding-right: 24px;
  }

  .top_panel_navi.afk-header-native .logo {
    max-width: min(36vw, 520px);
  }

  .top_panel_navi.afk-header-native .menu_main_wrap_nav {
    max-width: calc(100% - 820px);
  }

  .top_panel_navi.afk-header-native .menu_main_nav > li > a {
    margin-left: 0.7rem;
    margin-right: 0.7rem;
    font-size: 0.95em;
  }
}

/* ==========================================================
   RIGHT CTA BUTTON - DESKTOP
   ========================================================== */

.top_panel_navi.afk-header-native .top_panel_custom_text a,
.top_panel_navi.afk-header-native .top_panel_custom_text .sc_button,
.top_panel_navi.afk-header-native .top_panel_custom_text .theme_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 14px 28px;
  width: auto !important;
  height: auto !important;

  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;

  border-radius: 999px;
  line-height: 1;

  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);

  transition: all 0.25s ease;
}

.top_panel_navi.afk-header-native .top_panel_custom_text a:hover,
.top_panel_navi.afk-header-native .top_panel_custom_text .sc_button:hover,
.top_panel_navi.afk-header-native .top_panel_custom_text .theme_button:hover {
  transform: translateY(-2px);
}

/* ==========================================================
   SOCIAL ICONS
   ========================================================== */

.top_panel_navi.afk-header-native .social_item,
.top_panel_navi.afk-header-native .social_icons,
.top_panel_navi.afk-header-native .social_icons span {
  line-height: 1;
}

.top_panel_navi.afk-header-native .social_icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top_panel_navi.afk-header-native .social_icons span {
  display: block;
}

.top_panel_navi.afk-header-native .socials_header_wrap_inner {
  gap: 10px;
}

.top_panel_navi.afk-header-native .social_item {
  display: inline-flex;
  align-items: center;
}

/* ==========================================================
   MOBILE DRAWER CTA
   ========================================================== */

.afk-mobile-drawer__cta {
  margin: 1rem 0 1.2rem;
}

.afk-mobile-drawer__cta > * {
  margin: 0;
}

/* ==========================================================
   AFK MOBILE HEADER - CLEAN STRUCTURE
   Mobile header is separate from Hampton's desktop .logo markup.
   Do not add other mobile header patches below this block.
   ========================================================== */

.afk-mobile-header-shell {
  display: none !important;
}

@media (max-width: 767px) {
  html body .top_panel,
  html body .top_panel_default,
  html body .top_panel_navi.afk-header-native {
    max-height: none !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  html body .top_panel > .menu_mobile_button:not(.afk-header-hamburger),
  html body .top_panel_default > .menu_mobile_button:not(.afk-header-hamburger) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  html body .top_panel_navi.afk-header-native {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  html body .top_panel_navi.afk-header-native .afk-desktop-header-shell {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  html body .top_panel_navi.afk-header-native .afk-mobile-header-shell {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    align-items: center !important;
    justify-content: space-between !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    height: 82px !important;
    min-height: 82px !important;

    margin: 0 !important;
    padding: 0 24px !important;

    box-sizing: border-box !important;
    background: #ffffff !important;
    overflow: visible !important;
  }

  html body .top_panel_navi.afk-header-native .afk-mobile-logo-link {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    flex: 0 1 auto !important;
    width: auto !important;
    max-width: calc(100% - 70px) !important;
    height: 82px !important;

    margin: 0 !important;
    padding: 0 !important;

    float: none !important;
    position: static !important;
    transform: none !important;

    line-height: 0 !important;
    text-decoration: none !important;
    z-index: 10 !important;
  }

  html body .top_panel_navi.afk-header-native .afk-mobile-logo-link img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 160px !important;
    max-height: 54px !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
    transform: none !important;
  }

  html body .top_panel_navi.afk-header-native .afk-mobile-logo-text,
  html body .top_panel_navi.afk-header-native .afk-mobile-logo-slogan {
    display: block !important;
    line-height: 1.1 !important;
    color: #071b4d !important;
  }

  html body .top_panel_navi.afk-header-native .afk-header-hamburger {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;

    align-items: center !important;
    justify-content: center !important;

    flex: 0 0 46px !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;

    margin: 0 !important;
    padding: 0 !important;

    float: none !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;

    line-height: 46px !important;
    text-align: center !important;
    font-size: 34px !important;
    color: #071b4d !important;
    text-decoration: none !important;
    z-index: 20 !important;
  }

  html body .top_panel_navi.afk-header-native .afk-header-hamburger:before {
    margin: 0 !important;
    line-height: 1 !important;
  }
}

@media (min-width: 768px) {
  html body .top_panel_navi.afk-header-native .afk-mobile-header-shell {
    display: none !important;
  }

  html body .top_panel_navi.afk-header-native .afk-desktop-header-shell {
    display: block !important;
  }
}


/* ==========================================================
   AFK MOBILE - KILL HAMPTON FIXED HEADER GAP
   The white gap is caused by Hampton's fixed header spacer.
   ========================================================== */

@media (max-width: 767px) {
  html body .top_panel_fixed_wrap,
  html body.top_panel_fixed .top_panel_fixed_wrap {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;

    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;

    overflow: hidden !important;
    pointer-events: none !important;
  }

  html body.top_panel_fixed .top_panel_navi.afk-header-native,
  html body .top_panel_navi.afk-header-native.state_fixed {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;

    margin-top: 0 !important;
    transform: none !important;
  }

  html body .top_panel_navi.afk-header-native > .menu_main_wrap.afk-desktop-header-shell {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;

    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;

    overflow: hidden !important;
    pointer-events: none !important;
  }

  html body .top_panel_navi.afk-header-native {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: visible !important;
  }

  html body .top_panel_navi.afk-header-native > .afk-mobile-header-shell {
    display: flex !important;

    height: 82px !important;
    min-height: 82px !important;
    max-height: 82px !important;

    margin: 0 !important;
    padding: 0 24px !important;

    box-sizing: border-box !important;
  }
}