/* =========================================================
   WildRoute - Experiences listing (safaris-front.css)
   Location: assets/css/css-front/safaris-front.css

   Clean, calm design matching index-front.css.
   All classes are prefixed "sf-".

   01 Tokens            08 Results grid
   02 Base              09 Cards
   03 Buttons           10 Pagination
   04 Title card        11 Empty state
   05 Tabs              12 Responsive
   06 Filters           13 Motion
   07 Filter sheet
   ========================================================= */

/* =========================================================
   01. TOKENS
   ========================================================= */
:root {
  --sf-bg:          #f7f7f9;
  --sf-card:        #ffffff;
  --sf-ink:         #14161a;
  --sf-ink-2:       #565a63;
  --sf-ink-3:       #8b8f98;
  --sf-line:        #e8e9ed;
  --sf-soft:        #f2f3f6;

  --sf-accent:      #d94460;
  --sf-accent-dark: #b8324b;
  --sf-accent-soft: #fdeef1;
  --sf-star:        #f2a800;

  --sf-r-lg:  22px;
  --sf-r-xl:  28px;
  --sf-r-2xl: 36px;

  --sf-shadow-sm: 0 1px 2px rgba(20, 22, 26, .04);
  --sf-shadow:    0 4px 16px -8px rgba(20, 22, 26, .12);
  --sf-shadow-lg: 0 20px 50px -24px rgba(20, 22, 26, .28);

  --sf-gap: clamp(14px, 2vw, 22px);
  --sf-ease: cubic-bezier(.4, 0, .2, 1);
}

/* =========================================================
   02. BASE
   ========================================================= */
body.page-safaris {
  background: var(--sf-bg);
  color: var(--sf-ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
html.sf-lock,
html.sf-lock body { overflow: hidden; }

.sf *, .sf *::before, .sf *::after { box-sizing: border-box; }

.sf {
  padding-block: clamp(14px, 2vw, 22px) clamp(40px, 6vw, 72px);
  overflow-x: clip;
}
.sf-wrap {
  width: min(1200px, 100% - 32px);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sf-gap);
}

.sf a { color: inherit; text-decoration: none; }
.sf img { display: block; max-width: 100%; }
.sf h1, .sf h2, .sf p { margin: 0; }
.sf ol { margin: 0; padding: 0; list-style: none; }
.sf :focus-visible {
  outline: 3px solid var(--sf-ink);
  outline-offset: 3px;
  border-radius: 12px;
}

.sf-ico {
  width: 18px; height: 18px; flex-shrink: 0;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.sf-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sf-muted { color: var(--sf-ink-3); }

/* =========================================================
   03. BUTTONS
   ========================================================= */
.sf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, color .18s ease,
              border-color .18s ease, transform .18s var(--sf-ease);
}
.sf-btn:active { transform: scale(.98); }

.sf-btn-dark {
  background: var(--sf-ink);
  color: #fff;
}
.sf-btn-dark:hover { background: #26282e; }

.sf-btn-light {
  background: #fff;
  color: var(--sf-ink);
  border-color: var(--sf-line);
}
.sf-btn-light:hover { border-color: var(--sf-ink-3); }

/* =========================================================
   04. TITLE CARD
   ========================================================= */
.sf-top {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 3.4vw, 40px);
  background: var(--sf-card);
  border-radius: var(--sf-r-xl);
  box-shadow: var(--sf-shadow-sm);
}
.sf-top-text { min-width: 0; }

.sf-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--sf-ink-3);
}
.sf-crumbs li + li::before {
  content: '/';
  margin-right: 6px;
  color: #c4c6cc;
}
.sf-crumbs a:hover { color: var(--sf-ink); }
.sf-crumbs [aria-current] { color: var(--sf-ink); font-weight: 600; }

.sf-title {
  margin-top: 12px;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.sf-lede {
  margin-top: 10px;
  max-width: 58ch;
  color: var(--sf-ink-2);
  font-size: clamp(.94rem, 1.1vw, 1.02rem);
  line-height: 1.6;
}
.sf-top-count {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
  min-width: 110px;
  padding: 14px 20px;
  border-radius: 18px;
  background: var(--sf-soft);
}
.sf-top-number {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
}
.sf-top-noun {
  margin-top: 4px;
  font-size: .82rem;
  color: var(--sf-ink-3);
  font-weight: 500;
}

/* =========================================================
   05. TYPE TABS
   ========================================================= */
.sf-tabs { margin-inline: -16px; }
.sf-tabs-track {
  display: flex;
  gap: 8px;
  padding: 2px 16px 6px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.sf-tabs-track::-webkit-scrollbar { display: none; }

.sf-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  height: 44px;
  padding: 0 8px 0 18px;
  border: 1px solid var(--sf-line);
  border-radius: 999px;
  background: #fff;
  color: var(--sf-ink-2);
  font-size: .9rem;
  font-weight: 500;
  scroll-snap-align: start;
  white-space: nowrap;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.sf-tab:hover { border-color: var(--sf-ink-3); color: var(--sf-ink); }

.sf-tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--sf-soft);
  color: var(--sf-ink-2);
  font-size: .76rem;
  font-weight: 600;
}
.sf-tab.is-active {
  background: var(--sf-ink);
  border-color: var(--sf-ink);
  color: #fff;
}
.sf-tab.is-active .sf-tab-count {
  background: var(--sf-accent);
  color: #fff;
}

