/* Journey finder (/safaris). Brand colours only; cards are styled in site.css (.tc). */
.jf {
    --jf-dark: #2B1E12; --jf-brown: #5A3E1B; --jf-muted: #6B4F2A; --jf-gold: #D4A857; --jf-cream: #F7EBD7;
    --jf-paper: #FBF6EE; --jf-line: rgba(43, 30, 18, .12); --jf-ease: cubic-bezier(.22, 1, .36, 1);
    background: var(--jf-paper); color: var(--jf-dark); font-family: 'Poppins', sans-serif;
}
.jf [x-cloak] { display: none !important; }
.jf-wrap { max-width: 1320px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 1024px) { .jf-wrap { padding: 0 32px; } }

/* Hero */
.jf-hero { position: relative; display: flex; align-items: flex-end; min-height: 440px; padding: 90px 0 56px; overflow: hidden; color: #fff; }
.jf-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.jf-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43, 30, 18, .15) 0%, rgba(43, 30, 18, .78) 100%); }
.jf-hero-inner { position: relative; z-index: 1; width: 100%; }
.jf-hero .ui-kicker { color: var(--jf-gold); }
.jf-hero-title { max-width: 760px; color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); margin-top: 14px; font-family: 'Playfair Display', Georgia, serif; font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 500; line-height: 1.05; }
.jf-hero-lead { max-width: 600px; margin-top: 14px; font-size: 1rem; line-height: 1.7; color: rgba(255, 255, 255, .86); }
.jf-search { position: relative; display: block; max-width: 560px; margin-top: 26px; }
.jf-search svg { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--jf-brown); pointer-events: none; }
.jf .jf-search input { width: 100%; min-height: 56px !important; padding: 0 20px 0 50px !important; border: 0 !important; border-radius: 2px !important; background: #fff; font-size: .95rem; color: var(--jf-dark); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .5); }
.jf .jf-search input:focus { outline: 2px solid var(--jf-gold); outline-offset: 0; }

/* Reassurance strip */
.jf-usps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-top: -1px; padding: 0; list-style: none; background: var(--jf-line); border-bottom: 1px solid var(--jf-line); }
@media (min-width: 900px) { .jf-usps { grid-template-columns: repeat(4, 1fr); } }
.jf-usps li { padding: 18px 16px; background: #fff; }
.jf-usps strong { display: block; font-family: 'Playfair Display', Georgia, serif; font-size: 1.02rem; font-weight: 500; }
.jf-usps span { display: block; margin-top: 4px; font-size: .8rem; line-height: 1.5; color: var(--jf-muted); }

/* Layout */
.jf-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; padding-bottom: 90px; }
@media (min-width: 1024px) { .jf-main { grid-template-columns: 270px minmax(0, 1fr); gap: 40px; align-items: start; } }

