/* True Holiday Safaris — Headway-style luxury typography
   Fonts + spacing + light motion only. Does NOT override site brand colors. */

:root {
  --ths-font-display: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --ths-font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ths-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ths-gold: #c6a15b;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Body / UI (Headway Inter) ---------- */
body,
body p,
.et_pb_text,
.et_pb_text p,
.et_pb_blurb_description,
.et_pb_testimonial_description,
.et_pb_newsletter,
.et_pb_contact,
.ths-lux,
.ths-opts,
.ths-choice,
.ths-contact,
.ths-hub,
.ths-price,
#et-top-navigation,
.et-menu,
#main-footer,
.et-l--footer {
  font-family: var(--ths-font-body) !important;
}

body,
body p,
.et_pb_text p,
.et_pb_blurb_description {
  line-height: 1.75;
  letter-spacing: 0.015em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Display headings (Headway Cormorant / Playfair) ---------- */
h1, h2, h3, h4, h5, h6,
.et_pb_module_header,
.et_pb_slide_description .et_pb_slide_title,
.et_pb_blurb_container h4,
.et_pb_blurb_container h4 a,
.et_pb_promo_description h2,
.et_pb_cta_0 h2,
.et_pb_text_0 h1,
.et_pb_text h1,
.et_pb_text h2,
.et_pb_text h3,
.et_pb_column h1,
.et_pb_column h2,
.et_pb_column h3,
.et_pb_bg_layout_light h1,
.et_pb_bg_layout_light h2,
.et_pb_bg_layout_dark h1,
.et_pb_bg_layout_dark h2,
.et_pb_bg_layout_dark h3 {
  font-family: var(--ths-font-display) !important;
  font-weight: 400 !important;
  letter-spacing: 0.035em !important;
  line-height: 1.15 !important;
}

/* Contact page owns its type scale — do not inflate .ths-cx headings */
.page-id-138 .ths-cx h1,
.page-id-138 .ths-cx h2,
.page-id-138 .ths-cx h3,
.page-id-138 .ths-cx p {
  font-size: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  font-weight: inherit;
}

/* Hero title — cinematic like Headway */
.et_pb_section_0 .et_pb_slide_description .et_pb_slide_title,
.et_pb_fullwidth_header .header-content h1,
.et_pb_section_0 h1 {
  font-family: var(--ths-font-display) !important;
  font-size: clamp(2.6rem, 6vw, 5rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0.045em !important;
  line-height: 1.12 !important;
}

.et_pb_section_0 .et_pb_slide_content,
.et_pb_section_0 .et_pb_slide_content p {
  font-family: var(--ths-font-body) !important;
  font-weight: 300 !important;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem) !important;
  line-height: 1.8 !important;
  letter-spacing: 0.02em !important;
  max-width: 36rem;
}

/* Section titles */
.et_pb_text h1,
.et_pb_text h2,
.et_pb_module_header {
  font-size: clamp(1.85rem, 3.8vw, 3rem) !important;
}

.et_pb_blurb_container h4,
.et_pb_blurb_container h4 a {
  font-size: clamp(1.2rem, 1.8vw, 1.55rem) !important;
  letter-spacing: 0.03em !important;
}

/* ---------- Nav — refined caps, keep existing colors ---------- */
#et-top-navigation nav > ul > li > a,
.et-menu > li > a {
  font-family: var(--ths-font-body) !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  white-space: nowrap;
}

#mobile_menu li a {
  font-family: var(--ths-font-body) !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
}

/* Desktop / laptop: keep all items listed; scroll sideways to see more */
@media (min-width: 981px) {
  #et-top-navigation {
    display: block !important;
    align-items: center !important;
    max-width: min(680px, calc(100vw - 240px)) !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(198, 161, 91, 0.55) transparent;
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 20px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 20px), transparent 100%);
  }

  #et-top-navigation::-webkit-scrollbar {
    height: 4px;
  }
  #et-top-navigation::-webkit-scrollbar-thumb {
    background: rgba(198, 161, 91, 0.55);
    border-radius: 999px;
  }

  #et-top-navigation nav {
    display: block !important;
    width: max-content !important;
    max-width: none !important;
    min-width: max-content !important;
  }

  #et-top-navigation nav > ul,
  #top-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: max-content !important;
    min-width: max-content !important;
    gap: 0.1rem;
    margin: 0 !important;
  }

  #et-top-navigation nav > ul > li,
  #top-menu > li {
    float: none !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  #et-top-navigation nav > ul > li > a,
  .et-menu > li > a {
    letter-spacing: 0.08em !important;
    font-size: 0.68rem !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  /* Dropdown panels (Safaris) stay tidy */
  #et-top-navigation nav > ul > li.menu-item-has-children > ul.sub-menu,
  #top-menu > li.menu-item-has-children > ul.sub-menu {
    min-width: 220px !important;
    padding: 10px 0 !important;
    border: 1px solid rgba(198, 161, 91, 0.28) !important;
    border-radius: 12px !important;
    background: #0b2b1e !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28) !important;
    overflow: hidden;
  }

  #et-top-navigation nav > ul > li.menu-item-has-children > ul.sub-menu a,
  #top-menu > li.menu-item-has-children > ul.sub-menu a {
    color: #fffcf7 !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    padding: 11px 18px !important;
    white-space: nowrap;
  }

  #et-top-navigation nav > ul > li.menu-item-has-children > ul.sub-menu a:hover,
  #top-menu > li.menu-item-has-children > ul.sub-menu a:hover {
    color: var(--ths-gold) !important;
    background: rgba(198, 161, 91, 0.1) !important;
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  #et-top-navigation {
    max-width: min(520px, calc(100vw - 200px)) !important;
  }

  #et-top-navigation nav > ul > li > a,
  .et-menu > li > a {
    letter-spacing: 0.06em !important;
    font-size: 0.64rem !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

#et-top-navigation nav > ul > li > a:hover,
#et-top-navigation nav > ul > li.current-menu-item > a,
#et-top-navigation nav > ul > li.current-menu-ancestor > a {
  color: var(--ths-gold) !important;
}

