/* Category hub pages (short safaris & multi-day expeditions) */

.category-hub-intro {
  background: var(--cream);
  padding: clamp(56px, 8vw, 96px) 0;
}

.category-hub-intro-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.category-hub-intro-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.category-hub-intro-text p {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--body-text);
  margin: 0 0 1rem;
}

.category-hub-intro-text p:last-child {
  margin-bottom: 0;
}

.category-hub-intro-gallery {
  width: 100%;
  min-width: 0;
}

.category-hub-intro-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  min-height: clamp(340px, 46vw, 520px);
  width: 100%;
}

.category-hub-intro-gallery .gallery-img {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
  min-height: 0;
  height: 100%;
  will-change: transform, opacity;
}

.chig-main {
  grid-row: 1 / 3;
}

.category-hub-intro-gallery .gallery-img img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transform-origin: center center;
  /* GSAP owns transform during scroll scrub — no CSS transition */
  transition: filter 0.45s ease;
  backface-visibility: hidden;
}

.category-hub-intro-gallery .gallery-img:hover img {
  filter: brightness(1.06);
}

.category-hub-trips {
  background: #fff;
  padding: clamp(56px, 7vw, 88px) 0;
}

.category-hub-trips-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 80px);
}

.category-hub-trips-inner .tour-label {
  display: block;
  margin-bottom: 0.5rem;
}

.category-hub-trips-inner h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 0.75rem;
}

.category-hub-trips-lead {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: #5a4030;
  max-width: 640px;
  margin: 0 0 2.5rem;
  line-height: 1.65;
}

/* Trips carousel */
.hub-trips-carousel {
  position: relative;
  padding: 0 clamp(44px, 5vw, 56px);
}

.hub-trips-carousel-viewport {
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.25rem 0 1rem;
}

.hub-trips-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.hub-trips-carousel-track {
  display: flex;
  align-items: stretch;
  gap: clamp(1rem, 2vw, 1.5rem);
  width: max-content;
  min-height: 1px;
}

.hub-trips-carousel-track .tc-card {
  flex: 0 0 min(360px, calc(100vw - 120px));
  scroll-snap-align: start;
  max-width: 360px;
}

.hub-trips-carousel-btn {
  position: absolute;
  top: 42%;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(59, 40, 29, 0.18);
  background: #fff;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.hub-trips-carousel-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-trips-carousel-btn:hover {
  background: var(--cream);
  border-color: var(--accent);
  transform: scale(1.04);
}

.hub-trips-carousel-prev {
  left: 0;
}

.hub-trips-carousel-next {
  right: 0;
}

/* Infinite scrolling gallery */
@keyframes hub-gallery-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.category-hub-gallery {
  background: var(--bg-card);
  padding: clamp(56px, 7vw, 88px) 0;
  overflow: hidden;
}

.category-hub-gallery-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 80px);
}

.category-hub-gallery-inner h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 0.75rem;
}

.category-hub-gallery-lead {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: #5a4030;
  max-width: 560px;
  margin: 0 0 2rem;
  line-height: 1.65;
}

.hub-gallery-marquee {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 calc(-1 * clamp(20px, 4vw, 80px));
}

.hub-gallery-marquee-row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.hub-gallery-marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: hub-gallery-scroll 55s linear infinite;
  will-change: transform;
}

.hub-gallery-marquee-track--slow {
  animation-duration: 68s;
}

.hub-gallery-marquee-row--reverse .hub-gallery-marquee-track {
  animation-direction: reverse;
}

.hub-gallery-marquee:hover .hub-gallery-marquee-track {
  animation-play-state: paused;
}

.hub-gallery-marquee-figure {
  flex: 0 0 auto;
  width: clamp(280px, 38vw, 420px);
  height: clamp(200px, 28vw, 280px);
  border-radius: 12px;
  overflow: hidden;
  margin: 0;
  box-shadow: none;
}

.hub-gallery-marquee-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-hub-gallery-more {
  text-align: center;
  margin: 2rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.category-hub-gallery-more a {
  color: var(--heading-color);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.category-hub-gallery-more a:hover {
  color: var(--accent);
}

/* Reviews block on hub pages */
.category-hub-reviews-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  margin-bottom: 2.5rem;
}

.category-hub-reviews-head h2 {
  margin-bottom: 0.5rem;
}

.category-hub-reviews-lead {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  color: #5a4030;
  margin: 0;
  max-width: 480px;
  line-height: 1.6;
}

.category-hub-reviews-stats {
  display: flex;
  align-items: center;
  gap: 20px 28px;
  flex-wrap: wrap;
  padding: 20px 28px;
  background: #1a1410;
  border: none;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.category-hub-reviews-ta {
  height: 48px;
  width: auto;
  object-fit: contain;
  opacity: 0.95;
  filter: brightness(0) invert(1);
}

.category-hub-reviews-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-hub-reviews-stats .category-hub-reviews-stat-num {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.category-hub-reviews-stats .category-hub-reviews-stat-stars {
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.category-hub-reviews-stats .category-hub-reviews-stat-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.55);
}

.category-hub-reviews-stat-divider {
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.18);
}

.category-hub-reviews-grid.reviews-grid {
  grid-template-columns: repeat(3, 1fr);
}

.category-hub-reviews-grid .review-card,
.category-hub-reviews-grid .review-card--featured {
  grid-column: span 1;
  background: #1a1410;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.category-hub-reviews-grid .review-card:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.category-hub-reviews-grid .review-name {
  color: #fff;
}

.category-hub-reviews-grid .review-platform {
  color: rgba(255, 255, 255, 0.52);
}

.category-hub-reviews-grid .review-text {
  color: rgba(255, 255, 255, 0.9);
}

.category-hub-reviews-grid .review-stars {
  color: var(--accent);
}

.category-hub-reviews-grid .review-tour-tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

.category-hub-reviews-cta {
  margin-top: 2.5rem;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .hub-gallery-marquee-track {
    animation: none;
  }
}

.category-hub-map-section {
  background: var(--bg-card);
  padding: clamp(56px, 7vw, 88px) 0;
}

.category-hub-map-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
}

