/* ===================================================
   HEADER CSS — includes/header.css
   Covers: top bar, nav, mobile menu, search bar,
           all mega menus (destinations, safari, themed)
   =================================================== */

/* ===== RESET & BASE (needed by header elements) ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

:root {
  --crimson: #6b0f1e;
  --crimson-dark: #4e0b15;
  --crimson-mid: #7e1224;
  --crimson-hover: #590d19;
  --amber: #b07d28;
  --amber-dark: #8f6420;
  --amber-light: #c9963a;
  --beige: #d4b896;
  --beige-light: #f4ede2;
  --charcoal: #1e1e1e;
  --white: #ffffff;
  --gray: #666666;
  --light-gray: #f6f1eb;
  --text: #1e0e08;
  --max-width: 1600px;
  --font-display: 'Quicksand', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  overflow-x: hidden;
  background: var(--white);
  font-size: 17px;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

/* ===== TOP BAR ===== */
.top-bar {
  background: var(--crimson-dark);
  color: rgba(255, 255, 255, .80);
  font-size: 13px;
  padding: 7px 0;
}

.top-bar .inner {
  max-width: var(--max-width);
  margin: auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.tb-left {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.tb-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 0 14px;
  color: rgba(255, 255, 255, .80);
}

.tb-item:first-child {
  padding-left: 0;
}

.tb-tagline {
  font-weight: 600;
  letter-spacing: .2px;
  font-size: 13px;
}

.tb-phone {
  font-weight: 700;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .90) !important;
  transition: color .2s ease;
}

.tb-phone:hover {
  color: var(--amber-light) !important;
}

.tb-left i {
  color: var(--amber);
  font-size: 13.5px;
}

.tb-email i {
  color: var(--amber);
  font-size: 13.5px;
}

.tb-divider,
.tb-divider-right {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.30);
  flex-shrink: 0;
}

.tb-right {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.tb-email {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, .80);
  white-space: nowrap;
  font-size: 13.5px;
  transition: color .2s ease;
  padding-right: 6px;
}

.tb-email:hover {
  color: var(--amber-light);
}

.tb-right a:not(.tb-email) {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  font-size: 16px;
  transition: background .2s ease;
  border: 1px solid rgba(255, 255, 255, .20);
}

.tb-right a:not(.tb-email) i {
  color: #ffffff !important;
  font-size: 13px;
  line-height: 1;
}

.tb-right a:not(.tb-email):hover {
  background: var(--amber);
  color: white !important;
}

/* iPad screens: hide tagline to prevent overflow, center email */
@media (max-width: 1024px) {
  .tb-tagline,
  .tb-divider:first-of-type {
    display: none !important;
  }

  .tb-phone {
    padding-left: 0;
  }

  .top-bar .inner {
    justify-content: space-between;
  }

  .tb-email {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .top-bar .inner {
    position: relative;
  }
}

/* Small screens: hide tagline and email, keep phone + socials */
@media (max-width: 640px) {
  .tb-tagline,
  .tb-divider,
  .tb-email,
  .tb-divider-right {
    display: none !important;
  }

  .tb-phone {
    padding-left: 0;
  }

  .top-bar .inner {
    padding-left: 16px;
    padding-right: 16px;
    justify-content: space-between;
    position: relative;
  }
}

/* ===== NAV ===== */
nav {
  background: var(--white);
  box-shadow: 0 2px 16px rgba(78, 11, 21, .15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-inner {
  max-width: var(--max-width);
  margin: auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-img-wrap {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-text {
  line-height: 1.2;
}

.logo-text .brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--crimson);
  letter-spacing: .3px;
  text-transform: uppercase;
  font-family: var(--font-display);
}

.logo-text .brand span {
  color: var(--amber);
}

.logo-text .tagline {
  font-size: 11px;
  color: var(--gray);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.8px;
}

.nav-links {
  display: flex;
  gap: 0;
  align-items: center;
}

.nav-links li a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--charcoal);
  padding: 6px 8px;
  border-radius: 5px;
  transition: all .2s ease;
  white-space: nowrap;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: var(--crimson);
  color: white;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-contact {
  background: var(--amber);
  color: white;
  padding: 10px 24px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  letter-spacing: .3px;
  transition: background .2s ease, transform .15s ease;
  white-space: nowrap;
  font-family: var(--font-display);
}

.btn-contact:hover {
  background: var(--amber-dark);
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1.5px solid rgba(78, 11, 21, .2);
  cursor: pointer;
  padding: 8px;
  border-radius: 7px;
  transition: background .2s ease;
}

.hamburger:hover {
  background: var(--beige-light);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--crimson);
  border-radius: 2px;
  transition: all .3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: white;
  z-index: 998;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .14);
  border-top: 3px solid var(--crimson);
  border-radius: 0 0 14px 14px;
  padding: 32px 20px 32px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  height: auto;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.mobile-menu ul li {
  width: 100%;
}

.mobile-menu ul li a {
  display: block;
  width: 100%;
  font-size: 15px;
  font-weight: 600;
  color: var(--charcoal);
  padding: 12px 14px;
  border-radius: 6px;
  transition: all .2s ease;
  box-sizing: border-box;
}

.mobile-menu ul li a:hover {
  background: var(--crimson);
  color: white;
}

.mobile-menu ul li a.active {
  color: var(--crimson);
  font-weight: 700;
}

.mob-contact-btn {
  margin-top: 14px;
  width: 100%;
  display: block;
  background: var(--amber);
  color: white;
  border: none;
  padding: 13px;
  border-radius: 6px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-display);
  text-align: center;
  box-sizing: border-box;
}