/* ---------- Buttons — type only, preserve Divi colors ---------- */
.et_pb_button,
a.et_pb_button,
.et_pb_more_button,
.et_pb_contact_submit {
  font-family: var(--ths-font-body) !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  transition: transform 0.35s var(--ths-ease), filter 0.35s var(--ths-ease) !important;
}

.et_pb_button:hover,
a.et_pb_button:hover,
.et_pb_more_button:hover {
  transform: translateY(-1px);
}

.et_pb_button:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ths-gold) !important;
  outline-offset: 3px !important;
}

/* ---------- Hero cinematic (overlay only — no recolor of brand) ---------- */
.et_pb_section_0 .et_pb_slider .et_pb_slide,
.et_pb_section.et_pb_fullwidth_section .et_pb_slider .et_pb_slide:first-child {
  min-height: min(86vh, 820px);
}

.et_pb_section_0 .et_pb_slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(7, 28, 20, 0.22) 0%,
    rgba(7, 28, 20, 0.4) 48%,
    rgba(7, 28, 20, 0.68) 100%
  );
}

.et_pb_slide_description {
  position: relative;
  z-index: 2 !important;
  padding-bottom: clamp(3rem, 8vw, 6rem) !important;
}

.et_pb_section_0 .et_pb_slide_description .et_pb_slide_title {
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
}

/* ---------- Spacing (luxury breath, no color) ---------- */
.et_pb_section {
  padding-top: clamp(3.2rem, 6.5vw, 5.8rem) !important;
  padding-bottom: clamp(3.2rem, 6.5vw, 5.8rem) !important;
}

.et_pb_section.et_pb_fullwidth_section,
.et_pb_section:has(.et_pb_slider),
.et_pb_section.et_pb_section_0 {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.et_pb_row {
  width: min(1180px, calc(100% - 40px)) !important;
}

/* Soft lift on images — no tint */
.et_pb_image img,
.et_pb_gallery_image img,
.et_pb_blurb .et_pb_main_blurb_image img {
  transition: transform 1.1s var(--ths-ease);
}

.et_pb_image:hover img,
.et_pb_blurb:hover .et_pb_main_blurb_image img {
  transform: scale(1.03);
}

.et_pb_blurb {
  transition: transform 0.45s var(--ths-ease);
}

.et_pb_blurb:hover {
  transform: translateY(-3px);
}

/* Testimonials — elegant italic display, keep site colors */
.et_pb_testimonial_description,
.et_pb_testimonial_content {
  font-family: var(--ths-font-display) !important;
  font-size: 1.2rem !important;
  line-height: 1.75 !important;
  font-style: italic;
  font-weight: 400 !important;
}

.et_pb_testimonial_author {
  font-family: var(--ths-font-body) !important;
  font-style: normal !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
}

/* Footer type polish only */
#main-footer h4,
#main-footer .widgettitle,
.et-l--footer h4 {
  font-family: var(--ths-font-body) !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
}

#main-footer a:hover,
#footer-bottom a:hover {
  color: var(--ths-gold) !important;
}

/* ---------- Micro animations ---------- */
.ths-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ths-ease), transform 0.8s var(--ths-ease);
  will-change: opacity, transform;
}

.ths-reveal.is-in {
  opacity: 1;
  transform: none;
}

