/* ============================================
   CINEMATIC HERO - Safari Bookings Style
   ============================================ */

.hero-cinematic {
  position: relative;
  min-height: 35vh;
  max-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.hero-cinematic__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-cinematic__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-cinematic__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(5, 11, 19, 0.35) 0%,
      rgba(5, 11, 19, 0.55) 50%,
      rgba(5, 11, 19, 0.75) 100%);
}

.hero-cinematic__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 100%;
  padding: 40px 20px;
  text-align: center;
}

.hero-cinematic__title {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.02em;
}

.hero-cinematic__subtitle {
  margin: 0 0 32px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.hero-search-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  overflow: visible;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.hero-search-bar__field {
  flex: 1;
  padding: 14px 18px;
  border-right: 1px solid rgba(15, 27, 45, 0.1);
  text-align: left;
  min-width: 0;
}

.hero-search-bar__field:last-of-type {
  border-right: none;
}

.hero-search-bar__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #647488;
  margin-bottom: 4px;
}

.hero-search-bar__field select,
.hero-search-bar__field input {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f1b2d;
  cursor: pointer;
  appearance: none;
}

.hero-search-bar__field select:focus,
.hero-search-bar__field input:focus {
  outline: none;
}

.hero-search-bar__submit {
  padding: 14px 28px;
  border: none;
  background: linear-gradient(120deg, #2e7ddc, #1a5eb8);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background 150ms ease, transform 100ms ease;
  border-radius: 0 12px 12px 0;
}

.hero-search-bar__submit:hover {
  background: linear-gradient(120deg, #3a8ae8, #2e7ddc);
}

.hero-search-bar__submit:active {
  transform: scale(0.98);
}

.hero-search-bar--compact {
  max-width: 100%;
  margin: 0;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

.hero-search-bar--compact .hero-search-bar__field {
  padding: 12px 16px;
}

.hero-search-bar--compact .hero-search-bar__label {
  font-size: 0.65rem;
}

.hero-search-bar--compact .hero-search-bar__submit {
  padding: 12px 20px;
  font-size: 0.95rem;
  border-radius: 0 14px 14px 0;
}

/* Trust Signals Bar */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 20px;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 27, 45, 0.08);
}

body[data-theme='light'] .trust-bar {
  background: #ffffff;
}

.trust-bar__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a2b3c;
}

.trust-bar__icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(91, 191, 106, 0.15);
  color: #2d8a3e;
}

.trust-bar__icon svg {
  width: 14px;
  height: 14px;
}

.trust-bar__number {
  font-weight: 800;
  color: var(--accent-2);
}

.trust-bar__label {
  font-weight: 600;
  color: #1a2b3c;
}

/* Section Heading */
.section-title {
  max-width: 1200px;
  margin: 40px auto 20px;
  padding: 0 20px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

/* Search Bar Icons */
.hero-search-bar__icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 4px;
  color: #c45c00;
}

.hero-search-bar__label {
  display: flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #647488;
  margin-bottom: 4px;
}

/* Date Field */
.hero-search-bar__field--date {
  position: relative;
}

.hero-search-bar__date-input {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f1b2d;
  cursor: pointer;
}

.hero-search-bar__date-input::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  right: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Date Toggle Button */
.hero-search-bar__date-toggle {
  background: transparent;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f1b2d;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

/* Date Picker Dropdown */
.date-picker-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  min-width: 320px;
  border: 1px solid #e0e4e8;
}

.date-picker-dropdown.open {
  display: block;
}

.date-picker__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #5a4a3a;
  color: #fff;
  border-radius: 8px 8px 0 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.date-picker__close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  opacity: 0.8;
}

.date-picker__close:hover {
  opacity: 1;
}

.date-picker__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e8e8e8;
}

.date-picker__nav-btn {
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.date-picker__nav-btn:hover {
  background: #e0e0e0;
}

.date-picker__nav-btn svg {
  width: 16px;
  height: 16px;
  stroke: #666;
}

.date-picker__month-year {
  font-weight: 600;
  font-size: 1.1rem;
  color: #3a7bb8;
}

.date-picker__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  padding: 8px 12px;
  border-bottom: 1px solid #e8e8e8;
  background: #f8f8f8;
}

.date-picker__weekdays span {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
}

.date-picker__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 8px 12px;
}

.date-picker__day {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
  position: relative;
}

.date-picker__day:hover:not(.disabled):not(.selected) {
  background: #e8f4fd;
}

.date-picker__day.disabled {
  color: #ccc;
  cursor: not-allowed;
  position: relative;
}

/* Strikethrough for past dates */
.date-picker__day.disabled::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 1px;
  background: #b88;
  transform: rotate(-45deg);
}

.date-picker__day.today {
  color: #3a7bb8;
  font-weight: 700;
}

.date-picker__day.selected {
  background: #4a7a38;
  color: #fff;
  font-weight: 600;
}

.date-picker__day.weekend {
  color: #c45c00;
}

.date-picker__day.weekend.disabled {
  color: #d4a;
}

.date-picker__day.other-month {
  opacity: 0.4;
}

/* Flexible Dates Checkbox inside dropdown */
.date-picker__flexible {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #e8e8e8;
  cursor: pointer;
  font-size: 0.9rem;
  color: #333;
  background: #fafafa;
  margin: 0;
}

.date-picker__flexible:hover {
  background: #f0f0f0;
}

.date-picker__flexible input[type="checkbox"] {
  -webkit-appearance: checkbox;
  appearance: checkbox;
  width: 20px;
  height: 20px;
  accent-color: #8b4513;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
  border: 2px solid #8b4513;
  border-radius: 3px;
}

