/* ============================================================
   Future Horizon Travel – Header Styles
   Suki Child Theme | v1.0.0
   ============================================================ */

/* ---- Variables ---- */
.fht-site-header {
  --navy-950: #06254d;
  --navy-900: #0a376f;
  --navy-800: #0c4d91;
  --blue-700: #086dcc;
  --blue-600: #0f7be9;
  --blue-500: #2f9cf4;
  --cyan-400: #59d2ee;
  --sky-100: #eef8ff;
  --white: #ffffff;
  --text: #173a63;
  --muted: #607995;
  --line: rgba(44,128,205,.18);
  --shadow: 0 20px 60px rgba(34,104,170,.16);
  --shadow-soft: 0 10px 30px rgba(36,104,164,.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

/* ---- Fix Suki Parent Overflow Breaking Sticky ---- */
html, body, #canvas, #page, .suki-canvas, .site {
  overflow: visible !important;
}

/* ---- Header Wrapper ---- */
.fht-site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  padding: 10px 16px 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  transition: padding .3s ease, top .3s ease;
}

/* WP Admin Bar Offset */
.admin-bar .fht-site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .fht-site-header {
    top: 46px;
  }
}

.fht-header-shell {
  max-width: 1440px;
  margin: 0 auto;
  border: 1px solid rgba(67,145,216,.25);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  overflow: visible;
}

/* ---- Top Bar ---- */
.fht-topbar {
  color: #fff;
  border-radius: 27px 27px 0 0;
  background:
    radial-gradient(circle at 90% 0%, rgba(89,210,238,.32), transparent 32%),
    linear-gradient(100deg, var(--navy-900), var(--blue-600) 68%, #159fd3);
}

.fht-topbar-inner {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 26px;
  flex-wrap: wrap;
}

.fht-topbar-group {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.fht-topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.9);
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
  transition: color .2s;
}

.fht-topbar-item:hover { color: #fff; }
.fht-topbar-item strong { color: #fff; font-weight: 700; }

.fht-language-button {
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255,255,255,.1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: background .2s;
}

.fht-language-button:hover { background: rgba(255,255,255,.2); }

.fht-flag {
  width: 22px;
  height: 15px;
  border-radius: 2px;
  display: inline-grid;
  place-items: center;
  background: #e21d2b;
  color: #ffd500;
  font-size: 9px;
  line-height: 1;
}

/* ---- Brand Row ---- */
.fht-brand-row {
  min-height: 106px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 16px 28px 12px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgba(82,180,255,.12), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(248,252,255,.82));
}

.fht-branch-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy-900);
  text-decoration: none;
  transition: .22s ease;
}

.fht-branch-link:hover {
  border-color: rgba(47,156,244,.25);
  background: rgba(234,247,255,.78);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  color: var(--navy-900);
}

.fht-branch-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--blue-600);
  border: 1px solid rgba(47,156,244,.2);
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(224,244,255,.8));
  box-shadow: 0 8px 22px rgba(33,122,200,.12);
  flex-shrink: 0;
}

.fht-brand {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 230px;
  text-decoration: none;
}

.fht-brand img {
  display: block;
  width: auto;
  max-width: 200px;
  max-height: 80px;
  object-fit: contain;
}

.fht-brand-fallback {
  display: none;
  text-align: center;
  line-height: 1.05;
}

.fht-brand-fallback strong {
  display: block;
  font-size: 22px;
  color: var(--navy-900);
  letter-spacing: -.03em;
}

.fht-brand-fallback span {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--blue-600);
  text-transform: uppercase;
}

.fht-header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Hide WP search form injected by get_search_form */
.fht-header-actions .search-form { display: none; }

.fht-action-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--blue-600);
  border: 1px solid rgba(47,156,244,.2);
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(224,244,255,.8));
  box-shadow: 0 8px 22px rgba(33,122,200,.12);
  cursor: pointer;
  transition: .22s ease;
  font-family: inherit;
}

.fht-action-button:hover {
  color: #fff;
  background: linear-gradient(145deg, var(--blue-500), var(--blue-700));
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15,123,233,.24);
  border-color: transparent;
}

/* ---- Navigation ---- */
.fht-navigation {
  position: relative;
  padding: 0 20px;
  background: rgba(255,255,255,.84);
  border-radius: 0 0 27px 27px;
}

.fht-nav-list {
  min-height: 64px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

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

.fht-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 13px;
  color: #244567;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: .2s ease;
  position: relative;
}

.fht-nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-500), var(--cyan-400));
  transform: translateX(-50%);
  transition: width .2s ease;
}

.fht-nav-link:hover,
.fht-nav-item.fht-active > .fht-nav-link {
  color: var(--blue-700);
  background: linear-gradient(180deg, rgba(235,248,255,.9), rgba(255,255,255,.56));
}

.fht-nav-link:hover::after,
.fht-nav-item.fht-active > .fht-nav-link::after { width: 34px; }

.fht-chevron {
  display: inline-block;
  vertical-align: middle;
  transition: transform .2s ease;
  flex-shrink: 0;
}
.fht-nav-item:hover .fht-chevron {
  transform: rotate(180deg);
}

/* ---- Dropdown ---- */
.fht-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: 270px;
  padding: 10px;
  border: 1px solid rgba(67,145,216,.22);
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 22px 50px rgba(31,98,159,.18);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 999;
}

.fht-nav-item:hover > .fht-dropdown,
.fht-nav-item:focus-within > .fht-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.fht-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: .15s ease;
}

.fht-dropdown a:hover {
  color: var(--blue-700);
  background: var(--sky-100);
}

/* ---- Expandable Header Search ---- */
.fht-search-expandable {
  position: relative;
  display: flex;
  align-items: center;
}

