/* ============================================================
   TripHunters — Modern UI overlay
   Loaded AFTER the theme (main.css / styles.css) and overrides
   its look with a cleaner, more contemporary design language:
   unified brand palette, softer depth, larger radii, compact
   hero search, calmer motion. No markup changes required.
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand: align web with the mobile app (logo blue + coral) */
  --theme-color: #0B5ED7;        /* was #4D40CA (purple) */
  --base: #0B5ED7;
  --theme-color-2: #F4502A;      /* coral, slightly deepened */
  --header: #10151D;
  --text: #51607A;
  --border: #E3EAF3;
  --bg: #F3F6FB;                 /* was purple-tinted #EFEEFA */

  --th-ink: #0F1B2D;
  --th-radius-s: 10px;
  --th-radius: 16px;
  --th-radius-l: 22px;
  --th-shadow-s: 0 1px 2px rgba(15, 27, 45, .05), 0 4px 12px rgba(15, 27, 45, .05);
  --th-shadow: 0 2px 4px rgba(15, 27, 45, .04), 0 12px 32px rgba(15, 27, 45, .09);
  --th-shadow-hover: 0 4px 8px rgba(15, 27, 45, .06), 0 20px 44px rgba(15, 27, 45, .14);
  --th-grad: linear-gradient(135deg, #F4502A 0%, #E8391F 100%);
  --th-grad-blue: linear-gradient(135deg, #1B6FE8 0%, #0B5ED7 100%);
}

/* ---------- 2. Global polish ---------- */
::selection { background: rgba(11, 94, 215, .18); }

body {
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { color: var(--th-ink); }

a, button, .theme-btn, input, select, .nice-select {
  transition: all .22s ease;
}

:focus-visible {
  outline: 3px solid rgba(11, 94, 215, .35);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Kill WOW.js visibility trap (cards stayed hidden until scroll
   events fired) — reveal with a single calm CSS entrance instead. */
.wow {
  visibility: visible !important;
  animation: th-rise .5s ease-out both !important;
}

@keyframes th-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wow { animation: none !important; }
  * { transition-duration: .01ms !important; }
}

/* Decorative floating shapes read as clutter — retire them */
.plane-shape, .float-bob-x, .float-bob-y { display: none !important; }

/* ---------- 3. Buttons ---------- */
.theme-btn {
  background: var(--th-grad);
  border: 0;
  border-radius: 999px;
  padding: 15px 30px;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 8px 20px rgba(244, 80, 42, .28);
}

.theme-btn:hover {
  background: var(--th-grad-blue);
  box-shadow: 0 10px 24px rgba(11, 94, 215, .3);
  transform: translateY(-2px);
}

.theme-btn-small { padding: 11px 22px; }

.btn-primary {
  --bs-btn-bg: #0B5ED7;
  --bs-btn-border-color: #0B5ED7;
  --bs-btn-hover-bg: #0A53BE;
  --bs-btn-hover-border-color: #0A53BE;
  border-radius: 999px;
  font-weight: 600;
}

/* ---------- 4. Header / navigation ---------- */
.header-1 {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}

/* The blur above creates a stacking context that traps the nav dropdowns —
   the theme relies on .submenu's z-index escaping to the root, so the hero
   (positioned, later in the DOM) painted OVER the open submenus. Lift the
   whole header above the page content; 100 stays safely below Bootstrap
   modals (1050) and the theme's .sticky header (9999). */
.header-section.header-inner {
  position: relative;
  z-index: 100;
}

.header-1 .header-main { padding-top: 10px; padding-bottom: 10px; }

/* ---------- 5. Forms & inputs ---------- */
input.form-control,
select.form-select,
.nice-select,
select {
  border: 1.5px solid var(--border);
  border-radius: var(--th-radius-s);
  min-height: 46px;
  background-color: #fff;
  color: var(--th-ink);
}

input.form-control:focus,
select.form-select:focus,
.nice-select.open,
select:focus {
  border-color: var(--theme-color);
  box-shadow: 0 0 0 4px rgba(11, 94, 215, .12);
}

/* ---------- 6. Hero search — vertical tower → compact card ---------- */
#search-form.booking-list-area {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  padding: 26px;
  border-radius: var(--th-radius-l);
  background: #fff;
  box-shadow: var(--th-shadow);
  border: 1px solid var(--border);
}

/* Anything that isn't a field (price row, buttons, decorations)
   spans the full width of the card. */
#search-form.booking-list-area > :not(.booking-list),
#search-form.booking-list-area > .booking-list-price {
  grid-column: 1 / -1;
}

#search-form .booking-list {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-start;
  text-align: left !important;
  gap: 12px;
  margin: 0 !important;
  padding: 10px 14px !important;
  border: 1.5px solid var(--border);
  border-radius: var(--th-radius-s);
  background: #FAFCFF;
}

#search-form .booking-list:focus-within {
  border-color: var(--theme-color);
  box-shadow: 0 0 0 4px rgba(11, 94, 215, .1);
  background: #fff;
}

