/* ===========================================================================
   Shared trip card — ONE component used on BOTH the public marketing
   landing (Poppins, /styles.css) and the customer shop storefront
   (book. subdomain; Cormorant + Outfit). Geometry is identical on both
   surfaces; only the two font variables below change per surface so the
   public site stays Poppins and the customer site stays Cormorant/Outfit
   (no font mixing — honours the design-system rule).

   Surface override example (shop.css):
     .shop-body .trip-card { --trip-title-font: var(--font-display);
                             --trip-ui-font: var(--font-ui); }

   The geometry mirrors the legacy country .destination-card tile so
   curated packages and destination tiles read as one family.
   =========================================================================== */
.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.trip-card {
  /* per-surface fonts (defaults = public Poppins) */
  --trip-title-font: 'Poppins', sans-serif;
  --trip-ui-font: 'Poppins', sans-serif;

  position: relative;
  display: block;
  height: 445px;
  border-radius: 26px;
  overflow: hidden;
  text-decoration: none;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  /* fallback so a card with no cover image is not blank */
  background: linear-gradient(160deg, #2c5d8f 0%, #5f8fb5 45%, #cfe0ec 100%);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px rgba(15, 23, 42, 0.12);
}

.trip-card__cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trip-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 6px 12px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-family: var(--trip-ui-font);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: -0.24px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.trip-card__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 26px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  color: #f9f9f9;
  /* Frosted translucent fade — a faint blur/brightness/saturate over the
     photo behind the text, plus a hairline white inset highlight. Mirrors
     the legacy .destination-overlay so the cards keep their soft glass feel. */
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(1px) brightness(0.95) saturate(105%);
  -webkit-backdrop-filter: blur(2px) brightness(0.95) saturate(105%);
  box-shadow: inset 0 0.5px 0.5px rgba(255, 255, 255, 0.12);
}

.trip-card__overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.42) 0%,
      rgba(0, 0, 0, 0.31) 22%,
      rgba(0, 0, 0, 0.19) 72%,
      rgba(0, 0, 0, 0.10) 100%);
}

.trip-card__flag {
  line-height: 0;
  margin-bottom: 2px;
}

.trip-card__flag img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  display: block;
}

.trip-card__title {
  margin: 0;
  font-family: var(--trip-title-font);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.56px;
}

.trip-card__sub {
  margin: 0;
  font-family: var(--trip-ui-font);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.28px;
  text-transform: uppercase;
}

.trip-card__price {
  margin: 6px 0 0;
  font-family: var(--trip-ui-font);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.2px;
  color: #fff;
}

.trip-card__price-cap {
  display: block;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.2px;
  opacity: 0.85;
}

@media (max-width: 767px) {
  .trip-card {
    height: auto;
    aspect-ratio: 5 / 8;
    border-radius: 18px;
    min-width: 0;
  }
  .trip-card__overlay { padding: 18px 12px 12px; gap: 4px; }
  .trip-card__title { font-size: 16px; letter-spacing: -0.3px; }
  .trip-card__sub { font-size: 10px; letter-spacing: -0.2px; }
  .trip-card__flag img { width: 30px; height: 30px; border-width: 1.5px; }
  .trip-card__price { font-size: 14px; }
}

@media (max-width: 480px) {
  .trip-card { border-radius: 16px; }
  .trip-card__overlay { padding: 16px 10px 10px; }
  .trip-card__title { font-size: 15px; line-height: 1.08; }
  .trip-card__sub { font-size: 9px; }
  .trip-card__flag img { width: 26px; height: 26px; }
}
