/**
 * Al Amana Travel — Global Header v3
 * Audited against the approved V6.1 concept and isolated from Divi defaults.
 *
 * Architecture:
 * - Header HTML lives directly in one Divi Code Module.
 * - This file owns ALL header presentation.
 * - No width/padding settings are required on the Divi Section/Row.
 */

/* ==========================================================
 * 1. DIVI THEME BUILDER ISOLATION
 * Divi 5 rows default to 80% width / 1080px max-width and add vertical
 * section/row spacing. Our single global-header Code Module owns its layout,
 * so the wrapper chain must be neutral.
 * ========================================================== */
body.al-amana-travel .et-l--header,
body.al-amana-travel .et-l--header .et_builder_inner_content,
body.al-amana-travel .et-l--header .et_pb_section,
body.al-amana-travel .et-l--header .et_pb_row,
body.al-amana-travel .et-l--header .et_pb_column,
body.al-amana-travel .et-l--header .et_pb_module,
body.al-amana-travel .et-l--header .et_pb_code,
body.al-amana-travel .et-l--header .et_pb_code_inner {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.al-amana-travel .et-l--header .et_pb_row,
body.al-amana-travel .et-l--header .et_pb_column {
  min-height: 0 !important;
}

/* Prevent builder/theme generated bottom spacing on the only module. */
body.al-amana-travel .et-l--header .et_pb_module:last-child {
  margin-bottom: 0 !important;
}

/* ==========================================================
 * 2. COMPONENT SCOPE / RESET
 * Keep Divi typography/list/link defaults out of this custom component.
 * ========================================================== */
.aat-global-header {
  position: relative;
  z-index: var(--aat-z-header);
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--aat-ink);
  font-family: var(--aat-font-sans);
  font-size: 16px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}

/* The open menu has to cover the sticky bars, which sit above --aat-z-header. */
body.aat-menu-open .aat-global-header {
  z-index: var(--aat-z-overlay);
}

.aat-global-header *,
.aat-global-header *::before,
.aat-global-header *::after {
  box-sizing: border-box;
}

.aat-global-header a {
  color: inherit;
  text-decoration: none !important;
  text-shadow: none !important;
}

.aat-global-header button {
  font: inherit;
}

.aat-global-header .aat-site-nav__list,
.aat-global-header .aat-mobile-nav__list,
.aat-global-header .aat-site-nav__list > li,
.aat-global-header .aat-mobile-nav__list > li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.aat-global-header .aat-site-nav__list > li::marker,
.aat-global-header .aat-mobile-nav__list > li::marker {
  content: "" !important;
  font-size: 0 !important;
}

.aat-global-header .aat-site-nav__list > li::before,
.aat-global-header .aat-mobile-nav__list > li::before,
.aat-global-header .aat-site-nav__list > li::after,
.aat-global-header .aat-mobile-nav__list > li::after {
  content: none !important;
  display: none !important;
}

/* Keep container behavior deterministic even if Divi has similarly named rules. */
.aat-global-header .aat-container {
  width: min(var(--aat-container-max), calc(100% - (var(--aat-page-gutter) * 2))) !important;
  max-width: var(--aat-container-max) !important;
  margin-inline: auto !important;
  padding: 0 !important;
}

/* ==========================================================
 * 3. ANNOUNCEMENT BAR — V6.1 geometry
 * ========================================================== */
.aat-announcement {
  width: 100%;
  margin: 0;
  background: var(--aat-dark);
  color: #e2e8f0;
}

.aat-announcement__inner {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.35;
}

.aat-announcement__pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid rgba(11, 186, 180, .30);
  border-radius: var(--aat-radius-pill);
  background: rgba(11, 186, 180, .16);
  color: #77e8e3;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .04em;
}

.aat-announcement__text {
  color: #e2e8f0;
  font: inherit;
}

/* ==========================================================
 * 4. STICKY SHELL
 * Announcement scrolls away; navigation becomes fixed afterwards.
 * ========================================================== */
.aat-header-slot {
  position: relative;
  width: 100%;
  min-height: 91px; /* 68px header + 14px top + 9px bottom; protruding logo keeps ~9px visual gap to announcement */
}

