/* ==========================================================================
   Rioba Safaris — multi-page components (listings, detail pages, about)
   ========================================================================== */
.header-actions { display: flex; align-items: center; gap: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.text-btn:hover { color: var(--accent-dark); }

/* ---------- Breadcrumbs + inner hero ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.crumbs a { text-decoration: none; transition: color .25s; }
.crumbs a:hover, .crumbs [aria-current] { color: #fff; }
.page-hero h1 { max-width: 900px; }
.page-hero > img { animation: heroZoom 10s var(--ease) forwards; }
@keyframes heroZoom { from { transform: scale(1.1); } to { transform: scale(1); } }
.page-hero .container > * { animation: riseIn 1s var(--ease) both; }
.page-hero .container > :nth-child(2) { animation-delay: .1s; }
.page-hero .container > :nth-child(3) { animation-delay: .2s; }
.page-hero .container > :nth-child(4) { animation-delay: .3s; }
.page-hero .container > :nth-child(5) { animation-delay: .4s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.page-hero.tall { height: 78vh; height: 78svh; min-height: 520px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 14px 40px; list-style: none; margin: 18px 0 0; padding: 22px 0 0; border-top: 1px solid rgba(255,255,255,.25); }
.hero-facts li { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.hero-facts strong { display: block; font-family: var(--serif); font-size: 1.7rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: #fff; }

/* ---------- Homepage: four country cards ---------- */
.dest-grid.four { grid-template-columns: repeat(4, 1fr); }
.dest-grid.four .dest-card:nth-child(2), .dest-grid.four .dest-card:nth-child(4) { margin-top: clamp(0px, 5vw, 64px); }
.dest-grid.four .dest-card h3 { font-size: 1.7rem; }

/* ---------- Trip cards as links ---------- */
.trip-card .frame { display: block; }
.trip-card h3 a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .4s var(--ease); }
.trip-card:hover h3 a { background-size: 100% 1px; }

/* ---------- Listing toolbar ---------- */
.toolbar { display: grid; gap: 14px; margin-bottom: 44px; padding-bottom: 28px; border-bottom: 1px solid rgba(29,42,34,.12); }
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar-row.selects { gap: 18px; }
.toolbar-label { min-width: 64px; font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.chip span { margin-left: 4px; opacity: .55; }
.select { display: flex; align-items: center; gap: 10px; }
.select .toolbar-label { min-width: 0; }
.select select {
  appearance: none; -webkit-appearance: none;
  padding: .7em 2.4em .7em 1.1em; border-radius: 999px;
  border: 1px solid rgba(29,42,34,.25); color: var(--ink); font: inherit; font-size: .9rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2210%22 height=%226%22%3E%3Cpath d=%22M1 1l4 4 4-4%22 fill=%22none%22 stroke=%22%231d2a22%22 stroke-width=%221.4%22/%3E%3C/svg%3E") no-repeat right 1em center;
  cursor: pointer; transition: border-color .3s;
}
.select select:hover, .select select:focus { border-color: var(--ink); outline: none; }
.result-count { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.listing .trip-grid { min-height: 300px; }
.sticky-tabs { position: sticky; top: 0; z-index: 20; background: var(--ivory); padding-top: 18px; transition: top .45s var(--ease); }
.site-header.is-solid:not(.is-hidden) ~ main .sticky-tabs { top: var(--header-h); }

/* ---------- Destinations listing ---------- */
.country-group { margin-bottom: clamp(60px, 8vw, 110px); scroll-margin-top: 160px; }
.country-group[hidden] { display: none; }
.country-group h2 { font-size: clamp(2.4rem, 4.6vw, 4rem); }
.dest-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 2vw, 28px); }
.dest-tile { display: block; text-decoration: none; color: inherit; }
.dest-tile .frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); margin-bottom: 16px; background: var(--sand); }
.dest-tile .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.dest-tile:hover .frame img { transform: scale(1.07); }
.dest-tile .tag { position: absolute; left: 14px; top: 14px; padding: 5px 10px; background: rgba(247,243,234,.92); border-radius: 2px; font-size: .66rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.dest-tile h3 { display: flex; justify-content: space-between; gap: 10px; font-size: 1.45rem; margin-bottom: .3em; }
.dest-tile h3 .arrow { font-family: var(--sans); font-size: 1rem; transition: transform .4s var(--ease); }
.dest-tile:hover h3 .arrow { transform: translateX(5px); }
.dest-tile p { font-size: .9rem; color: var(--ink-soft); margin: 0; }
.more-dest { background: var(--sand); overflow: hidden; }
.more-dest .rail { grid-auto-columns: clamp(230px, 22vw, 290px); }
.more-dest .dest-tile .frame { aspect-ratio: 1; }

/* ---------- Destination detail ---------- */
.dest-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 90px); align-items: start; }
.dest-copy p:first-child { font-family: var(--serif); font-size: clamp(1.4rem, 2vw, 1.75rem); line-height: 1.35; color: var(--ink); }
.dest-copy p { color: var(--ink-soft); }
.dest-side { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
.best-time { padding: 28px; background: var(--sand); border-radius: var(--radius); }
.best-time p { margin: 0; color: var(--ink-soft); }
.plan-mini { padding: 28px; background: var(--ink); color: var(--ivory); border-radius: var(--radius); }
.plan-mini p { color: rgba(247,243,234,.8); }
.dest-gallery { margin-top: clamp(56px, 7vw, 96px); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery-grid .gal-item:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gal-item { position: relative; display: block; padding: 0; border: 0; background: var(--sand); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gal-item:hover img { transform: scale(1.06); }

/* ---------- Trip detail ---------- */
.subnav { position: sticky; top: 0; z-index: 50; background: rgba(247,243,234,.97); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid rgba(29,42,34,.1); transition: top .45s var(--ease); }
.site-header.is-solid:not(.is-hidden) ~ main .subnav { top: var(--header-h); }
.subnav .container { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); height: 62px; overflow-x: auto; scrollbar-width: none; }
.subnav a:not(.btn) { position: relative; flex-shrink: 0; padding: 6px 0; font-size: .78rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--muted); transition: color .3s; }
.subnav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .4s var(--ease); }
.subnav a.is-active, .subnav a:not(.btn):hover { color: var(--ink); }
.subnav a.is-active::after { transform: scaleX(1); }
.subnav-cta { margin-left: auto; flex-shrink: 0; padding: .7em 1.4em; }
.trip-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 5vw, 80px); align-items: start; padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(48px, 6vw, 88px); }
.trip-block { scroll-margin-top: 160px; margin-bottom: clamp(48px, 6vw, 80px); }
.trip-block > p { color: var(--ink-soft); }
#overview > p:first-of-type { font-family: var(--serif); font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.4; color: var(--ink); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.style-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 26px 0 0; }
.style-tags li { padding: 6px 14px; border: 1px solid rgba(29,42,34,.2); border-radius: 999px; font-size: .78rem; letter-spacing: .06em; }
.mini-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 30px; }