.category-hub-map-inner h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 0.5rem;
}

.category-hub-map-lead {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  color: #5a4030;
  margin: 0 0 1.75rem;
  max-width: 560px;
  line-height: 1.65;
}

.category-hub-cta {
  background: var(--cream);
  padding: clamp(48px, 6vw, 72px) 0;
}

.category-hub-cta-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
  text-align: center;
}

.category-hub-cta-inner h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--heading-color);
  margin: 0 0 0.75rem;
}

.category-hub-cta-inner p {
  font-family: var(--font-sans);
  color: #5a4030;
  margin: 0 0 1.5rem;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .category-hub-intro-inner {
    grid-template-columns: 1fr;
  }

  .category-hub-intro-gallery {
    order: -1;
  }

  .category-hub-intro-inner {
    grid-template-columns: 1fr;
  }

  .category-hub-intro-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    min-height: 0;
  }

  .chig-main {
    grid-row: auto;
    grid-column: 1 / -1;
    min-height: clamp(220px, 55vw, 320px);
  }

  .category-hub-intro-gallery .gallery-img:not(.chig-main) {
    min-height: clamp(140px, 38vw, 200px);
  }

  .hub-trips-carousel {
    padding: 0 40px;
  }

  .category-hub-reviews-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .category-hub-reviews-grid.reviews-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hub-trips-carousel-btn {
    width: 38px;
    height: 38px;
  }
}

/* Editorial category hub pages (short safaris & multi-day expeditions) */
body.category-hub--editorial {
  --tour-charcoal-title: #23201c;
}

body.category-hub--editorial .tour-hero.tour-hero--centered {
  height: 94vh;
  min-height: 680px;
}

body.category-hub--editorial .tour-hero--centered .tour-hero-subtitle {
  max-width: min(46rem, 94vw);
  text-wrap: balance;
}

@media (max-width: 768px) {
  body.category-hub--editorial .tour-hero.tour-hero--centered {
    min-height: 105svh;
  }
}

body.category-hub--editorial main h2,
body.category-hub--editorial .tc-card-title,
body.category-hub--editorial .reviews-highlights-inner h2 {
  color: var(--tour-charcoal-title);
}

body.category-hub--editorial .category-hub-trips,
body.category-hub--editorial .category-hub-map-section {
  background: var(--cream);
}

body.category-hub--editorial .category-hub-gallery {
  background: #282838;
}

body.category-hub--editorial .category-hub-trips-head.tour-section-block,
body.category-hub--editorial .category-hub-map-head.tour-section-block {
  max-width: min(75rem, calc(100vw - 2 * clamp(28px, 5.5vw, 80px)));
  margin-inline: auto;
  padding-left: clamp(20px, 4vw, 56px);
  padding-right: clamp(20px, 4vw, 56px);
}

body.category-hub--editorial .category-hub-trips--in-overview {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  margin: 0;
  background: transparent;
}