.aat-header-shell {
  width: 100%;
  margin: 0;
  padding: 14px 0 9px;
  background: rgba(248, 250, 252, .82);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.aat-header-shell.is-fixed {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: calc(var(--aat-z-overlay) - 1);
  padding: 9px 0;
}

body.admin-bar .aat-header-shell.is-fixed {
  top: 32px;
}

/* ==========================================================
 * 5. DESKTOP NAVIGATION CARD — V6.1 geometry
 * ========================================================== */
.aat-site-header {
  height: 68px;
  min-height: 68px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 26px;
  padding: 0 12px 0 16px;
  overflow: visible;
  border: 1px solid rgba(208, 213, 221, .88);
  border-radius: 21px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 7px 24px rgba(16, 24, 40, .07);
}

/* Brand
 * The logo is intentionally taller than the navigation card and is
 * vertically centered on it. At desktop the card is 68px high and the
 * mark 78px, so it crosses the navbar edge by exactly 5px above and 5px
 * below. No decorative white collar/border is used.
 */
.aat-site-brand {
  position: relative;
  z-index: 3;
  justify-self: start;
  width: auto;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--aat-ink) !important;
}

.aat-site-brand__logo,
.aat-site-brand__fallback-mark {
  position: relative;
  z-index: 2;
  align-self: center;
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  border: 0;
  border-radius: 18px;
  outline: 0;
  box-shadow:
    0 10px 24px rgba(16, 24, 40, .11),
    0 5px 14px rgba(11, 186, 180, .08);
}

body.al-amana-travel .aat-global-header .aat-site-brand__logo {
  display: block;
  width: 78px;
  height: 78px;
  max-width: none;
  flex: 0 0 78px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
}

.aat-site-brand__fallback-mark {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--aat-brand), var(--aat-brand-dark));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
}

.aat-site-brand__copy {
  min-width: 0;
  display: block;
  line-height: 1;
}

.aat-site-brand__copy strong {
  display: block;
  margin: 0;
  color: var(--aat-ink) !important;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.025em;
  white-space: nowrap;
}

.aat-site-brand__copy span {
  display: block;
  margin-top: 4px;
  color: var(--aat-muted) !important;
  font-size: 7.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .15em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Desktop menu */
.aat-site-nav {
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 100%;
}

.aat-global-header .aat-site-nav__list {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 25px;
  height: 100%;
}

.aat-global-header .aat-site-nav__list > li {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 100%;
}

.aat-global-header .aat-site-nav__list > li > a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0;
  color: #475467 !important;
  -webkit-text-fill-color: #475467;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  transition: color var(--aat-duration-fast) var(--aat-ease);
}

.aat-global-header .aat-site-nav__list > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 17px;
  display: block;
  height: 2px;
  border-radius: var(--aat-radius-pill);
  background: var(--aat-brand);
  transition: right var(--aat-duration-fast) var(--aat-ease);
}

.aat-global-header .aat-site-nav__list > li > a:hover,
.aat-global-header .aat-site-nav__list > li > a:focus-visible,
.aat-global-header .aat-site-nav__list > li > a[aria-current="page"] {
  color: var(--aat-ink) !important;
  -webkit-text-fill-color: var(--aat-ink);
}

.aat-global-header .aat-site-nav__list > li > a:hover::after,
.aat-global-header .aat-site-nav__list > li > a:focus-visible::after,
.aat-global-header .aat-site-nav__list > li > a[aria-current="page"]::after {
  right: 0;
}

/* Right actions */
.aat-header-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.aat-header-whatsapp {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  color: #475467 !important;
  -webkit-text-fill-color: #475467;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.aat-header-whatsapp:hover,
.aat-header-whatsapp:focus-visible {
  color: var(--aat-brand-deep) !important;
  -webkit-text-fill-color: var(--aat-brand-deep);
}

/* Header CTA deliberately owns all important text styles so Divi cannot leak in. */
.aat-global-header .aat-header-cta,
.aat-global-header .aat-mobile-nav__actions .aat-btn--primary {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 1px solid transparent !important;
  border-radius: 14px;
  background: var(--aat-brand-deep) !important;
  box-shadow: 0 10px 24px rgba(11, 186, 180, .21);
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-family: var(--aat-font-sans) !important;
  font-size: 13px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  text-shadow: none !important;
  white-space: nowrap;
  transition:
    transform var(--aat-duration-fast) var(--aat-ease),
    background-color var(--aat-duration-fast) var(--aat-ease),
    box-shadow var(--aat-duration-fast) var(--aat-ease);
}

.aat-global-header .aat-header-cta:hover,
.aat-global-header .aat-header-cta:focus-visible,
.aat-global-header .aat-mobile-nav__actions .aat-btn--primary:hover,
.aat-global-header .aat-mobile-nav__actions .aat-btn--primary:focus-visible {
  background: var(--aat-brand-deep) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.aat-global-header .aat-header-cta:hover,
.aat-global-header .aat-mobile-nav__actions .aat-btn--primary:hover {
  transform: translateY(-1px);
}

.aat-header-cta__arrow {
  display: inline-block;
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
  font: inherit !important;
  line-height: 1 !important;
}

/* Hamburger */
.aat-menu-toggle {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--aat-ink);
  appearance: none;
  cursor: pointer;
}

.aat-menu-toggle span {
  width: 20px;
  height: 2px;
  display: block;
  border-radius: 99px;
  background: currentColor;
}

/* ==========================================================
 * 6. MOBILE OVERLAY
 * ========================================================== */
.aat-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--aat-z-overlay);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  padding:
    max(18px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity var(--aat-duration) var(--aat-ease),
    transform var(--aat-duration) var(--aat-ease),
    visibility 0s linear var(--aat-duration);
}