.et_pb_code,
.et_pb_code.ths-reveal,
.ths-lux,
.ths-opts,
.ths-lux.ths-reveal,
.ths-opts.ths-reveal {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

.et_pb_slider .et_pb_slide.et-pb-active-slide .et_pb_slide_description {
  animation: thsFadeUp 0.9s var(--ths-ease) both;
}

@keyframes thsFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.ths-text-rise .ths-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  margin-right: 0.22em;
}

.ths-text-rise .ths-word > span {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  filter: blur(4px);
  transition: opacity 0.85s var(--ths-ease), transform 0.85s var(--ths-ease), filter 0.85s var(--ths-ease);
}

.ths-text-rise.is-in .ths-word > span,
.ths-text-rise.ths-text-ready .ths-word > span {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* Custom pages — Headway display where used */
.ths-lux__title,
.ths-lux__name,
.ths-land__title,
.ths-land__section-title,
.ths-land__name,
.ths-opts__title,
.ths-opts__name {
  font-family: var(--ths-font-display) !important;
  font-weight: 400 !important;
}

.ths-lux,
.ths-land,
.ths-opts,
.ths-contact,
.ths-hub {
  font-family: var(--ths-font-body) !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 980px) {
  .et_pb_slider .et_pb_slide {
    min-height: min(72vh, 640px);
  }

  .et_pb_row {
    width: min(100% - 28px, 1180px) !important;
  }

  .et_pb_section {
    padding-top: clamp(2.5rem, 8vw, 4rem) !important;
    padding-bottom: clamp(2.5rem, 8vw, 4rem) !important;
  }

  .et_pb_section.et_pb_fullwidth_section,
  .et_pb_section:has(.et_pb_slider),
  .et_pb_section.et_pb_section_0 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .et_pb_section_0 .et_pb_slide_description .et_pb_slide_title,
  .et_pb_section_0 h1 {
    font-size: clamp(2rem, 9vw, 2.8rem) !important;
  }
}

.et_pb_column .et_pb_module:empty {
  display: none;
}

/* ---------- Plan Your Safari — golden CTA ---------- */
body #page-container a.et_pb_button_0.et_pb_button,
body #page-container .et_pb_button_0.et_pb_button,
body #page-container a.et_pb_button_0,
body .et_pb_section_0 a.et_pb_button_0.et_pb_button,
body a.et_pb_button[href*="page_id=138"] {
  position: relative;
  z-index: 5;
  pointer-events: auto !important;
  cursor: pointer !important;
  background: #c6a15b !important;
  background-image: none !important;
  background-color: #c6a15b !important;
  border: 1px solid #c6a15b !important;
  color: #0b2b1e !important;
  font-family: var(--ths-font-body) !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  box-shadow: 0 10px 28px rgba(198, 161, 91, 0.35) !important;
}

/* Keep all Divi CTAs clickable above decorative overlays */
body #page-container a.et_pb_button {
  position: relative;
  z-index: 3;
  pointer-events: auto !important;
}

body #page-container a.et_pb_button_0.et_pb_button:hover,
body #page-container .et_pb_button_0.et_pb_button:hover,
body .et_pb_section_0 a.et_pb_button_0.et_pb_button:hover,
body a.et_pb_button[href*="page_id=138"]:hover {
  background: #d4b574 !important;
  background-color: #d4b574 !important;
  border-color: #d4b574 !important;
  color: #071c14 !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(198, 161, 91, 0.42) !important;
}