#search-form .booking-list .icon {
  flex: 0 0 auto;
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  display: grid !important;
  place-items: center;
  border-radius: 10px !important;
  background: rgba(244, 80, 42, .1) !important;
  color: var(--theme-color-2) !important;
  font-size: 15px !important;
  margin: 0 !important;
  box-shadow: none !important;
  position: static !important;
  transform: none !important;
}

#search-form .booking-list .content {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left !important;
}

#search-form .booking-list .content h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 2px !important;
}

/* Fields inside the compact rows lose their heavy chrome entirely */
#search-form .booking-list .form,
#search-form .booking-list .form-clt,
#search-form .booking-list .input-group {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#search-form .booking-list input,
#search-form .booking-list select,
#search-form .booking-list .nice-select {
  border: 0 !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 22px 0 0 !important;
  background-color: transparent !important;
  font-weight: 600;
  font-size: 15px;
  color: var(--th-ink) !important;
  box-shadow: none !important;
}

#search-form .booking-list select { background-position: right 2px center; }

#search-form .booking-list .input-group-addon { border: 0; background: transparent; }

/* Price slider row: keep it tight */
#search-form .booking-list-price { background: transparent !important; border: 0 !important; padding: 6px 4px 0 !important; }
#search-form .booking-list-price .icon { display: none !important; }

/* Buttons row: search stretches, reset stays quiet */
#search-form .search-buttons {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-top: 4px;
}

#search-form .search-btn { flex: 1 1 auto; }

#search-form .reset-btn {
  flex: 0 0 auto;
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 600;
  color: var(--text);
}

#search-form .reset-btn:hover {
  border-color: var(--theme-color);
  color: var(--theme-color);
}

.noUi-connect { background: var(--th-grad); }
.noUi-handle {
  border-radius: 50%;
  border: 3px solid var(--theme-color-2);
  box-shadow: 0 2px 8px rgba(15, 27, 45, .18);
}

/* ---------- 7. Offer / destination cards ---------- */
.tour-box-items {
  border-radius: var(--th-radius) !important;
  box-shadow: var(--th-shadow-s) !important;
  border: 1px solid var(--border);
  transition: transform .25s ease, box-shadow .25s ease !important;
  overflow: hidden;
}

.tour-box-items:hover {
  transform: translateY(-6px) !important;
  box-shadow: var(--th-shadow-hover) !important;
}

.tour-box-items .tour-image,
.tour-box-items .thumb { overflow: hidden; }

.tour-box-items .tour-image img,
.tour-box-items .thumb img {
  transition: transform .5s ease;
}

.tour-box-items:hover .tour-image img,
.tour-box-items:hover .thumb img {
  transform: scale(1.05);
}

/* Generic cards elsewhere (destination tiles, partners, etc.) */
.destination-card, .card {
  border-radius: var(--th-radius);
  border: 1px solid var(--border);
}

/* ---------- 8. Offers page: filter sidebar ---------- */
.tour-sidebar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--th-radius);
  box-shadow: var(--th-shadow-s);
  padding: 22px;
  position: sticky;
  top: 96px;
}

.tour-sidebar .sidebar-widget {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.tour-sidebar .sidebar-widget:last-child { border-bottom: 0; padding-bottom: 0; }

.tour-sidebar .widget-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--th-ink);
}

/* ---------- 9. Section rhythm & headings ---------- */
.section-padding { padding-top: 88px; padding-bottom: 88px; }

.section-title span,
.eyebrow {
  color: var(--theme-color-2);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 13px;
}

/* ---------- 10. Badges / pills ---------- */
.badge { border-radius: 999px; font-weight: 600; }

/* ---------- 11. Footer & top bar ---------- */
.header-top-1, .top-header {
  background: var(--header);
}

/* ---------- 12. Scrollbars (subtle, webkit) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #C6D2E4;
  border-radius: 999px;
  border: 2px solid #fff;
}
::-webkit-scrollbar-thumb:hover { background: #9FB2CE; }

/* ---------- 13. Mobile ---------- */
/* The theme's decorative shapes and fixed-width hero blocks push the
   page wider than the viewport on phones — contain everything. */
html, body { overflow-x: hidden; }

@media (max-width: 767px) {
  #search-form.booking-list-area {
    grid-template-columns: 1fr;
    padding: 18px;
    max-width: 100%;
  }

  .hero-section .container,
  .hero-section .hero-content,
  .hero-section .row,
  .hero-section [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
  }

  .hero-section h1 { font-size: clamp(30px, 9vw, 42px); }

  /* The overlapping arch image collage doesn't fit small screens */
  .hero-section .hero-image-items { display: none; }

  /* The fixed-width logo + action icons exceeded 390px and forced the
     whole page wider than small viewports (everything clipped right). */
  .header-logo img { max-width: 150px !important; height: auto; }
  .header-main { padding-inline: 12px; }

  .section-padding { padding-top: 56px; padding-bottom: 56px; }
  .tour-sidebar { position: static; }
}
