/* ==========================================================================
   HOME PAGE — home.css  (page-specific styles only)
   Load order: design.css → shared.css → home.css
   Shared components (navbar, cards, sheets, footer) live in shared.css.
   ========================================================================== */

/* ── Hero ────────────────────────────────────────────────────────────── */
/* Gradient + image URL live in the inline style on the <section>.
   #searchWrap sits inside .hero-inner — no padding-bottom trick needed.  */
.hero {
  position: relative;
  min-height: 330px; display: flex; align-items: end;
}
@media (max-width: 767px) { .hero { min-height: 270px; } }

.hero-inner {
  position: relative; z-index: 1;
  padding-block: 70px 50px;
}

/* ── Hero background layer — admin-managed slider (fade) or static fallback ──
   Fills .hero behind .hero-inner, background image only — no text inside a
   slide (see .hero-slide-text below, now a single shared placeholder instead
   of one copy per slide). */
.hero-swiper, .hero-static {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
}
.hero-swiper .swiper-slide,
.hero-static {
  width: 100%; height: 100%;
}

/* ── Hero text — one shared placeholder in .hero-inner (not per-slide) ──────
   Sits above #searchWrap as a normal block child, matching the original
   static design's own layout; home.js rewrites its text on Swiper's
   slideChange event instead of each slide carrying its own text block, so a
   longer title never fights the search bar for space underneath it. */
.hero-slide-text { padding-inline: 1rem; }
.hero-slide-text p { line-height: 22px; }

/* Hero title — replaces inline style="font-size:clamp(...)" */
.hero-title { font-size: clamp(2.1rem, 5.5vw, 3.1rem); }

/* Mobile search pill */
.hero-pill {
  display: flex; align-items: center; gap: 10px; width: 100%;
  max-width: 380px; margin-inline: auto;
  background: #fff; border: 0; border-radius: 50px;
  padding: 12px 16px; box-shadow: 0 4px 20px rgba(0,0,0,.2);
  cursor: pointer; font-family: inherit;
}
.hero-pill .pill-ic  { color: var(--color-accent); font-size: 1.02rem; }
.hero-pill .pill-txt { flex: 1; text-align: start; font-weight: 500; font-size: 1.02rem; color: var(--color-text-secondary); line-height: 17px; }
.hero-pill .pill-btn { background: var(--color-cta); color: #fff; border-radius: 50px; padding: 6px 18px; font-weight: 800; font-size: .92rem; }

/* ── Search bar (.sr2-bar) ───────────────────────────────────────────── */
@media (min-width: 768px) {
  .sr2-bar { width: min(1000px, 100%); margin-inline: auto; };
  .sr2-bar .sr2-field:nth-child(1),
  .sr2-bar .sr2-field:nth-child(2) {
    max-width: 250px;
  }
}

@media (max-width: 991px) {
  .sr2-bar .sr2-field:nth-child(1),
  .sr2-bar .sr2-field:nth-child(2) {
    max-width: 200px;
  }
}

/* ── Search wrap (#searchWrap) — sits inside .hero, transparent ──────
   .sr2-bar already has its own frosted-glass background + shadow.
   The wrapper stays transparent so the hero image shows through.       */
#searchWrap {
  padding: 10px 12px;
}

/* While it sticks (components/search-bar-sticky.js, rules in shared.css) the wrap keeps its padding. */
#searchWrap.is-affixed { padding: 10px 12px; }

