/* ==========================================================================
   Trip cards (includes/trip-cards.php) — one card design for every trip list
   ========================================================================== */

.nh-cards {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.nh-card {
  --nh-brand: var(--brand, #03488d);
  --nh-brand-deep: #022f63;
  --nh-book: #c2410c;
  --nh-ink: #13202e;
  --nh-muted: #5b6878;
  --nh-line: #e2e8f0;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--nh-line);
  border-radius: 16px;
  overflow: hidden;
  color: var(--nh-ink);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
@media (hover: hover) {
  .nh-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(3, 47, 99, .14); border-color: #cfdbea; }
  .nh-card:hover .nh-card__media img { transform: scale(1.05); }
}
.nh-card:focus-within { box-shadow: 0 0 0 3px rgba(3, 72, 141, .35); }

/* Media: photo and (on mixed lists) the section badge */
.nh-card__media { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #dbe7f5, #eef4fc); overflow: hidden; }
.nh-card .nh-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .5s ease; }
.nh-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 18, 36, .3) 0%, rgba(4, 18, 36, 0) 32%); pointer-events: none; }
.nh-card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6rem; color: #9fb6d1; }
.nh-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--nh-brand-deep);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Body. Element + class selectors outrank the site-wide ".page .maincontainer h3 / p" content styles. */
.nh-card__body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }

.nh-card h2.nh-card__title, .nh-card h3.nh-card__title, .nh-card h4.nh-card__title {
  margin: 0;
  font-family: var(--font-head, "Poppins", sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--nh-ink);
  text-wrap: balance;
}
.nh-card__link { color: var(--nh-ink); text-decoration: none; }
.nh-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.nh-card:hover .nh-card__link { color: var(--nh-brand); }
.nh-card__link:focus-visible { outline: none; }

.nh-card p.nh-card__rating { margin: 0; font-size: .86rem; line-height: 1.4; color: var(--nh-muted); }
.nh-card__rating i { color: #f59e0b; }
.nh-card__rating strong { color: var(--nh-ink); }

.nh-card dl.nh-card__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: .86rem; line-height: 1.4; color: var(--nh-muted); }
.nh-card__facts > div { display: inline-flex; align-items: center; gap: 6px; }
.nh-card__facts dt { margin: 0; font-weight: 400; color: var(--nh-brand); }
.nh-card__facts dd { margin: 0; }

.nh-card p.nh-card__route { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; font-size: .84rem; font-weight: 700; line-height: 1.4; color: var(--nh-ink); }
.nh-card__arrow { font-style: normal; color: var(--nh-book); }

/* Foot: price(s) once, and one action */
.nh-card__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--nh-line); }
.nh-card dl.nh-card__prices { display: grid; gap: 2px; min-width: 0; margin: 0; }
.nh-card__price dt { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--nh-muted); }
.nh-card__price dd { margin: 0; line-height: 1.2; }
.nh-card__price strong { font-family: var(--font-head, "Poppins", sans-serif); font-size: 1.2rem; font-weight: 700; color: var(--nh-brand-deep); font-variant-numeric: tabular-nums; }
.nh-card__price small { font-size: .8rem; font-weight: 600; color: var(--nh-muted); }
.nh-card__price--alt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 5px; margin-top: 2px; }
.nh-card__price--alt dt { font-size: .8rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.nh-card__price--alt strong { font-size: .92rem; color: var(--nh-ink); }
.nh-card p.nh-card__ask { margin: 0; font-size: .9rem; font-weight: 700; line-height: 1.3; color: var(--nh-muted); }

.nh-card__book {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 9px;
  background: var(--nh-book);
  color: #fff !important;
  font-weight: 800;
  font-size: .88rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease;
}
.nh-card__book:hover { background: #9a3412; }
.nh-card__book--ghost { background: #fff; color: var(--nh-brand) !important; border: 1.5px solid var(--nh-brand); }
.nh-card__book--ghost:hover { background: #eef4fc; }
.nh-card__book:focus-visible { outline: 3px solid rgba(3, 72, 141, .45); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .nh-card, .nh-card .nh-card__media img { transition: none; }
  .nh-card:hover { transform: none; }
  .nh-card:hover .nh-card__media img { transform: none; }
}

/* Mobile fix (2026-09-15): badges and price labels were 11.5px; 12px is the smallest comfortable size on phones. */
.nh-badge { font-size: .75rem; }
.nh-card__price dt { font-size: .75rem; }