.aat-mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition-delay: 0s;
}

.aat-mobile-nav__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.aat-mobile-nav__close {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  border: 1px solid var(--aat-border);
  border-radius: 13px;
  background: var(--aat-white);
  color: var(--aat-ink);
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  appearance: none;
  cursor: pointer;
}

.aat-mobile-nav__nav {
  align-self: start;
  padding-top: 12px;
}

.aat-global-header .aat-mobile-nav__list {
  display: grid !important;
}

.aat-global-header .aat-mobile-nav__list > li {
  border-bottom: 1px solid var(--aat-border);
}

.aat-global-header .aat-mobile-nav__list > li > a {
  display: block;
  padding: 13px 0;
  color: var(--aat-ink) !important;
  -webkit-text-fill-color: var(--aat-ink);
  font-size: clamp(24px, 7vw, 31px);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.aat-global-header .aat-mobile-nav__list > li > a[aria-current="page"] {
  color: var(--aat-brand-deep) !important;
  -webkit-text-fill-color: var(--aat-brand-deep);
}

.aat-mobile-nav__actions {
  display: grid;
  gap: 9px;
}

.aat-global-header .aat-mobile-nav__actions .aat-btn--primary {
  width: 100%;
}

body.aat-menu-open {
  overflow: hidden;
}

/* ==========================================================
 * 7. RESPONSIVE BEHAVIOR
 * ========================================================== */
@media (max-width: 1050px) {
  .aat-site-header {
    gap: 12px;
  }

  .aat-site-nav {
    display: none;
  }

  body.al-amana-travel .aat-global-header .aat-header-cta {
    display: none !important;
  }

  .aat-menu-toggle {
    display: flex;
  }

  .aat-site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 782px) {
  body.admin-bar .aat-header-shell.is-fixed {
    top: 46px;
  }
}

@media (max-width: 720px) {
  .aat-announcement__inner {
    min-height: 36px;
    gap: 7px;
    font-size: 9px;
  }

  .aat-announcement__pill {
    font-size: 8.5px;
  }

  .aat-header-slot {
    min-height: 80px; /* 60px header + 13px top + 7px bottom */
  }

  .aat-header-shell {
    padding: 13px 0 7px;
  }

  .aat-header-shell.is-fixed {
    padding: 7px 0;
  }

  .aat-site-header {
    height: 60px;
    min-height: 60px;
    padding: 0 8px 0 11px;
    border-radius: 18px;
  }

  .aat-site-brand {
    height: auto;
    gap: 9px;
  }

  .aat-site-brand__fallback-mark {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    border-radius: 14px;
    box-shadow:
      0 8px 19px rgba(16, 24, 40, .10),
      0 4px 12px rgba(11, 186, 180, .07);
  }

  body.al-amana-travel .aat-global-header .aat-site-brand__logo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
    border-radius: 0;
    box-shadow: none;
  }

  .aat-site-brand__fallback-mark {
    font-size: 13px;
  }

  .aat-site-brand__copy strong {
    font-size: 16px;
  }

  .aat-site-brand__copy span {
    font-size: 6.8px;
  }

  .aat-header-whatsapp {
    display: none;
  }
}

@media (max-width: 360px) {
  .aat-site-header {
    gap: 9px;
    padding-left: 8px;
  }

  .aat-site-brand {
    gap: 7px;
  }

  .aat-site-brand__copy strong {
    font-size: 14.5px;
  }

  .aat-site-brand__copy span {
    font-size: 6.2px;
    letter-spacing: .12em;
  }
}

@media (max-width: 420px) {
  .aat-announcement__inner {
    align-items: center;
  }

  .aat-announcement__text {
    max-width: 245px;
  }
}

/* ==========================================================
 * 8. ACCESSIBILITY / REDUCED MOTION
 * ========================================================== */
.aat-global-header a:focus-visible,
.aat-global-header button:focus-visible {
  outline: 3px solid var(--aat-focus-color) !important;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .aat-mobile-nav,
  .aat-global-header .aat-site-nav__list > li > a::after,
  .aat-global-header .aat-header-cta,
  .aat-global-header .aat-mobile-nav__actions .aat-btn--primary {
    transition: none !important;
  }
}