.date-picker__flexible span {
  font-weight: 500;
  user-select: none;
}

.hero-search-bar__field--date {
  position: relative;
}

/* Clear Button */
.hero-search-bar__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: none;
  background: rgba(15, 27, 45, 0.1);
  border-radius: 50%;
  color: #647488;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease;
}

.hero-search-bar__clear:hover {
  background: rgba(15, 27, 45, 0.2);
}

/* Travelers Field */
.hero-search-bar__field--travelers {
  position: relative;
}

.hero-search-bar__travelers-toggle {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f1b2d;
  text-align: left;
  cursor: pointer;
}

/* Travelers Dropdown */
.travelers-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.travelers-dropdown.is-open {
  display: block;
}

.travelers-dropdown__header {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f8f8;
  border-radius: 8px 8px 0 0;
}

.travelers-dropdown__close {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.travelers-dropdown__close:hover {
  background: rgba(0, 0, 0, 0.1);
}

.travelers-dropdown__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.travelers-dropdown__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.travelers-dropdown__label span {
  font-weight: 600;
  color: #0f1b2d;
}

.travelers-dropdown__label small {
  font-size: 0.75rem;
  color: #647488;
}

.travelers-dropdown__controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.travelers-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #2e7ddc;
  background: #ffffff;
  color: var(--accent-2);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms ease, color 150ms ease;
}

.travelers-btn:hover {
  background: #2e7ddc;
  color: #ffffff;
}

.travelers-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.travelers-count {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  color: #0f1b2d;
}

.travelers-dropdown__done {
  width: calc(100% - 32px);
  margin: 12px 16px 16px;
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: #c45c00;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 150ms ease;
}

.travelers-dropdown__done:hover {
  background: #a84e00;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero-cinematic {
    min-height: 60vh;
  }

  .hero-cinematic__content {
    padding: 30px 16px;
  }

  .hero-search-bar {
    flex-direction: column;
    border-radius: 14px;
    margin: 0 8px;
  }

  .hero-search-bar__field {
    border-right: none;
    border-bottom: 1px solid rgba(15, 27, 45, 0.1);
    padding: 12px 16px;
  }

  .hero-search-bar__field:last-of-type {
    border-bottom: none;
  }

  .hero-search-bar__submit {
    padding: 16px;
    justify-content: center;
    border-radius: 0 0 14px 14px;
  }

  .hero-search-bar--compact {
    margin: 0;
  }

  .trust-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px 16px 18px;
  }

  .trust-bar__item {
    display: grid;
    grid-template-columns: 24px 1fr;
    grid-template-areas:
      "icon number"
      "icon label";
    column-gap: 10px;
    row-gap: 2px;
    align-items: center;
    font-size: 0.85rem;
    min-width: 0;
    padding: 10px 12px;
    background: #f6f8fb;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(15, 27, 45, 0.08);
  }

  .trust-bar__item:nth-child(3) {
    grid-column: 1 / -1;
  }

  .trust-bar__icon {
    grid-area: icon;
  }

  .trust-bar__number {
    grid-area: number;
    font-size: 1rem;
  }

  .trust-bar__label {
    grid-area: label;
    font-size: 0.8rem;
    color: #556273;
  }
}

@media (max-width: 480px) {
  .hero-cinematic__title {
    font-size: 1.75rem;
  }

  .hero-cinematic__subtitle {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }

  .trust-bar {
    grid-template-columns: 1fr;
  }
}

/* Fix favorite toggle appearing above dropdowns */
.favorite-toggle {
  z-index: 1;
}

/* Ensure tour cards don't create stacking context issues */
.card.tour-card {
  position: relative;
  z-index: 1;
}

/* Custom Destination Dropdown */
.hero-search-bar__field--destination {
  position: relative;
}

.destination-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  border: 1px solid #e0e4e8;
}

/* Custom scrollbar for destination dropdown */
.destination-dropdown::-webkit-scrollbar {
  width: 10px;
}

.destination-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0 8px 8px 0;
}

.destination-dropdown::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-radius: 5px;
  border: 2px solid #f1f1f1;
}

.destination-dropdown::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}

.destination-dropdown.open {
  display: block;
}

.destination-dropdown__header {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 12px 16px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-search-bar__field .destination-dropdown__search {
  flex: 1;
  min-height: 40px;
  padding: 0 20px;
  border: 1px solid #d4dbe4;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  background: #f7f9fb;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.destination-dropdown__search:focus {
  border-color: #2e7ddc;
  box-shadow: 0 0 0 1px rgba(46, 125, 220, 0.16);
  background: #ffffff;
}

.destination-dropdown__close {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #666;
  padding: 4px;
  line-height: 1;
}

.destination-dropdown__close:hover {
  color: #333;
}

.destination-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.destination-dropdown__item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

.destination-dropdown__item:hover {
  background: #f5f8fc;
}

.destination-dropdown__item.selected {
  background: #e8f4fd;
}

.destination-dropdown__item-name {
  font-weight: 600;
  color: #1a2b3c;
  font-size: 0.95rem;
}

.destination-dropdown__item-type {
  font-size: 0.8rem;
  color: #647488;
  margin-top: 2px;
}

.destination-dropdown__item--all {
  background: #f8f8f8;
  border-bottom: 2px solid #e0e4e8;
}

.destination-dropdown__item--all .destination-dropdown__item-name {
  color: #3a7bb8;
}

/* Destination Toggle Button */
.hero-search-bar__destination-toggle,
.hero-search-bar__city-toggle {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f1b2d;
  text-align: left;
  cursor: pointer;
}