/* Filters */
.jf-filters { background: #fff; border: 1px solid var(--jf-line); border-radius: 4px; }
@media (max-width: 1023px) {
    .jf-filters { position: fixed; inset: 0 auto 0 0; z-index: 70; display: flex; flex-direction: column; width: min(360px, 88vw); border: 0; border-radius: 0; overflow-y: auto; transform: translateX(-100%); transition: transform .4s var(--jf-ease); }
    .jf-filters.is-open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .25); }
}
.jf-backdrop { position: fixed; inset: 0; z-index: 69; background: rgba(43, 30, 18, .5); }
@media (min-width: 1024px) { .jf-backdrop { display: none; } }
.jf-filters-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--jf-line); }
.jf-filters-head p { font-family: 'Playfair Display', Georgia, serif; font-size: 1.2rem; }
.jf-close { width: 36px; height: 36px; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--jf-dark); cursor: pointer; }
@media (min-width: 1024px) { .jf-close { display: none; } }
.jf-group { border-bottom: 1px solid var(--jf-line); }
.jf-group summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; list-style: none; }
.jf-group summary::-webkit-details-marker { display: none; }
.jf-group summary::after { content: '+'; font-size: 1.1rem; font-weight: 400; color: var(--jf-brown); transition: transform .3s; }
.jf-group[open] summary::after { content: '–'; }
.jf-options, .jf-pills { padding: 0 20px 18px; }
.jf-option { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: .88rem; cursor: pointer; }
.jf-option input { flex: none; width: 17px; height: 17px; accent-color: var(--jf-brown); color: var(--jf-brown); border-radius: 3px; }
.jf-option span { flex: 1; }
.jf-option em { font-style: normal; font-size: .74rem; color: var(--jf-muted); }
.jf-option:hover span { color: var(--jf-brown); }
.jf-more { margin-top: 6px; padding: 0; border: 0; background: none; font-size: .82rem; font-weight: 600; color: var(--jf-brown); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.jf-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.jf-pill { position: relative; cursor: pointer; }
.jf-pill input { position: absolute; opacity: 0; pointer-events: none; }
.jf-pill span { display: inline-block; padding: 8px 13px; border: 1px solid var(--jf-line); border-radius: 999px; font-size: .8rem; transition: background .2s, border-color .2s, color .2s; }
.jf-pill:hover span { border-color: var(--jf-gold); }
.jf-pill.is-on span { border-color: var(--jf-dark); background: var(--jf-dark); color: #fff; }
.jf-pill input:focus-visible + span { outline: 2px solid var(--jf-gold); outline-offset: 2px; }
.jf-filters-foot { display: flex; gap: 10px; padding: 16px 20px; }
@media (max-width: 1023px) { .jf-filters-foot { position: sticky; bottom: 0; margin-top: auto; background: #fff; border-top: 1px solid var(--jf-line); } }
.jf-clear { padding: 0; border: 0; background: none; font-size: .84rem; font-weight: 600; color: var(--jf-brown); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.jf-apply { flex: 1; padding: 13px 16px; border: 0; border-radius: 2px; background: var(--jf-dark); color: #fff; font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
@media (min-width: 1024px) { .jf-apply { display: none; } }

/* Tabs, bar, chips */
.jf-tabs { display: flex; gap: 0; overflow-x: auto; border: 1px solid var(--jf-line); border-radius: 4px; background: #fff; scrollbar-width: none; }
.jf-tabs::-webkit-scrollbar { display: none; }
.jf-tabs button { flex: 1 0 auto; padding: 14px 18px; border: 0; border-right: 1px solid var(--jf-line); background: none; font: inherit; font-size: .86rem; color: var(--jf-dark); white-space: nowrap; cursor: pointer; transition: background .2s, color .2s; }
.jf-tabs button:last-child { border-right: 0; }
.jf-tabs button span { margin-left: 4px; font-size: .76rem; color: var(--jf-muted); }
.jf-tabs button:hover { background: var(--jf-paper); }
.jf-tabs button.is-on { background: var(--jf-cream); font-weight: 600; box-shadow: inset 0 -2px 0 var(--jf-gold); }
.jf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 22px; }
.jf-count { margin-right: auto; font-size: .92rem; color: var(--jf-muted); }
.jf-count b { font-family: 'Playfair Display', Georgia, serif; font-size: 1.3rem; font-weight: 500; color: var(--jf-dark); }
.jf-filter-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--jf-dark); border-radius: 2px; background: #fff; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.jf-filter-btn svg { width: 18px; height: 18px; }
.jf-filter-btn span { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 999px; background: var(--jf-gold); font-size: .72rem; }
@media (min-width: 1024px) { .jf-filter-btn { display: none; } }
.jf-sort { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--jf-muted); }
.jf .jf-sort select { width: auto; min-height: 42px !important; padding: 0 34px 0 12px !important; border: 1px solid var(--jf-line) !important; border-radius: 2px !important; background-color: #fff; font-size: .86rem; color: var(--jf-dark); }
.jf-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.jf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--jf-dark); color: #fff; font: inherit; font-size: .8rem; cursor: pointer; }
.jf-chip i { font-style: normal; color: var(--jf-gold); }
.jf-chip-clear { padding: 0 4px; border: 0; background: none; font-size: .8rem; font-weight: 600; color: var(--jf-brown); text-decoration: underline; cursor: pointer; }
.jf-note { margin: 18px 0 22px; padding: 12px 16px; border-left: 3px solid var(--jf-gold); background: #fff; font-size: .84rem; line-height: 1.6; color: var(--jf-muted); }

/* Grid and the tailor-made card */
.jf-grid { grid-auto-flow: row; }
@media (min-width: 1280px) { .jf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.jf-tailor { position: relative; display: flex; align-items: flex-end; min-height: 100%; overflow: hidden; border-radius: 4px; background: var(--jf-dark); color: #fff; }
.jf-tailor img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.jf-tailor > div { position: relative; padding: 32px 26px; }
.jf-tailor .ui-kicker { color: var(--jf-gold); }
.jf-tailor h2 { margin-top: 12px; font-family: 'Playfair Display', Georgia, serif; font-size: 1.6rem; font-weight: 500; line-height: 1.2; }
.jf-tailor p:not(.ui-kicker) { margin-top: 10px; font-size: .9rem; line-height: 1.6; color: rgba(255, 255, 255, .85); }
.jf-tailor-btn { display: inline-block; margin-top: 20px; padding: 13px 20px; border-radius: 2px; background: var(--jf-gold); color: var(--jf-dark); font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; transition: transform .25s var(--jf-ease); }
.jf-tailor-btn:hover { transform: translateY(-2px); }

/* Empty and load more */
.jf-empty { padding: 48px 24px; border: 1px dashed var(--jf-line); border-radius: 4px; background: #fff; text-align: center; color: var(--jf-muted); }
.jf-empty-title { font-family: 'Playfair Display', Georgia, serif; font-size: 1.5rem; color: var(--jf-dark); }
.jf-empty div { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }
.jf-btn-line, .jf-btn-gold { display: inline-block; padding: 13px 22px; border-radius: 2px; font: inherit; font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.jf-btn-line { border: 1px solid var(--jf-dark); background: transparent; color: var(--jf-dark); }
.jf-btn-line:hover { background: var(--jf-dark); color: #fff; }
.jf-btn-gold { border: 1px solid var(--jf-gold); background: var(--jf-gold); color: var(--jf-dark); }
.jf-more-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 40px; font-size: .84rem; color: var(--jf-muted); }
.jf-progress { width: 200px; height: 3px; border-radius: 3px; background: var(--jf-line); overflow: hidden; }
.jf-progress span { display: block; height: 100%; background: var(--jf-gold); transition: width .4s var(--jf-ease); }
.jf-results { min-width: 0; }
@media (max-width: 520px) { .jf-sort span { display: none; } .jf-bar { gap: 10px; } }

/* Phones: tabs wrap as pills instead of scrolling sideways */
@media (max-width: 767px) {
    .jf-tabs { flex-wrap: wrap; gap: 8px; overflow: visible; border: 0; background: none; }
    .jf-tabs button { flex: 0 0 auto; padding: 9px 14px; border: 1px solid var(--jf-line); border-radius: 999px; background: #fff; font-size: .82rem; }
    .jf-tabs button:last-child { border-right: 1px solid var(--jf-line); }
    .jf-tabs button.is-on { border-color: var(--jf-dark); background: var(--jf-dark); color: #fff; box-shadow: none; }
    .jf-tabs button.is-on span { color: var(--jf-gold); }
}
/* Newly shown cards fade in instead of popping; the load-more area never anchors the scroll */
.jf-grid > .tc { animation: jf-in .45s var(--jf-ease) backwards; }
@keyframes jf-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .jf-grid > .tc { animation: none; } }
.jf-more-wrap { overflow-anchor: none; }

/* Desktop: the filter panel stays in view while the results scroll. Short lists keep it
   within the window; if it is ever taller it scrolls with the wheel, without a scrollbar. */
@media (min-width: 1024px) {
    .jf-filters { position: sticky; top: 92px; max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
    .jf-filters::-webkit-scrollbar { display: none; }
    .jf-filters-head { padding: 14px 20px; }
    .jf-group summary { padding: 13px 20px; }
    .jf-options, .jf-pills { padding-bottom: 14px; }
    .jf-option { padding: 4px 0; }
}