.fht-search-expand-form {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) scaleX(0.8);
  transform-origin: right center;
  width: 0;
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(47, 156, 244, .3);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(15, 123, 233, .2);
  padding: 4px 6px 4px 18px;
  transition: width .3s cubic-bezier(0.4, 0, 0.2, 1), opacity .25s ease, visibility .25s ease, transform .3s ease;
  z-index: 100;
  overflow: hidden;
}

.fht-search-expandable.fht-expanded .fht-search-expand-form {
  width: 310px;
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scaleX(1);
}

.fht-search-expand-input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 8px 6px 0;
}

.fht-search-expand-submit {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  box-shadow: 0 4px 12px rgba(15, 123, 233, .3);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .2s;
}

.fht-search-expand-submit:hover {
  transform: scale(1.06);
}

@media (max-width: 640px) {
  .fht-search-expandable.fht-expanded .fht-search-expand-form {
    width: calc(100vw - 48px);
    max-width: 320px;
  }
}

/* ---- Mobile Menu ---- */
.fht-mobile-menu {
  display: none;
  padding: 10px 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(247,252,255,.96);
  border-radius: 0 0 27px 27px;
}

.fht-mobile-menu.fht-open { display: block; }

.fht-mobile-menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 12px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: .15s ease;
}

.fht-mobile-menu a:hover {
  background: var(--sky-100);
  color: var(--blue-700);
}

/* ---- Remove Suki's default header ---- */
.suki-header,
.suki-header-row,
.suki-header-section { display: none !important; }

/* ============================================================
   2-State Sticky Header Transitions
   ============================================================ */
.fht-site-header {
  transition: padding .3s ease;
}

.fht-header-shell {
  transition: border-radius .3s ease, box-shadow .3s ease, background .3s ease;
}

.fht-topbar {
  max-height: 60px;
  opacity: 1;
  visibility: visible;
  transition: max-height .35s cubic-bezier(0.4, 0, 0.2, 1), opacity .25s ease, visibility .25s ease;
}

.fht-brand-row {
  transition: min-height .3s ease, padding .3s ease;
}

.fht-brand img {
  transition: max-height .3s ease, max-width .3s ease;
}

.fht-branch-link,
.fht-branch-icon,
.fht-action-button {
  transition: all .25s ease;
}

.fht-nav-list {
  transition: min-height .3s ease;
}

.fht-nav-link {
  transition: min-height .25s ease, padding .25s ease, font-size .25s ease, color .2s ease, background .2s ease;
}

/* --- STATE 2: Minimized / Scrolled State (window.scrollY > 20) --- */
.fht-site-header.fht-scrolled {
  padding-top: 4px;
}

.fht-site-header.fht-scrolled .fht-header-shell {
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(10, 55, 111, .22);
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  overflow: hidden;
}

/* Allow dropdown menu to overflow when hovering/interacting with header */
.fht-site-header.fht-scrolled .fht-header-shell:hover,
.fht-site-header.fht-scrolled .fht-header-shell:focus-within {
  overflow: visible !important;
}

.fht-site-header.fht-scrolled .fht-topbar {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  visibility: hidden;
}

.fht-site-header.fht-scrolled .fht-brand-row {
  min-height: 54px;
  padding: 6px 24px;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}

.fht-site-header.fht-scrolled .fht-brand img {
  max-height: 48px;
  max-width: 145px;
}

.fht-site-header.fht-scrolled .fht-branch-link {
  min-height: 38px;
  padding: 4px 10px;
  font-size: 13px;
}

.fht-site-header.fht-scrolled .fht-branch-icon,
.fht-site-header.fht-scrolled .fht-action-button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.fht-site-header.fht-scrolled .fht-navigation {
  border-radius: 0 0 18px 18px;
}

.fht-site-header.fht-scrolled .fht-nav-list {
  min-height: 44px;
}

.fht-site-header.fht-scrolled .fht-nav-link {
  min-height: 36px;
  padding: 6px 13px;
  font-size: 13.5px;
}


/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1120px) {
  .fht-nav-link { padding-inline: 11px; font-size: 13px; }
  .fht-topbar-inner { padding-inline: 20px; }
}

@media (max-width: 980px) {
  .fht-site-header { padding-top: 6px; }
  .fht-header-shell { border-radius: 22px; }
  .fht-topbar { border-radius: 21px 21px 0 0; }
  .fht-topbar-inner { justify-content: center; }
  .fht-topbar-group:first-child { display: none; }
  .fht-brand-row {
    grid-template-columns: auto 1fr auto;
    min-height: 88px;
    padding: 12px 16px;
  }
  .fht-branch-link span:last-child { display: none; }
  .fht-brand { min-width: 0; justify-self: center; }
  .fht-brand img { max-width: 145px; max-height: 62px; }
  .fht-navigation { display: none; }
  .fht-desktop-only { display: none !important; }
  .fht-mobile-only { display: inline-grid !important; }
}

@media (min-width: 981px) {
  .fht-mobile-only { display: none !important; }
  .fht-desktop-only { display: inline-grid !important; }
}

@media (max-width: 640px) {
  .fht-site-header { padding: 4px 8px 0; }
  .fht-topbar-inner { min-height: 40px; padding: 6px 12px; }
  .fht-topbar-item { font-size: 12px; }
  .fht-topbar-group { gap: 8px; }
  .fht-hours { display: none; }
  .fht-brand-row { gap: 10px; }
  .fht-branch-icon,
  .fht-action-button { width: 38px; height: 38px; border-radius: 12px; }
  .fht-brand img { max-width: 122px; max-height: 56px; }
  .fht-search-form { grid-template-columns: 1fr; }
  .fht-search-submit { min-height: 46px; }
}