/* ---------- Mobile hamburger — luxury overlay (does NOT push page content) ---------- */
@media (max-width: 980px) {
  #main-header {
    z-index: 100020 !important;
    overflow: visible !important;
  }

  #et_mobile_nav_menu {
    display: block !important;
  }

  .mobile_nav .mobile_menu_bar:before {
    color: #fffcf7 !important;
  }

  /* Soft dim layer behind the panel — content stays put underneath */
  .ths-nav-veil {
    position: fixed;
    inset: 0;
    top: var(--ths-header-h, 80px);
    z-index: 100010;
    background: rgba(7, 20, 14, 0.42);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s var(--ths-ease), visibility 0.35s var(--ths-ease);
  }

  body.ths-mobile-nav-open .ths-nav-veil {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.ths-mobile-nav-open {
    overflow: hidden;
  }

  #mobile_menu.et_mobile_menu {
    position: fixed !important;
    top: var(--ths-header-h, 80px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 18px 22px 28px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    background:
      linear-gradient(165deg, #0d3122 0%, #0b2b1e 55%, #082018 100%) !important;
    border: 0 !important;
    border-top: 1px solid rgba(198, 161, 91, 0.32) !important;
    border-radius: 0 !important;
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.28) !important;
    z-index: 100015 !important;
    max-height: calc(100dvh - var(--ths-header-h, 80px)) !important;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.32s var(--ths-ease),
      transform 0.38s var(--ths-ease),
      visibility 0.32s var(--ths-ease) !important;
  }

  /* Kill Divi slideToggle inline height collapse */
  .mobile_nav.opened #mobile_menu.et_mobile_menu,
  body.ths-mobile-nav-open #mobile_menu.et_mobile_menu {
    display: block !important;
    height: auto !important;
    max-height: calc(100dvh - var(--ths-header-h, 80px)) !important;
    padding-top: 18px !important;
    padding-bottom: 28px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  #mobile_menu.et_mobile_menu > li {
    margin: 0 !important;
    border-bottom: 1px solid rgba(255, 252, 247, 0.1) !important;
    float: none !important;
    width: 100% !important;
    background: transparent !important;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s var(--ths-ease), transform 0.35s var(--ths-ease);
  }

  body.ths-mobile-nav-open #mobile_menu.et_mobile_menu > li {
    opacity: 1;
    transform: none;
  }

  body.ths-mobile-nav-open #mobile_menu.et_mobile_menu > li:nth-child(1) { transition-delay: 0.04s; }
  body.ths-mobile-nav-open #mobile_menu.et_mobile_menu > li:nth-child(2) { transition-delay: 0.08s; }
  body.ths-mobile-nav-open #mobile_menu.et_mobile_menu > li:nth-child(3) { transition-delay: 0.12s; }
  body.ths-mobile-nav-open #mobile_menu.et_mobile_menu > li:nth-child(4) { transition-delay: 0.16s; }
  body.ths-mobile-nav-open #mobile_menu.et_mobile_menu > li:nth-child(5) { transition-delay: 0.2s; }
  body.ths-mobile-nav-open #mobile_menu.et_mobile_menu > li:nth-child(6) { transition-delay: 0.24s; }
  body.ths-mobile-nav-open #mobile_menu.et_mobile_menu > li:nth-child(7) { transition-delay: 0.28s; }

  #mobile_menu.et_mobile_menu > li:last-child {
    border-bottom: 0 !important;
  }

  #mobile_menu.et_mobile_menu > li > a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 14px 2px !important;
    color: #fffcf7 !important;
    opacity: 1 !important;
    font-family: var(--ths-font-body) !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    background: transparent !important;
    border: 0 !important;
  }

  #mobile_menu.et_mobile_menu > li.current-menu-item > a,
  #mobile_menu.et_mobile_menu > li > a:hover,
  #mobile_menu.et_mobile_menu > li > a:focus {
    color: #c6a15b !important;
  }

  /* Safaris submenu polish inside overlay */
  #mobile_menu.et_mobile_menu .sub-menu {
    background: transparent !important;
    border: 0 !important;
    margin: 0 0 8px !important;
    padding: 0 0 6px 10px !important;
    box-shadow: none !important;
  }

  #mobile_menu.et_mobile_menu .sub-menu a {
    color: rgba(255, 252, 247, 0.78) !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.08em !important;
    text-transform: none !important;
    min-height: 42px;
    padding: 10px 4px !important;
  }

  #mobile_menu.et_mobile_menu .sub-menu a:hover {
    color: #c6a15b !important;
  }

  @media (prefers-reduced-motion: reduce) {
    .ths-nav-veil,
    #mobile_menu.et_mobile_menu,
    #mobile_menu.et_mobile_menu > li {
      transition: none !important;
    }
  }
}

/* About Us — Our Policy (from THS Policy.pdf) */
.ths-about-policy {
  max-width: 920px;
  margin: 0.4rem 0 0;
}

.ths-about-policy__list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  counter-reset: ths-policy;
}

.ths-about-policy__list > li {
  counter-increment: ths-policy;
  position: relative;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.85rem;
  align-items: start;
  margin: 0 0 1rem !important;
  padding: 0.95rem 1.05rem 0.95rem 0.85rem !important;
  border: 1px solid rgba(198, 161, 91, 0.22);
  background: linear-gradient(135deg, rgba(15, 61, 46, 0.04), rgba(255, 252, 247, 0.55));
  color: #1f2a24;
  line-height: 1.55;
}

.ths-about-policy__list > li::before {
  content: counter(ths-policy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: #0f3d2e;
  color: #c6a15b;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-top: 0.05rem;
}

.ths-about-policy__list > li span {
  display: block;
}

.ths-about-policy__list > li:last-child {
  margin-bottom: 0 !important;
}

@media (max-width: 980px) {
  .ths-about-policy__list > li {
    grid-template-columns: 2rem 1fr;
    gap: 0.7rem;
    padding: 0.85rem 0.85rem 0.85rem 0.7rem !important;
    margin-bottom: 0.8rem !important;
  }

  .ths-about-policy__list > li::before {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 0.72rem;
  }
}