/* ===== SEARCH BAR ===== */
.search-bar-wrap {
  background: var(--crimson);
  padding: 13px 0;
}

.search-bar-inner {
  max-width: var(--max-width);
  margin: auto;
  padding: 0 32px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.search-bar-inner .search-field-wrap {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 680px;
}

.search-bar-inner input {
  flex: 1;
  padding: 12px 18px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-family: var(--font-body);
  outline: none;
  color: var(--text);
}

.search-bar-inner input::placeholder {
  color: #aaa;
}

.search-bar-inner button {
  background: var(--amber);
  color: white;
  border: none;
  padding: 12px 36px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: background .2s ease;
  white-space: nowrap;
  font-family: var(--font-display);
}

.search-bar-inner button:hover {
  background: var(--amber-dark);
}

/* ============================================================
   DESTINATIONS MEGA MENU
   ============================================================ */
.nav-links li {
  display: flex;
  align-items: center;
}

.dest-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}

.dest-chevron {
  font-size: 11px;
  transition: transform 0.25s ease;
}

.mega-open .dest-chevron {
  transform: rotate(180deg);
}

.mega-menu {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, 96vw);
  background: #fff;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 12px 40px rgba(78, 11, 21, .14), 0 2px 8px rgba(0,0,0,.08);
  border-top: 3px solid var(--amber);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.mega-open > .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mega-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  padding: 24px 0 20px;
}

.mega-col {
  padding: 0 20px;
  border-right: 1px solid #ede6dd;
}

.mega-col:last-child {
  border-right: none;
}

.mega-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--crimson);
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--amber);
  font-family: var(--font-display);
}

.mega-region-icon {
  color: var(--amber);
  font-size: 13px;
}

.mega-list li a {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  padding: 7px 6px;
  border-radius: 5px;
  transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

.mega-list li a i {
  font-size: 9px;
  color: var(--amber);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.mega-list li a:hover {
  background: var(--beige-light);
  color: var(--crimson);
  padding-left: 12px;
}

.mega-list li a:hover i {
  transform: translateX(2px);
}

/* ============================================================
   SAFARI PACKAGES MEGA MENU
   ============================================================ */
.safari-mega-menu {
  width: min(1100px, 96vw);
}

.safari-mega-inner {
  padding: 20px 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.safari-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid #ede6dd;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  cursor: default;
}

.safari-card-img {
  position: relative;
  height: 130px;
  overflow: hidden;
  flex-shrink: 0;
}

.safari-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.safari-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.1) 100%);
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
}

.safari-card-badge {
  background: var(--amber);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-family: var(--font-display);
}

.safari-card--mid .safari-card-overlay {
  background: linear-gradient(160deg, rgba(78,11,21,0.45) 0%, rgba(0,0,0,0.1) 100%);
}

.safari-card--luxury .safari-card-overlay {
  background: linear-gradient(160deg, rgba(30,20,0,0.55) 0%, rgba(0,0,0,0.1) 100%);
}

.safari-card--luxury .safari-card-badge {
  background: var(--crimson);
}

.safari-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.safari-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--crimson);
  font-family: var(--font-display);
}