@media (min-width: 769px) {
  .sf-tabs { margin-inline: 0; }
  .sf-tabs-track {
    padding-inline: 0;
    flex-wrap: wrap;
    overflow: visible;
  }
}

/* =========================================================
   06. FILTERS
   ========================================================= */
.sf-toolbar { display: flex; flex-direction: column; gap: 12px; }

.sf-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--sf-card);
  border-radius: 999px;
  box-shadow: var(--sf-shadow-sm);
}

.sf-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1.5;
  min-width: 0;
  height: 50px;
  padding: 0 8px 0 20px;
  border-radius: 999px;
  background: var(--sf-soft);
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease;
}
.sf-search:focus-within {
  background: #fff;
  border-color: var(--sf-ink);
}
.sf-search > .sf-ico { color: var(--sf-ink-3); }
.sf-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: .96rem;
  color: var(--sf-ink);
}
.sf-search input::placeholder { color: var(--sf-ink-3); }
.sf-search input::-webkit-search-cancel-button { display: none; }

.sf-filter-toggle { display: none; }

/* Desktop: filters inline in the bar */
.sf-sheet { display: contents; }
.sf-sheet-head, .sf-sheet-backdrop { display: none; }

.sf-field { flex: 1; min-width: 0; }
.sf-label {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.sf-field select {
  width: 100%;
  height: 50px;
  padding: 0 42px 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background-color: var(--sf-soft);
  color: var(--sf-ink);
  font: inherit;
  font-size: .92rem;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b8f98' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  transition: background-color .18s ease, border-color .18s ease;
}
.sf-field select:hover { background-color: #ececf0; }
.sf-field select:focus {
  outline: 0;
  border-color: var(--sf-ink);
  background-color: #fff;
}

.sf-actions { display: flex; gap: 8px; flex-shrink: 0; }
.sf-actions .sf-btn { height: 50px; }

.sf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px 0 16px;
  border: 1px solid var(--sf-line);
  border-radius: 999px;
  background: #fff;
  font-size: .84rem;
  font-weight: 500;
  transition: border-color .18s ease;
}
.sf-chip .sf-ico { width: 14px; height: 14px; color: var(--sf-ink-3); }
.sf-chip:hover { border-color: var(--sf-accent); }
.sf-chip:hover .sf-ico { color: var(--sf-accent); }

/* =========================================================
   07. FILTER SHEET (mobile)
   ========================================================= */
@media (max-width: 768px) {
  .sf-form { padding: 6px; }
  .sf-search { flex: 1; height: 48px; }

  .sf-js .sf-filter-toggle {
    position: relative;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--sf-ink);
    color: #fff;
    cursor: pointer;
  }
  .sf-js .sf-filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--sf-accent);
    font-size: .68rem;
    font-weight: 700;
    color: #fff;
  }

  /* No-JS fallback: stacked fields */
  .sf-form { flex-wrap: wrap; border-radius: 26px; }
  .sf-sheet {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 4px;
  }
  .sf-field select { height: 48px; background-color: var(--sf-soft); }
  .sf-actions { width: 100%; }
  .sf-actions .sf-btn { flex: 1; }

  /* JS: bottom sheet */
  .sf-js .sf-form { flex-wrap: nowrap; border-radius: 999px; }
  .sf-js .sf-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1250;
    width: auto;
    max-height: 90dvh;
    overflow-y: auto;
    gap: 14px;
    padding: 12px 20px calc(22px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -30px 60px -20px rgba(0, 0, 0, .3);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform .32s var(--sf-ease), visibility .32s ease;
  }
  .sf-js .sf-sheet::before {
    content: '';
    align-self: center;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--sf-line);
    margin-bottom: 2px;
  }
  .sf-js .sf-sheet.is-open { transform: none; visibility: visible; }
  .sf-js .sf-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .sf-sheet-head h2 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -.02em;
  }
  .sf-x {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--sf-soft);
    color: var(--sf-ink);
    cursor: pointer;
  }
  .sf-js .sf-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1240;
    background: rgba(20, 22, 26, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s ease, visibility .24s ease;
  }
  .sf-js .sf-sheet-backdrop.is-open { opacity: 1; visibility: visible; }
  .sf-js .sf-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0 0 6px 4px;
    overflow: visible;
    clip: auto;
    display: block;
    font-size: .82rem;
    font-weight: 500;
    color: var(--sf-ink-3);
  }
  .sf-js .sf-actions .sf-btn { height: 52px; }
}

/* =========================================================
   08. RESULTS GRID
   ========================================================= */
