/* ============================================================
   UpcomingTripsSection.module.css — Clean Editorial Adventure
   ============================================================ */

.section {
  position: relative;
  background: linear-gradient(180deg, #FAFCFA 0%, #F5F8F5 100%);
  padding-top: var(--space-16, 4rem);
  padding-bottom: var(--space-16, 4rem);
  overflow: hidden;
}

/* ── Subtle Pure SVG Topographic Pattern (Top Right) ───────── */

.bgTopoWrap {
  position: absolute;
  top: -10px;
  right: -20px;
  width: 580px;
  height: 400px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bgTopoPattern {
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

/* ── Section Container ─────────────────────────────────────── */

.container {
  position: relative;
  z-index: 1;
}

/* ── Header Row ────────────────────────────────────────────── */

.headerRow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-8, 2rem);
  margin-bottom: var(--space-8, 2rem);
}

.headerLeft {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-3, 0.75rem);
}

.eyebrowText {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ppt-primary, #269436);
}

.eyebrowLine {
  width: 36px;
  height: 1.5px;
  background-color: var(--ppt-primary, #269436);
  opacity: 0.75;
}

.heading {
  font-size: clamp(3.2rem, 4.2vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #17232F;
  margin-bottom: var(--space-3, 0.75rem);
}

.headingAccent {
  color: var(--ppt-primary, #269436);
}

.description {
  font-size: 17px;
  line-height: 1.6;
  color: #667085;
  margin: 0;
}

.headerRight {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-4, 1rem);
  flex-shrink: 0;
}

/* CTA Header: Lihat Semua Trip */
.seeAllBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  border: 1.5px solid var(--ppt-primary, #269436);
  background-color: transparent;
  color: var(--ppt-primary, #269436);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 220ms ease;
  white-space: nowrap;
}

.seeAllBtn:hover {
  background-color: var(--ppt-primary, #269436);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(38, 148, 54, 0.22);
}

.seeAllArrow {
  transition: transform 200ms ease;
}

.seeAllBtn:hover .seeAllArrow {
  transform: translateX(3px);
}

/* Handwritten Script Accent (Top Right) */
.handwrittenAccent {
  position: relative;
  text-align: right;
  margin-top: -4px;
  user-select: none;
}

.handwrittenText {
  font-family: var(--font-family-handwritten, 'Caveat', cursive, sans-serif);
  font-size: 25px;
  font-weight: 700;
  color: #17232F;
  line-height: 1.15;
  display: block;
}

.handwrittenLine {
  width: 105px;
  height: 14px;
  margin-left: auto;
  display: block;
}

/* ── Filter Kategori Bar ───────────────────────────────────── */

.filterRow {
  margin-bottom: var(--space-8, 2rem);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}

.filterRow::-webkit-scrollbar {
  display: none;
}

.filterGroup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.filterPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #E4E7EC;
  background-color: #FFFFFF;
  color: #374151;
  transition: all 200ms ease;
  white-space: nowrap;
}

.filterPill:hover {
  background-color: #FAFCFA;
  color: #17232F;
  border-color: rgba(38, 148, 54, 0.45);
}

.filterPillActive {
  background-color: var(--ppt-primary, #269436) !important;
  color: #FFFFFF !important;
  border-color: var(--ppt-primary, #269436) !important;
  box-shadow: 0 2px 8px rgba(38, 148, 54, 0.2);
}

.filterIcon {
  flex-shrink: 0;
}

/* ── Cards Grid ────────────────────────────────────────────── */

.cardsGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

/* ── Card Component ────────────────────────────────────────── */

.card {
  background-color: #FFFFFF;
  border-radius: 18px;
  border: 1px solid rgba(20, 40, 30, 0.08);
  box-shadow: 0 8px 24px rgba(20, 40, 30, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(20, 40, 30, 0.1);
  border-color: rgba(20, 40, 30, 0.14);
}

.cardImageWrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #E5E7EB;
}

.cardImage {
  object-fit: cover;
  transition: transform 380ms cubic-bezier(0.25, 1, 0.5, 1);
}

.cardImageFallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--ppt-forest, #17232F) 0%, var(--ppt-forest-light, #269436) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cardFallbackText {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
}

.card:hover .cardImage {
  transform: scale(1.03);
}

.cardImageOverlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
}

.openTripBadge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--ppt-primary, #269436);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 11px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 1;
}

.favButton {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 180ms ease, background-color 180ms ease;
  z-index: 1;
}

.favButton:hover {
  transform: scale(1.08);
  background-color: #FFFFFF;
}

.favIcon {
  transition: transform 180ms ease;
}

.locationBadge {
  position: absolute;
  bottom: 10px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  z-index: 1;
}

.pinIcon {
  color: #FFFFFF;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Card Body */
.cardBody {
  padding: 16px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cardTitle {
  font-size: 18.5px;
  font-weight: 700;
  color: #17232F;
  margin: 0 0 12px 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.cardMetaRow {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.cardMetaLeft {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metaItem {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #4B5563;
  font-weight: 500;
}

.metaIcon {
  color: #6B7280;
  flex-shrink: 0;
}

.cardPriceRight {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  flex-shrink: 0;
}

.cardPrice {
  font-size: 18px;
  font-weight: 700;
  color: var(--ppt-primary, #269436);
  line-height: 1.1;
}

.cardPriceUnit {
  font-size: 11px;
  color: #667085;
  font-weight: 500;
}

/* Card Actions */
.cardActions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(20, 40, 30, 0.06);
}

.detailLink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ppt-primary, #269436);
  text-decoration: none;
  transition: color 200ms ease;
}

.detailLink:hover {
  color: #1E7E2E;
}

.detailArrow {
  transition: transform 200ms ease;
}

.detailLink:hover .detailArrow {
  transform: translateX(3px);
}

.registerBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ppt-primary, #269436);
  color: #FFFFFF !important;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 11px;
  text-decoration: none;
  transition: all 200ms ease;
  box-shadow: 0 2px 6px rgba(38, 148, 54, 0.2);
}

.registerBtn:hover {
  background-color: #1E7E2E;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(38, 148, 54, 0.28);
}

/* ── Empty & Error States ──────────────────────────────────── */

.emptyBox,
.errorBox {
  background-color: #FFFFFF;
  border-radius: 18px;
  border: 1px solid #E5E9E6;
  padding: 56px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(20, 40, 30, 0.03);
}

.emptyIconWrap {
  margin-bottom: var(--space-4, 1rem);
  color: var(--ppt-primary, #269436);
  opacity: 0.85;
}

.emptyMountainIcon {
  stroke-width: 1.8;
}

.stateIcon {
  color: #E5890A;
  margin-bottom: var(--space-4, 1rem);
}

.stateTitle {
  font-size: 20px;
  font-weight: 700;
  color: #17232F;
  margin: 0 0 var(--space-2, 0.5rem) 0;
}

.stateDesc {
  font-size: 14.5px;
  color: #667085;
  line-height: 1.6;
  max-width: 400px;
  margin: 0 0 var(--space-6, 1.5rem) 0;
}

.emptyCta,
.retryBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--ppt-primary, #269436);
  color: #FFFFFF !important;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(38, 148, 54, 0.22);
  transition: all 200ms ease;
}

.emptyCta:hover,
.retryBtn:hover {
  background-color: #1E7E2E;
  transform: translateY(-1px);
}

/* ── Responsive Media Queries ──────────────────────────────── */

/* Tablet (768px – 1199px) */
@media (max-width: 1199px) {
  .heading {
    font-size: clamp(2.6rem, 3.8vw, 3.2rem);
  }

  .cardsGrid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Small Tablet / Large Mobile Breakpoint */
@media (max-width: 900px) {
  .handwrittenAccent {
    display: none;
  }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  .section {
    padding-top: var(--space-10, 2.5rem);
    padding-bottom: var(--space-10, 2.5rem);
  }

  .bgTopoWrap {
    display: none;
  }

  .headerRow {
    flex-direction: column;
    gap: var(--space-5, 1.25rem);
  }

  .heading {
    font-size: clamp(2.1rem, 6.5vw, 2.4rem);
    line-height: 1.15;
  }

  .description {
    font-size: 15.5px;
  }

  .headerRight {
    width: 100%;
    align-items: stretch;
  }

  .seeAllBtn {
    width: 100%;
    justify-content: center;
  }

  .handwrittenAccent {
    display: none;
  }

  /* Cards Grid: Mobile horizontal scroll-snap */
  .cardsGrid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .cardsGrid::-webkit-scrollbar {
    display: none;
  }

  .card {
    flex: 0 0 85vw;
    min-width: 85vw;
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}