.safari-card-desc {
  font-size: 12.5px;
  color: var(--gray);
  line-height: 1.45;
}

.safari-card-highlights {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.safari-card-highlights li {
  font-size: 12px;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  gap: 6px;
}

.safari-card-highlights li i {
  color: var(--amber);
  font-size: 9px;
  flex-shrink: 0;
}

.safari-card-cta {
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff !important;
  background: var(--crimson);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-display);
  padding: 8px 14px;
  border-radius: 5px;
  align-self: flex-start;
  width: 100%;
  transition: background 0.18s ease, gap 0.18s ease;
}

.safari-card-cta:hover {
  gap: 10px;
  background: var(--amber);
  color: #ffffff !important;
}

.safari-card-cta i {
  font-size: 10px;
  color: #ffffff !important;
}

/* ============================================================
   THEMED HOLIDAYS MEGA MENU
   ============================================================ */
.themed-mega-menu {
  width: min(1100px, 96vw);
}

.themed-mega-inner {
  padding: 24px 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.themed-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: default;
}

.themed-card-img {
  position: relative;
  height: 210px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--beige-light);
}

.themed-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.themed-card:hover .themed-card-img img {
  transform: scale(1.05);
}

.themed-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.0) 55%);
  border-radius: 8px;
}

.themed-card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-display);
  line-height: 1.3;
}

.themed-card .safari-card-cta {
  font-size: 14px;
  padding: 10px 14px;
  margin-top: 4px;
  border-radius: 5px;
  width: 100%;
  text-align: center;
  justify-content: center;
}

/* ============================================================
   MOBILE DESTINATIONS / SAFARI / THEMED ACCORDION
   ============================================================ */
.mob-dest-item {
  display: flex;
  flex-direction: column;
}

.mob-dest-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  color: var(--charcoal);
  padding: 12px 14px;
  border-radius: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s ease, color 0.2s ease;
  text-align: left;
  box-sizing: border-box;
}

.mob-dest-toggle:hover {
  background: var(--beige-light);
  color: var(--crimson);
}

.mob-dest-toggle.mob-dest-open {
  background: var(--crimson);
  color: #fff;
  border-radius: 6px 6px 0 0;
}

.mob-dest-chevron {
  font-size: 12px;
  transition: transform 0.25s ease;
}

.mob-dest-toggle.mob-dest-open .mob-dest-chevron {
  transform: rotate(180deg);
}

.mob-dest-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: var(--beige-light);
  border-radius: 0 0 6px 6px;
}

.mob-dest-panel.mob-dest-panel-open {
  max-height: 700px;
}

.mob-dest-region {
  padding: 10px 14px 6px;
  border-bottom: 1px solid #e4d4c0;
}

.mob-dest-region:last-child {
  border-bottom: none;
}

.mob-dest-region-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--crimson);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
}

.mob-dest-region-title i {
  color: var(--amber);
}

.mob-dest-region ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.mob-dest-region ul li a {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal);
  padding: 6px 8px;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}

.mob-dest-region ul li a:hover {
  background: var(--crimson);
  color: #fff;
}

/* Mobile Safari accordion styles */
.mob-safari-region {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mob-safari-desc {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.45;
  padding: 0 2px;
}

.mob-safari-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--crimson);
  font-family: var(--font-display);
  margin-top: 4px;
  padding: 5px 0;
}

.mob-safari-cta i {
  font-size: 10px;
}

.mob-safari-cta:hover {
  color: var(--amber-dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }

  #contactBtnDesktop {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Destinations mega menu hidden on mobile (use accordion instead) */
  #megaMenu {
    display: none !important;
  }
}

@media (min-width: 1081px) {
  .hamburger {
    display: none;
  }

  .mobile-menu {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .safari-mega-inner {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
}

@media (max-width: 800px) {
  .themed-mega-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .mega-inner {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0;
  }

  .mega-col {
    border-right: none;
    border-bottom: 1px solid #ede6dd;
    padding: 12px 0;
  }

  .mega-col:last-child {
    border-bottom: none;
  }
}

@media (max-width: 640px) {
  .top-bar .inner,
  .nav-inner,
  .search-bar-inner {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (max-width: 600px) {
  .safari-mega-inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .search-bar-inner .search-field-wrap {
    flex-direction: column;
  }

  .search-bar-inner button {
    width: 100%;
  }

  .themed-mega-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 16px;
  }

  .themed-card-img {
    height: 120px;
  }
}