body.category-hub--editorial .category-hub-trips-head {
  padding-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

body.category-hub--editorial .category-hub-trips-head h2 {
  margin-bottom: 0;
}

body.category-hub--editorial .hub-trips-carousel--fullwidth {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 clamp(52px, 6vw, 80px);
  box-sizing: border-box;
}

body.category-hub--editorial .hub-trips-carousel--fullwidth .hub-trips-carousel-viewport {
  padding-left: clamp(20px, 4vw, 56px);
  padding-right: clamp(20px, 4vw, 56px);
  margin: 0 calc(-1 * clamp(20px, 4vw, 56px));
  scroll-padding-inline: clamp(20px, 4vw, 56px);
}

body.category-hub--editorial .hub-trips-carousel--fullwidth .hub-trips-carousel-track .tc-card {
  flex: 0 0 min(380px, calc(100vw - 7rem));
  max-width: 400px;
}

body.category-hub--editorial .hub-trips-carousel--fullwidth .hub-trips-carousel-prev {
  left: clamp(12px, 2vw, 24px);
}

body.category-hub--editorial .hub-trips-carousel--fullwidth .hub-trips-carousel-next {
  right: clamp(12px, 2vw, 24px);
}

body.category-hub--editorial .tour-overview--editorial {
  padding-bottom: 0;
}

body.category-hub--editorial .category-hub-map-section--full {
  padding: clamp(1rem, 2.5vw, 1.75rem) 0 0;
}

body.category-hub--editorial .category-hub-map-head.tour-section-block {
  padding-top: 0;
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 0;
}

body.category-hub--editorial .category-hub-intro-banner {
  margin-top: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0;
}

body.category-hub--editorial .category-hub-intro-banner.tour-story-media--parallax {
  height: clamp(460px, min(72vh, 70vw), 860px);
  margin-bottom: 0;
}

body.category-hub--editorial .category-hub-trips--in-overview + .category-hub-intro-banner {
  margin-top: clamp(2rem, 4vw, 3rem);
}

body.category-hub--editorial .category-hub-map-embed--fullwidth.tour-highlights-map-embed {
  --tour-safari-map-height: clamp(620px, min(82vh, 72vw), 980px);
  width: 100vw;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  min-height: var(--tour-safari-map-height);
  display: flex;
  flex-direction: column;
}

body.category-hub--editorial .category-hub-map-embed--fullwidth .tour-highlights-map.fleet-journey-map {
  flex: 1;
  width: 100%;
  height: var(--tour-safari-map-height);
  min-height: var(--tour-safari-map-height);
  border-radius: 0;
  border: none;
}

body.category-hub--editorial .category-hub-map-embed--fullwidth .fleet-map-panel {
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.category-hub--editorial .category-hub-map-note {
  padding: 0.65rem clamp(20px, 4vw, 56px);
  margin: 0;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem;
  text-align: right;
}

body.category-hub--editorial .category-hub-map-lead,
body.category-hub--editorial .category-hub-reviews-lead--editorial,
body.category-hub--editorial .category-hub-cta-inner p {
  color: var(--body-text);
  font-weight: 500;
}

body.category-hub--editorial .reviews-highlights-inner .tour-label {
  display: block;
  margin-bottom: 0.5rem;
}

body.category-hub--editorial .reviews-highlights-inner h2 {
  margin-bottom: 0.75rem;
}

body.category-hub--editorial .category-hub-reviews-lead--editorial {
  margin: 0 0 2.5rem;
  max-width: 36rem;
  line-height: 1.65;
}

body.category-hub--editorial .category-hub-gallery-more a {
  color: #fff;
}

body.category-hub--editorial .category-hub-gallery-more a:hover {
  color: var(--accent);
}

body.category-hub--editorial .hub-trips-carousel-btn {
  border-color: rgba(35, 32, 28, 0.12);
  color: var(--tour-charcoal-title);
}

body.category-hub--editorial .hub-trips-carousel-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Category hub map — larger, easier-to-spot pins */
body.category-hub--editorial .fleet-map-marker--hub {
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  box-shadow:
    0 0 0 4px rgba(196, 147, 60, 0.45),
    0 3px 14px rgba(35, 32, 28, 0.45);
}

body.category-hub--editorial .fleet-map-marker--hub:hover,
body.category-hub--editorial .fleet-map-marker--hub:focus-visible {
  transform: scale(1.12);
  box-shadow:
    0 0 0 6px rgba(196, 147, 60, 0.5),
    0 4px 18px rgba(35, 32, 28, 0.5);
}

/* Category hub map — compact tour card popups */
.maplibregl-popup.fleet-map-popup--tour-card .maplibregl-popup-content {
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(35, 32, 28, 0.1);
  box-shadow: 0 16px 40px rgba(35, 32, 28, 0.14);
}

.maplibregl-popup.fleet-map-popup--tour-card .maplibregl-popup-close-button {
  z-index: 2;
  font-size: 1.25rem;
  padding: 6px 10px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.fleet-map-popup--tour-card .tc-card--map-popup {
  border-radius: 0;
  transform: none;
}

.fleet-map-popup--tour-card .tc-card--map-popup:hover {
  transform: none;
}

.fleet-map-popup--tour-card .tc-card-media {
  height: 132px;
}

.fleet-map-popup--tour-card .tc-card-body {
  padding: 0.75rem 0.95rem 0.95rem;
}

.fleet-map-popup--tour-card .tc-card-title {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.fleet-map-popup--tour-card .tc-card-title a {
  color: inherit;
  text-decoration: none;
}

.fleet-map-popup--tour-card .tc-card-title a:hover {
  color: var(--accent);
}

.fleet-map-popup--tour-card .tc-card-summary {
  font-size: 0.78rem;
  line-height: 1.45;
  margin-bottom: 0.65rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.fleet-map-popup--tour-card .tc-card-meta--compact {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  gap: 0.5rem;
}

.fleet-map-popup--tour-card .tc-card-meta--compact .tc-meta-item {
  font-size: 0.72rem;
}