/* ── Trust strip ─────────────────────────────────────────────────────── */
.htrust-ic {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: #fff; color: var(--color-accent);
  display: grid; place-items: center; font-size: 1.1rem;
}
.htrust-title { font-weight: 700; font-size: 1.02rem; color: #fff; }
.htrust-sub   { font-size: .88rem; color:#fff; }

/* ── Trust ticker ─────────────────────────────────────────────────────── */
/* direction:ltr on the container anchors the inline-flex track to the
   physical LEFT edge even on RTL pages — without this, the track starts
   from the right and translateX(-50%) leaves a blank void on the right.
   Applied only under html[dir="rtl"] (see RTL OVERRIDES section below)
   so LTR pages are unaffected. */
.trust-ticker {
  background: var(--color-accent);
  overflow: hidden;
  position: relative;
}
/* Soft fade at both edges */
.trust-ticker::before,
.trust-ticker::after {
  content: ''; position: absolute; top: 0; bottom: 0;
  width: 80px; z-index: 2; pointer-events: none;
}
.trust-ticker::before { left: 0;  background: linear-gradient(to right, var(--color-accent), transparent); }
.trust-ticker::after  { right: 0; background: linear-gradient(to left,  var(--color-accent), transparent); }

/* Track shifts by exactly 50% (= one full duplicated set) for a seamless loop.
   Default animation is tt-scroll (RTL pages). LTR pages override below. */
.trust-ticker-track {
  display: inline-flex;
  align-items: center;
  animation: tt-scroll 28s linear infinite;
  will-change: transform;
}

/* RTL pages — track moves RIGHT (from -50% → 0): content enters from left,
   exits right — matches right-to-left reading direction. */
@keyframes tt-scroll {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
/* LTR pages — track moves LEFT (from 0 → -50%): content enters from right,
   exits left — standard news-ticker direction. Despite the "-rtl" suffix in
   the name (historical), this keyframe is wired to LTR pages by the rule
   below. */
@keyframes tt-scroll-rtl {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* LTR pages use the left-scrolling keyframe (standard ticker behaviour). */
html[dir="ltr"] .trust-ticker-track { animation-name: tt-scroll-rtl; }

.trust-ticker:hover .trust-ticker-track { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .trust-ticker-track { animation: none; }
}

/* 8 items per set = 2× the track width of the original 4-item ticker.
   Double the duration so each item scrolls at the same comfortable speed. */
.htrust-ticker .trust-ticker-track { animation-duration: 56s; }

/* ── Trust ticker — htrust (accent-background strip) variant ─────────── */
.htrust-ticker {
  background: var(--color-accent);
  border-bottom: 1px solid var(--color-border);
}
/* Re-affirm edge-fade colours to match the accent background (same as the
   base .trust-ticker pseudo-elements — explicit here for clarity). */
.htrust-ticker::before { background: linear-gradient(to right, var(--color-accent), transparent); }
.htrust-ticker::after  { background: linear-gradient(to left,  var(--color-accent), transparent); }

.ht-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  padding-block: 12px;
}
.ht-sep {
  flex-shrink: 0;
  width: 1px;
  height: 32px;
  background: #ffffff54;
  margin-inline: 28px;
}

/* ── Sections ────────────────────────────────────────────────────────── */
.home-sec     { padding-block: 38px; }

/* The carousels' slides per view and gaps, by screen width (the .car-auto rule in shared.css sizes
   the slides from them). Units: 1.15 on a phone, then 2, 3, 4 and 4.5; cities: 1.3, then 2, 3, 4. */
.home-car-units { --car-per-view: 1.15; --car-gap: 16px; }
@media (min-width: 576px)  { .home-car-units { --car-per-view: 2; } }
@media (min-width: 768px)  { .home-car-units { --car-per-view: 3; } }
@media (min-width: 1100px) { .home-car-units { --car-per-view: 4; } }
@media (min-width: 1300px) { .home-car-units { --car-per-view: 4.5; } }

.home-car-cities { --car-per-view: 1.3; --car-gap: 16px; }
@media (min-width: 480px)  { .home-car-cities { --car-per-view: 2; } }
@media (min-width: 768px)  { .home-car-cities { --car-per-view: 3; --car-gap: 18px; } }
@media (min-width: 1280px) { .home-car-cities { --car-per-view: 4; --car-gap: 20px; } }
.home-sec--alt { background: var(--color-surface); }

/* ── View all ─────────────────────────────────────────────────── */
.hsec-see-all-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--color-cta); font-weight: 700; text-decoration: none;
}
.hsec-see-all-link:hover { text-decoration: underline; }
.hsec-see-all-link i { font-size: .72rem; }

/* ── City card ───────────────────────────────────────────────────────── */
.hcity-card {
  display: block; position: relative; border-radius: 16px; overflow: hidden;
  text-decoration: none; height: 150px;
}
.hcity-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.hcity-card:hover img { transform: scale(1.06); }
.hcity-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.58) 0%, transparent 32%);
}
/* A card with a line under its name needs a little more shade behind two lines of text. */
.hcity-card.has-tagline::after { background: linear-gradient(to top, rgba(0,0,0,.62) 0%, transparent 70%); }
.hcity-card .caption {
  position: absolute; bottom: 12px; inset-inline: 0; z-index: 1;
  text-align: center; color: #fff;
}
.hcity-card .name { display: block; font-weight: 800; font-size: 1.14rem; }
.hcity-card .tagline { display: block; padding-inline: 8px; opacity: .92; font-size: .9rem; }

/* ── Card image gallery — grab cursor hint on desktop ────────────────── */
/* Swipe is handled by touch events; grab cursor signals draggability on
   pointer devices. Buttons inside stay pointer. */
@media (hover: hover) {
  .p-card-img { cursor: grab; }
  .p-card-img:active { cursor: grabbing; }
  .p-card-img .slide-arrow,
  .p-card-img .card-wish,
  .p-card-img .card-offer-tag { cursor: pointer; }
}

/* ==========================================================================
   RTL OVERRIDES — applied when <html dir="rtl">
   (the app-banner's own RTL rules live in shared.css with the rest of it)
   ========================================================================== */

html[dir="rtl"] .trust-ticker {
  /* Anchors the inline-flex track to the physical LEFT edge. Without this,
     on an RTL page the track starts from the right and translateX(-50%)
     leaves a blank void on the right half. Individual items restore their
     own direction via the .ht-item rule below. */
  direction: ltr;
}

html[dir="rtl"] .ht-item {
  direction: rtl;
}

/* Section taglines (Top Picks/Monthly/Daily Offers/Explore by City) — Bootstrap's
   .small utility (0.875em) reads too small under each h2, at this weight/color. */
.home-sec p.text-muted.small { font-size: .95rem; }