/* =========================================================
   Travelia Tours -- layout glue (added in 1.1.0)
   - makes the original design sit inside ANY theme's header/footer
   - CSS-grid wrapper used by shortcodes / Elementor widgets
   - pagination + small helpers for the server-rendered archives
   ========================================================= */

/* ---------- Inside a theme: no fixed navbar to clear ---------- */
.tt-theme-layout .tours-hero {
  padding-top: 0;
  min-height: 340px;
}

.tt-theme-layout .td-hero {
  padding: 70px 0 50px;
}

@media (max-width: 768px) {
  .tt-theme-layout .tours-hero {
    min-height: 260px;
  }

  .tt-theme-layout .td-hero {
    padding: 50px 0 36px;
  }
}

/* ---------- Card title links keep the card look ---------- */
:where(.tt-scope) .tour-item-content h3 a {
  color: inherit;
  text-decoration: none;
}

:where(.tt-scope) .tour-item-content h3 a:hover {
  color: var(--tt-secondary, #1BA6A6);
}

/* ---------- Filter form helpers ---------- */
.tt-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

:where(.tt-scope) a.reset-btn {
  display: block;
  text-align: center;
  text-decoration: none;
}

.tt-apply-btn {
  width: 100%;
  margin-bottom: 10px;
  border: 0;
  cursor: pointer;
}

/* ---------- Pagination ---------- */
.tt-pagination {
  margin-top: 40px;
}

.tt-pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tt-pagination a,
.tt-pagination span {
  display: inline-block;
  min-width: 42px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--tt-primary, #0B1F33);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
}

.tt-pagination .current,
.tt-pagination a:hover {
  background: var(--tt-secondary, #1BA6A6);
  color: #fff;
}

/* ---------- Grid wrapper (shortcodes / Elementor, no Bootstrap needed) ---------- */
.tt-grid {
  display: grid;
  grid-template-columns: repeat(var(--tt-cols, 3), minmax(0, 1fr));
  gap: var(--tt-gap, 24px);
}

.tt-grid-item {
  min-width: 0;
}

.tt-grid .tour-item {
  height: 100%;
}

@media (max-width: 991px) {
  .tt-grid {
    grid-template-columns: repeat(min(var(--tt-cols, 3), 2), minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .tt-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Destination cards ---------- */
.tt-destination-card {
  position: relative;
  display: block;
  min-height: 240px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--tt-primary, #0B1F33) center / cover no-repeat;
  color: #fff;
  text-decoration: none;
}

.tt-destination-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 31, 51, .85), rgba(11, 31, 51, .1));
}

.tt-destination-card span,
.tt-destination-card small {
  position: absolute;
  left: 22px;
  z-index: 1;
}

.tt-destination-card span {
  bottom: 38px;
  font-size: 24px;
  font-weight: 700;
}

.tt-destination-card small {
  bottom: 18px;
  opacity: .85;
}

.tt-grid-empty {
  padding: 30px;
  text-align: center;
  color: var(--tt-text, #263238);
}

/* =========================================================
   Card v2 (1.2.0) -- cleaner, more "shop-like" cards
   Logical properties (inset-inline-*) so the cards mirror
   correctly on RTL (Arabic) sites.
   ========================================================= */
:where(.tt-scope) .tour-item {
  position: relative;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 22px rgba(11, 31, 51, .08);
}

:where(.tt-scope) .tour-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(11, 31, 51, .16);
}

:where(.tt-scope) .tour-item-image {
  aspect-ratio: 16 / 9;
  background: #e9eef0;
}

:where(.tt-scope) .tour-item-image > a {
  position: absolute;
  inset: 0;
  display: block;
}

:where(.tt-scope) .tour-item-image > a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

:where(.tt-scope) .tour-item-image::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(to top, rgba(11, 31, 51, .4), transparent);
  pointer-events: none;
}

/* ---------- Badges: ONE row, side by side, start corner ----------
   (higher specificity than tours.css `.tour-item-image span`, which
   would otherwise stack/absolutely-position every nested span) */
:where(.tt-scope) .tour-item-image .tt-badges {
  position: absolute;
  top: 12px;
  left: auto;
  inset-inline-start: 12px;
  inset-inline-end: 12px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: none;
  pointer-events: none;
}

:where(.tt-scope) .tour-item-image .tt-badges .tt-badge {
  position: static;
  top: auto;
  left: auto;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--tt-primary, #0B1F33);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .3px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}

:where(.tt-scope) .tour-item-image .tt-badges .tt-badge-sale,
:where(.tt-scope) .tour-item-image .tt-badges .tt-badge-limited_offer { background: #E5484D; }
:where(.tt-scope) .tour-item-image .tt-badges .tt-badge-featured { background: var(--tt-secondary, #1BA6A6); }
:where(.tt-scope) .tour-item-image .tt-badges .tt-badge-popular { background: var(--tt-primary, #0B1F33); }
:where(.tt-scope) .tour-item-image .tt-badges .tt-badge-bestseller { background: #B8860B; }
:where(.tt-scope) .tour-item-image .tt-badges .tt-badge-new { background: #2F9E44; }
:where(.tt-scope) .tour-item-image .tt-badges .tt-badge-main { background: rgba(11, 31, 51, .85); }

/* "Fully booked" goes to the OPPOSITE corner (bottom), away from the badges */
:where(.tt-scope) .tour-item-image .tt-ribbon-fully-booked {
  top: auto;
  left: auto;
  right: auto;
  bottom: 12px;
  inset-inline-end: 12px;
  z-index: 3;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(11, 31, 51, .88);
  font-size: 11px;
}

:where(.tt-scope) .tour-item-content {
  padding: 14px 16px 16px;
}

:where(.tt-scope) .tour-item-content .tt-card-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tt-secondary, #1BA6A6);
  font-size: 12.5px;
  font-weight: 600;
}

.tt-icon {
  flex: none;
}

:where(.tt-scope) .tour-item-content h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 6px 0 6px;
  font-size: 17px;
  line-height: 1.3;
}

:where(.tt-scope) .tour-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: #F5A623;
  font-size: 13px;
  letter-spacing: 1px;
}

:where(.tt-scope) .tour-rating b {
  color: var(--tt-primary, #0B1F33);
  font-size: 13px;
  letter-spacing: 0;
}

:where(.tt-scope) .tour-item-content p {
  min-height: 0;
  margin: 0;
  color: #6b7785;
  font-size: 13px;
  line-height: 1.5;
}

:where(.tt-scope) .tour-item .tour-meta {
  margin: 12px 0 12px;
  padding: 10px 0 0;
  border-top: 1px dashed #dde3e8;
  border-bottom: 0;
  align-items: flex-end;
}

.tt-meta-duration {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 30px;
  background: #EEF6F6;
  color: var(--tt-primary, #0B1F33);
  font-size: 12.5px;
  font-weight: 600;
}

.tt-meta-price {
  text-align: end;
  color: var(--tt-primary, #0B1F33);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.1;
}

.tt-price-top {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  line-height: 1.2;
}

:where(.tt-scope) .tour-item-content .tt-meta-price small {
  color: #8a97a6;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.tt-meta-price .original-price {
  color: #9aa5b1;
  font-size: 12px;
  font-weight: 500;
}

.tt-price-now {
  display: block;
}

:where(.tt-scope) .tour-item .details-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  background: var(--tt-primary, #0B1F33);
  transition: background .25s ease, gap .25s ease;
}

:where(.tt-scope) .tour-item .details-btn::after {
  content: "\2192";
  transition: transform .25s ease;
}

:where(.tt-scope) .tour-item .details-btn:hover {
  background: var(--tt-secondary, #1BA6A6);
  gap: 12px;
}

html[dir="rtl"] :where(.tt-scope) .tour-item .details-btn::after {
  content: "\2190";
}

/* ---------- Shop-style results bar ---------- */
.tt-results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  padding: 12px 18px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(11, 31, 51, .06);
}

.tt-results-count {
  margin: 0;
  color: #6b7785;
  font-size: 14px;
}

.tt-sort {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--tt-primary, #0B1F33);
  font-size: 14px;
  font-weight: 600;
}

.tt-sort select {
  padding: 8px 12px;
  border: 1px solid #dde3e8;
  border-radius: 10px;
  background: #fff;
  color: var(--tt-primary, #0B1F33);
  font-size: 14px;
}

/* ---------- Hero slider ---------- */
.tt-hero.has-slider {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: var(--tt-primary, #0B1F33);
}

.tt-theme-layout .tt-hero.has-slider {
  min-height: 420px;
}

.tt-hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.tt-hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.2s ease, transform 6s ease;
}

.tt-hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.tt-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(11, 31, 51, .75), rgba(11, 31, 51, .35));
}

.tt-hero-inner {
  position: relative;
  z-index: 2;
}

.tt-hero-dots {
  position: absolute;
  inset-inline: 0;
  bottom: 22px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.tt-hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: width .3s ease, background .3s ease;
}

.tt-hero-dot.is-active {
  width: 28px;
  border-radius: 10px;
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .tt-hero-slide {
    transform: none;
    transition: opacity .3s ease;
  }
}

@media (max-width: 575px) {
  .tt-results-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Breadcrumbs ---------- */
.tt-breadcrumbs {
  margin: 0 0 14px;
}

.tt-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, .8);
  font-size: 13px;
}

.tt-breadcrumbs li + li::before {
  content: "/";
  margin-inline-end: 6px;
  opacity: .6;
}

.tt-breadcrumbs a {
  color: #fff;
  opacity: .9;
  text-decoration: none;
}

.tt-breadcrumbs a:hover {
  text-decoration: underline;
}

.tt-breadcrumbs [aria-current="page"] {
  opacity: .75;
}

/* =========================================================
   Horizontal filter bar  ([travelia_filter] / Elementor widget)

   Every look-and-feel value is a CSS variable (--ttf-*) with a built-in
   fallback. Settings > Filter Bar Style and the Elementor widget set those
   variables per screen size -- see includes/class-tt-filter-style.php.
   ========================================================= */
.tt-hfilter {
  width: 100%;
  box-sizing: border-box;
  padding: var(--ttf-box-pad, 18px);
  border: var(--ttf-box-bw, 0px) solid var(--ttf-box-bc, transparent);
  border-radius: var(--ttf-box-radius, 20px);
  background-color: var(--ttf-box-bg, #fff);
  box-shadow: 0 var(--ttf-shadow-y, 12px) var(--ttf-shadow-blur, 40px) var(--ttf-shadow-color, rgba(11, 31, 51, .14));
}

.tt-hfilter *,
.tt-hfilter *::before,
.tt-hfilter *::after {
  box-sizing: border-box;
}

.tt-hfilter-fields {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ttf-gap, 12px);
  align-items: var(--ttf-align, flex-end);
}

.tt-hfilter-field {
  flex: var(--ttf-grow, 1) 1 var(--ttf-basis, var(--ttf-min, 160px));
  min-width: 0;
}

.tt-hfilter-submit {
  flex: var(--ttf-submit-flex, 0 0 auto);
}

/* ---- Labels ---- */
.tt-hfilter-field label {
  display: var(--ttf-label-display, block);
  margin: 0 0 var(--ttf-label-gap, 6px);
  color: var(--ttf-label-color, var(--tt-primary, #0B1F33));
  font-size: var(--ttf-label-size, 12px);
  font-weight: var(--ttf-label-weight, 700);
  letter-spacing: var(--ttf-label-ls, .3px);
  text-transform: var(--ttf-label-transform, uppercase);
}

/* ---- Inputs and dropdowns ---- */
.tt-hfilter-field input[type="text"],
.tt-hfilter-field input[type="number"],
.tt-hfilter-field select {
  display: block;
  width: 100%;
  height: var(--ttf-input-h, 48px);
  margin: 0;
  padding: 0 var(--ttf-input-padx, 14px);
  border: var(--ttf-input-bw, 1px) solid var(--ttf-input-bc, #dde3e8);
  border-radius: var(--ttf-input-radius, 12px);
  background-color: var(--ttf-input-bg, #f7f9fa);
  color: var(--ttf-input-color, var(--tt-primary, #0B1F33));
  font-size: var(--ttf-input-size, 15px);
  line-height: 1.2;
  box-shadow: none;
}

.tt-hfilter-field input::placeholder {
  color: var(--ttf-ph-color, #7a8794);
  opacity: 1;
}

.tt-hfilter-field input:hover,
.tt-hfilter-field select:hover {
  border-color: var(--ttf-input-hover-bc, var(--ttf-input-bc, #dde3e8));
}

.tt-hfilter-field input:focus,
.tt-hfilter-field select:focus {
  border-color: var(--ttf-focus-bc, var(--tt-secondary, #1BA6A6));
  background-color: var(--ttf-focus-bg, #fff);
  outline: 0;
  box-shadow: 0 0 0 3px var(--ttf-focus-ring, rgba(27, 166, 166, .18));
}

/* ---- Button ---- */
.tt-hfilter-btn {
  display: block;
  width: 100%;
  min-width: var(--ttf-btn-minw, 140px);
  height: var(--ttf-btn-h, 48px);
  margin: 0;
  padding: 0 var(--ttf-btn-padx, 22px);
  border: var(--ttf-btn-bw, 0px) solid var(--ttf-btn-bc, transparent);
  border-radius: var(--ttf-btn-radius, 12px);
  background-color: var(--ttf-btn-bg, var(--tt-secondary, #1BA6A6));
  color: var(--ttf-btn-color, #fff);
  font-size: var(--ttf-btn-size, 15px);
  font-weight: var(--ttf-btn-weight, 700);
  letter-spacing: var(--ttf-btn-ls, 0px);
  text-transform: var(--ttf-btn-transform, none);
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .15s ease;
}

.tt-hfilter-btn:hover,
.tt-hfilter-btn:focus-visible {
  border-color: var(--ttf-btn-bc-h, var(--ttf-btn-bc, transparent));
  background-color: var(--ttf-btn-bg-h, var(--tt-primary, #0B1F33));
  color: var(--ttf-btn-color-h, var(--ttf-btn-color, #fff));
}

.tt-hfilter-btn:active {
  transform: translateY(1px);
}

/* Phones: one field per row and a full-width button, unless the style
   settings say otherwise (their variables sit closer to the fields). */
@media (max-width: 575px) {
  .tt-hfilter {
    --ttf-box-pad: 14px;
    --ttf-basis: 100%;
    --ttf-submit-flex: 1 1 100%;
  }
}


/* =========================================================
   1.6.1 -- Responsive hardening (phones, tablets, any theme)
   ========================================================= */

:where(.tt-scope) /* ---- Hero slider: slides must always fill the whole hero.
   Many themes ship `img { height:auto }:where(.tt-scope) ` (or `.elementor img`,
:where(.tt-scope) `.entry-content img`) which out-ranks a single class and leaves the
   photo at its natural height with a dark gap under it. ---- */
.tt-hero .tt-hero-slider .tt-hero-slide {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: cover !important;
}

.tt-hero.has-slider {
  display: flex;
  align-items: center;
}

.tt-hero-inner {
  padding-top: 56px;
  padding-bottom: 64px; /* keeps the text clear of the dots */
}

.tt-hero-dot {
  position: relative;
}

/* bigger touch area without changing the look */
.tt-hero-dot::after {
  content: "";
  position: absolute;
  inset: -10px -4px;
}

/* ---- Never let a row's negative margins create sideways scroll ---- */
.tt-listing,
.tt-main {
  overflow-x: clip;
}

.tt-listing .tour-item,
.tt-listing .tour-item-content,
.tt-listing .tour-filter {
  min-width: 0;
}

:where(.tt-scope) .tour-item-content h3,
:where(.tt-scope) .tour-item-content p,
.tt-card-location {
  overflow-wrap: anywhere;
}

.tt-listing .tour-filter select,
.tt-listing .tour-filter input[type="text"],
.tt-listing .tour-filter input[type="search"],
.tt-listing .tour-filter input[type="range"] {
  max-width: 100%;
}

.tt-listing .tour-filter input[type="range"] {
  width: 100%;
}

/* ---- Tablets and below ---- */
@media (max-width: 991px) {
  .tt-hero.has-slider,
.tt-theme-layout .tt-hero.has-slider {
    min-height: 340px;
  }

  .tt-listing .tt-py-5 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* ---- Phones ---- */
@media (max-width: 768px) {
  .tt-hero.has-slider,
.tt-theme-layout .tt-hero.has-slider {
    min-height: 280px;
    padding: 0;
  }

  .tt-hero-inner {
    padding: 36px 16px 56px;
  }

  :where(.tt-scope) .tours-hero h1,
:where(.tt-scope) .tours-hero h2 {
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.15;
    margin-bottom: 10px;
  }

  :where(.tt-scope) .tours-hero-content p {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 0;
  }

  :where(.tt-scope) .tours-hero span {
    letter-spacing: 3px;
    font-size: 13px;
  }

  .tt-breadcrumbs {
    margin-bottom: 10px;
  }

  .tt-hero-dots {
    bottom: 14px;
  }

  .tt-listing .tt-container {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (max-width: 575px) {
  .tt-hero.has-slider,
.tt-theme-layout .tt-hero.has-slider {
    min-height: 250px;
  }

  .tt-results-bar {
    gap: 12px;
    padding: 14px 16px;
  }

  .tt-sort {
    width: 100%;
    justify-content: space-between;
  }

  .tt-sort select {
    flex: 1 1 auto;
    min-width: 0;
  }

  :where(.tt-scope) .tour-item .tour-meta {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .tt-pagination a,
.tt-pagination span {
    min-width: 38px;
    padding: 8px 11px;
  }
}

/* ---- Very small phones ---- */
@media (max-width: 360px) {
  .tt-hero-inner {
    padding: 28px 14px 52px;
  }

  :where(.tt-scope) .tours-hero-content p {
    font-size: 14px;
  }
}
