/* The tour package card (_PackageCard.cshtml). Everything inside is sized in em off the card's own
   width, so it keeps the same proportions in a four-across grid and a two-across list alike.
   Text stays at 400 and 600: the site uses the system font, and Segoe UI has nothing between Bold and
   Black, so 800 comes out as Black. */
.pkg-card {
  --pkg-red: #c8261f;
  --pkg-gold: #f5c04a;
  --pkg-ink: #0b1f3a;
  position: relative;
  height: 100%;
  border-radius: 1.7rem;
  container-type: inline-size;
}

/* The coloured sheet tucked behind each card. */
.pkg-card::before {
  content: "";
  position: absolute;
  inset: 0.5rem 0.2rem;
  border-radius: 1.6rem;
  background: linear-gradient(180deg, #b9c6fa, #dbe2fd);
  transform: rotate(3.6deg);
}

.pkg-tint-1::before {
  background: linear-gradient(180deg, #fab6ab, #fdddd7);
  transform: rotate(-3.6deg);
}

.pkg-face {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.55em 0.55em 1em;
  font-size: clamp(13px, 3.4cqi, 16px);
  background: #fff;
  border: 1px solid #eceef4;
  border-radius: 1.7em;
  box-shadow: 0 1.2em 2.4em -1.2em rgba(11, 31, 58, 0.28), 0 0.2em 0.5em rgba(11, 31, 58, 0.05);
  transition: box-shadow 0.3s ease;
}

.pkg-card:hover .pkg-face {
  box-shadow: 0 2em 3.4em -1.3em rgba(11, 31, 58, 0.42), 0 0.3em 0.7em rgba(11, 31, 58, 0.07);
}

/* ---------- Photo ---------- */
.pkg-media {
  position: relative;
}

.pkg-photo {
  display: block;
  aspect-ratio: 1.47;
  overflow: hidden;
  border-radius: 1.35em;
}

.pkg-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.pkg-card:hover .pkg-photo img {
  transform: scale(1.05);
}

.pkg-flags {
  position: absolute;
  top: 1em;
  left: 1.1em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5em;
}

.pkg-off,
.pkg-best,
.pkg-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.38em 0.8em;
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 0.15em 0.4em rgba(11, 31, 58, 0.16);
}

.pkg-off {
  background: var(--pkg-red);
  color: #fff;
}

.pkg-best {
  background: var(--pkg-gold);
  color: var(--pkg-ink);
}

.pkg-time {
  position: absolute;
  top: 1em;
  right: 1.1em;
  background: #fff;
  color: var(--pkg-ink);
}

.pkg-best .icon,
.pkg-time .icon {
  width: 1.1em;
  height: 1.1em;
}

/* ---------- Price ticket ---------- */
.pkg-ticket {
  position: absolute;
  right: -0.15em;
  bottom: -1.55em;
  padding: 0.35em;
  background: #fff;
  border-radius: 1em;
  box-shadow: 0 0.45em 1em rgba(11, 31, 58, 0.18);
  transform: rotate(-4deg);
}

.pkg-ticket-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5em 1.1em 0.55em;
  border: 1px dashed var(--pkg-red);
  border-radius: 0.75em;
  line-height: 1.15;
  text-align: center;
}

.pkg-ticket-from {
  color: var(--pkg-red);
  font-size: 0.76em;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pkg-ticket-inner strong {
  color: var(--pkg-ink);
  font-size: 1.5em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pkg-ticket-inner strong.pkg-ticket-ask {
  font-size: 1.1em;
}

.pkg-ticket-unit {
  margin-top: 0.2em;
  color: #6b7789;
  font-size: 0.8em;
}

/* ---------- Body ---------- */
.pkg-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 2.05em 0.55em 0;
}

.pkg-tag {
  overflow: hidden;
  color: var(--pkg-red);
  font-size: 0.78em;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pkg-title {
  display: -webkit-box;
  margin: 0.15em 0 0.42em;
  overflow: hidden;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 1.65em;
  font-weight: 600;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pkg-title a {
  color: var(--pkg-ink);
  text-decoration: none;
}

.pkg-title a:hover {
  color: var(--pkg-red);
}

.pkg-includes {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  /* Takes up the slack from a one-line title, so the panels line up across a row. */
  margin-top: auto;
  padding: 0.85em 0.1em 0.75em;
  background: #f4f6fc;
  border: 1px solid #e6eaf5;
  border-radius: 1.1em;
}

.pkg-include {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
  min-width: 0;
  padding: 0 0.1em;
  color: #4a5468;
  font-size: 0.8em;
  line-height: 1.15;
  text-align: center;
}

.pkg-include + .pkg-include {
  border-left: 1px solid #dfe4f1;
}

.pkg-include .icon {
  width: 1.65em;
  height: 1.65em;
  color: #2c4a86;
  stroke-width: 1.5;
}

/* ---------- Actions ---------- */
.pkg-actions {
  display: flex;
  align-items: center;
  gap: 0.85em;
  margin-top: 0.95em;
}

.pkg-title + .pkg-actions {
  margin-top: auto;
}

.pkg-cta {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-width: 0;
  min-height: 3.2em;
  padding: 0 1em;
  background: linear-gradient(100deg, #d4332a, #b81d17);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 0.5em 1em -0.5em rgba(184, 29, 23, 0.55);
  color: #fff;
  font-size: 0.98em;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.pkg-cta:hover,
.pkg-cta:focus-visible {
  color: #fff;
  filter: brightness(1.06);
  box-shadow: 0 0.7em 1.2em -0.5em rgba(184, 29, 23, 0.65);
}

.pkg-cta:active {
  transform: translateY(1px) scale(0.99);
}

.pkg-cta .icon {
  width: 1.05em;
  height: 1.05em;
}

.pkg-whatsapp {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 3.15em;
  height: 3.15em;
  background: #25d366;
  border-radius: 50%;
  box-shadow: 0 0.5em 1em -0.5em rgba(37, 211, 102, 0.6);
  color: #fff;
  transition: transform 0.15s ease, filter 0.2s ease;
}

.pkg-whatsapp:hover,
.pkg-whatsapp:focus-visible {
  color: #fff;
  filter: brightness(1.05);
  transform: scale(1.05);
}

.pkg-whatsapp .icon {
  width: 1.75em;
  height: 1.75em;
}

/* ---------- Where the card sits ---------- */
.featured-tours-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.75rem;
}

.tour-pop-track {
  gap: 1.75rem;
}

.tour-pop-track > .pkg-card {
  flex: 0 0 clamp(290px, 28vw, 380px);
  height: auto;
  scroll-snap-align: start;
}

.td-related-grid {
  gap: 1.75rem;
}

.lst-results-list--packages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.75rem;
}

/* The search results keep their row for the filters and sorting, without a row's own look. */
.lst-results-list--packages .lst-card {
  display: block;
  /* The browser skips drawing rows that are off screen, which halved the scroll work on this
     90-card page. That also clips each row to its box, so the padding is room for the tilted sheet. */
  content-visibility: auto;
  contain-intrinsic-size: auto 640px;
  margin: -20px;
  padding: 20px;
  background: none;
  border: 0;
  box-shadow: none;
}

.lst-results-list--packages .lst-card[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .pkg-photo img,
  .pkg-cta,
  .pkg-whatsapp {
    transition: none;
  }

  .pkg-card:hover .pkg-photo img {
    transform: none;
  }
}