.sf-results { display: flex; flex-direction: column; gap: 14px; }
.sf-range {
  font-size: .86rem;
  color: var(--sf-ink-3);
  font-weight: 500;
  padding-left: 4px;
}

.sf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sf-gap);
}
@media (max-width: 1024px) { .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .sf-grid { grid-template-columns: 1fr; } }

/* =========================================================
   09. CARDS
   ========================================================= */
.sf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--sf-card);
  border-radius: var(--sf-r-lg);
  box-shadow: var(--sf-shadow-sm);
  transition: box-shadow .22s ease, transform .28s var(--sf-ease);
}
@media (hover: hover) {
  .sf-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sf-shadow);
  }
  .sf-card:hover .sf-go { background: var(--sf-accent); }
  .sf-card:hover .sf-card-media img { transform: scale(1.04); }
}

.sf-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 6px 6px 0;
  overflow: hidden;
  border-radius: 16px;
  background: var(--sf-soft);
}
.sf-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--sf-ease);
}
.sf-card-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #c4c6cc;
  background: linear-gradient(160deg, #f3f3f6, #e8e8ec);
}
.sf-card-placeholder .sf-ico { width: 40px; height: 40px; stroke-width: 1.4; }

.sf-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  font-size: .72rem;
  font-weight: 700;
  color: var(--sf-ink);
}
.sf-badge--featured {
  top: auto;
  left: 10px;
  bottom: 10px;
  background: var(--sf-accent);
  color: #fff;
}

.sf-save {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--sf-ink);
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.sf-save:hover { background: #fff; }
.sf-save:active { transform: scale(.94); }
.sf-save.is-saved { color: var(--sf-accent); }
.sf-save.is-saved .sf-ico { fill: currentColor; }
.sf-save .sf-ico { width: 16px; height: 16px; }

.sf-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px 18px;
}
.sf-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sf-card-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }

.sf-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--sf-ink-2);
}
.sf-rating strong { color: var(--sf-ink); font-weight: 700; }
.sf-star { width: 14px; height: 14px; fill: var(--sf-star); }

.sf-card-desc {
  font-size: .85rem;
  line-height: 1.5;
  color: var(--sf-ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sf-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid var(--sf-line);
  border-radius: 999px;
  background: var(--sf-soft);
  font-size: .74rem;
  font-weight: 500;
  color: var(--sf-ink-2);
}
.sf-tag .sf-ico { width: 13px; height: 13px; color: var(--sf-ink-3); }

.sf-operator {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  font-size: .82rem;
  font-weight: 500;
  color: var(--sf-ink-2);
}
.sf-operator:hover { color: var(--sf-ink); }
.sf-operator-avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--sf-accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
}
.sf-operator-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sf-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--sf-line);
}
.sf-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; min-width: 0; }
.sf-price-label { width: 100%; font-size: .72rem; color: var(--sf-ink-3); font-weight: 500; }
.sf-price-amount {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}
.sf-price-unit { font-size: .76rem; color: var(--sf-ink-3); }

.sf-go {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--sf-soft);
  color: var(--sf-ink);
  transition: background .2s ease, color .2s ease;
}
.sf-go .sf-ico { width: 16px; height: 16px; }

/* =========================================================
   10. PAGINATION
   ========================================================= */
.sf-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.sf-page, .sf-dots {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
}
.sf-page {
  background: #fff;
  border: 1px solid var(--sf-line);
  color: var(--sf-ink-2);
  transition: border-color .18s ease, color .18s ease;
}
.sf-page:hover { border-color: var(--sf-ink-3); color: var(--sf-ink); }
.sf-page.is-current {
  background: var(--sf-ink);
  border-color: var(--sf-ink);
  color: #fff;
}
.sf-dots { color: var(--sf-ink-3); }

/* =========================================================
   11. EMPTY STATE
   ========================================================= */
.sf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: clamp(40px, 7vw, 80px) 24px;
  text-align: center;
  background: var(--sf-card);
  border-radius: var(--sf-r-xl);
  box-shadow: var(--sf-shadow-sm);
}
.sf-empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
  border-radius: 18px;
  background: var(--sf-accent-soft);
  color: var(--sf-accent);
}
.sf-empty-icon .sf-ico { width: 24px; height: 24px; }
.sf-empty-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.sf-empty-text {
  max-width: 42ch;
  color: var(--sf-ink-3);
  line-height: 1.55;
  font-size: .92rem;
}
.sf-empty .sf-btn { margin-top: 14px; }

/* =========================================================
   12. RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  .sf-wrap { width: calc(100% - 24px); }

  .sf-top {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 24px;
    gap: 16px;
  }
  .sf-top-count {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    padding: 10px 18px;
    border-radius: 999px;
  }
  .sf-top-number { font-size: 1.3rem; }
  .sf-top-noun { margin: 0; }

  .sf-title { font-size: clamp(1.6rem, 6vw, 2rem); }
  .sf-lede { font-size: .94rem; }
}

/* =========================================================
   13. MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .sf *, .sf *::before, .sf *::after {
    transition-duration: .01ms !important;
    animation: none !important;
  }
}