.days { position: relative; border-left: 1px solid rgba(29,42,34,.18); margin-left: 8px; }
.day { position: relative; padding-left: 32px; }
.day::before { content: ""; position: absolute; left: -6px; top: 28px; width: 11px; height: 11px; border-radius: 50%; background: var(--ivory); border: 2px solid var(--accent); transition: background-color .3s; }
.day[open]::before { background: var(--accent); }
.day summary { display: grid; grid-template-columns: 90px 1fr 24px; align-items: center; gap: 16px; padding: 20px 0; cursor: pointer; list-style: none; border-bottom: 1px solid rgba(29,42,34,.1); }
.day summary::-webkit-details-marker { display: none; }
.day-num { font-size: .75rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.day-title { font-family: var(--serif); font-size: 1.4rem; line-height: 1.25; transition: color .3s; }
.day-place { display: block; font-family: var(--sans); font-size: .8rem; letter-spacing: .08em; color: var(--muted); margin-top: 2px; }
.day-toggle { position: relative; width: 16px; height: 16px; }
.day-toggle::before, .day-toggle::after { content: ""; position: absolute; left: 0; top: 50%; width: 16px; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease); }
.day-toggle::after { transform: rotate(90deg); }
.day[open] .day-toggle::after { transform: rotate(0); }
.day summary:hover .day-title { color: var(--accent); }
.day-body { padding: 18px 0 26px 106px; animation: riseIn .5s var(--ease); }
.day-body p { color: var(--ink-soft); }
.day-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px dashed rgba(29,42,34,.18); font-size: .95rem; }
.day-meta span { display: block; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.note { padding: 24px; background: var(--sand); border-radius: var(--radius); }

.incl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.incl-grid h3 { font-size: 1.3rem; margin-bottom: 14px; }
.incl { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.incl li { position: relative; padding-left: 28px; font-size: .97rem; color: var(--ink-soft); }
.incl li::before { position: absolute; left: 0; top: 1px; font-weight: 500; }
.incl.yes li::before { content: "\2713"; color: #3f7d4e; }
.incl.no li::before { content: "\2715"; color: #b3261e; }

.trip-aside { position: sticky; top: calc(var(--header-h) + 86px); display: grid; gap: 20px; }
.price-card { padding: 30px; background: #fff; border-radius: var(--radius); box-shadow: 0 30px 60px -40px rgba(29,42,34,.45); border: 1px solid rgba(29,42,34,.08); }
.price-card small { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.price-big { font-family: var(--serif); font-size: 2.6rem; font-weight: 600; line-height: 1.1; margin-bottom: 18px; }
.price-big span { font-family: var(--sans); font-size: .9rem; font-weight: 300; color: var(--muted); }
.facts { list-style: none; margin: 0 0 22px; padding: 0; }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(29,42,34,.08); font-size: .93rem; text-align: right; }
.facts span { color: var(--muted); text-align: left; }
.price-card .btn { width: 100%; margin-bottom: 10px; }
.small-note { margin: 8px 0 0; font-size: .82rem; color: var(--muted); }
.aside-links { padding: 24px 28px; background: var(--sand); border-radius: var(--radius); }
.aside-links h3 { font-size: 1.2rem; }
.aside-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.aside-links a { text-decoration: none; }
.aside-links a:hover { color: var(--accent); }
.related { background: #fff; }

/* ---------- Tailor-made band ---------- */
.cta-band { position: relative; padding: clamp(80px, 11vw, 150px) 0; color: #fff; text-align: center; overflow: hidden; }
.cta-band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-band::after { content: ""; position: absolute; inset: 0; background: rgba(15,22,17,.62); }
.cta-band .container { position: relative; z-index: 1; max-width: 760px; }
.cta-band .eyebrow::after { content: ""; width: 32px; height: 1px; background: currentColor; }
.cta-band p { color: rgba(255,255,255,.85); font-size: 1.1rem; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }

/* ---------- About page ---------- */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.process li { padding-top: 22px; border-top: 1px solid rgba(29,42,34,.2); }
.process li span { font-family: var(--serif); font-style: italic; font-size: 2.4rem; color: var(--accent); }
.process h3 { margin: 6px 0 10px; }
.process p { color: var(--ink-soft); font-size: .97rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: start; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.contact-list li { display: grid; gap: 2px; padding-bottom: 18px; border-bottom: 1px solid rgba(29,42,34,.12); font-size: 1.1rem; }
.contact-list span { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--accent); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 60px 70px; background: rgba(10,14,11,.94); animation: fadeIn .3s var(--ease); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-close, .lightbox-nav { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.3); color: #fff; font-size: 1.3rem; transition: background-color .3s; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.15); }
.lightbox-close { top: 18px; right: 18px; font-size: 1.6rem; }
.lightbox-nav.prev { left: 14px; }
.lightbox-nav.next { right: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .dest-tiles { grid-template-columns: repeat(3, 1fr); }
  .dest-grid.four { grid-template-columns: repeat(2, 1fr); }
  .dest-grid.four .dest-card:nth-child(4) { margin-top: 0; }
  .trip-layout { grid-template-columns: 1fr; }
  .trip-aside { position: static; grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .dest-tiles { grid-template-columns: repeat(2, 1fr); }
  .dest-layout, .contact-grid { grid-template-columns: 1fr; }
  .dest-side { position: static; }
  .trip-aside { grid-template-columns: 1fr; }
  .gallery-grid .gal-item:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 3; }
  .day summary { grid-template-columns: 1fr 20px; gap: 6px 12px; }
  .day-num { grid-column: 1 / -1; }
  .day-body { padding-left: 0; }
  .toolbar-row.selects { flex-direction: column; align-items: stretch; }
  .select { justify-content: space-between; }
  .select select { flex: 1; max-width: 70%; }
}
@media (max-width: 640px) {
  .dest-grid.four { grid-template-columns: 1fr; }
  .dest-grid.four .dest-card:nth-child(2) { margin-top: 0; }
  .dest-tiles { gap: 14px; }
  .dest-tile h3 { font-size: 1.15rem; }
  .dest-tile p { display: none; }
  .incl-grid, .process { grid-template-columns: 1fr; }
  .mini-gallery { grid-template-columns: repeat(2, 1fr); }
  .hero-facts { gap: 12px 26px; }
  .hero-facts strong { font-size: 1.35rem; }
  .toolbar-label { min-width: 100%; }
  .subnav-cta { padding: .6em 1em; }
  .lightbox { padding: 60px 10px; }
  .lightbox-nav { top: auto; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .page-hero > img, .page-hero .container > *, .day-body { animation: none; }
}
