/* The Explore hub (explore.html). Markup from scripts/build-content-pages.mjs
   (buildExploreHub); it sits on the trip pages' layout and tokens
   (assets/trip.css): white cards with a 1px slate border and a 12px radius,
   navy at weight 600 for titles, Poppins for reading text. */

.tc-ex__hero {
  min-height: clamp(22rem, 42vw, 32rem);
}

.tc-ex__tabs {
  margin-top: 2rem;
}

/* --- Section heads ------------------------------------------------------- */

.tc-ex__section {
  margin-top: 3.5rem;
}

.tc-ex__head {
  max-width: 40rem;
  margin-bottom: 1.5rem;
}

.tc-ex__head p {
  margin-top: 0.4rem !important;
  color: var(--tp-muted);
  line-height: 1.6;
}

/* --- Guide cards --------------------------------------------------------- */

.tc-ex__guide,
.tc-ex__plan {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tc-ex__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--tp-line);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 31, 99, 0.06);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tc-ex__card:hover {
  box-shadow: 0 14px 32px -14px rgba(15, 31, 99, 0.3);
  transform: translateY(-2px);
}

.tc-ex__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--tp-line);
}

.tc-ex__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tc-ex__card:hover .tc-ex__img {
  transform: scale(1.04);
}

.tc-ex__count {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--tp-navy);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(15, 31, 99, 0.15);
}

.tc-ex__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.25rem 1.35rem 1.35rem;
}

.tc-ex__title {
  color: var(--tp-navy);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
}

.tc-ex__text {
  color: var(--tp-text);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.tc-ex__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.6rem;
  color: var(--tp-navy);
  font-size: 0.9375rem;
  font-weight: 600;
}

.tc-ex__card:hover .tc-ex__link {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tc-ex__card:hover .tc-tp__arrow {
  transform: translateX(3px);
}

/* The islands: two wide cards, then three. */
@media (min-width: 640px) {
  .tc-ex__guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tc-ex__guide > li:first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .tc-ex__guide {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .tc-ex__guide > li {
    grid-column: span 2;
  }

  .tc-ex__guide > li:nth-child(-n + 2) {
    grid-column: span 3;
  }

  .tc-ex__guide > li:nth-child(-n + 2) .tc-ex__media {
    aspect-ratio: 16 / 9;
  }

  .tc-ex__guide > li:nth-child(-n + 2) .tc-ex__title {
    font-size: 1.375rem;
  }
}

/* Plan your trip: photo beside the text. */
.tc-ex__plan .tc-ex__card {
  flex-direction: row;
}

.tc-ex__plan .tc-ex__media {
  flex: none;
  width: 38%;
  aspect-ratio: auto;
  min-height: 9.5rem;
}

.tc-ex__plan .tc-ex__body {
  padding: 1.1rem 1.2rem;
}

.tc-ex__plan .tc-ex__title {
  font-size: 1.0625rem;
}

.tc-ex__plan .tc-ex__text {
  font-size: 0.875rem;
}

@media (min-width: 1024px) {
  .tc-ex__plan {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* --- At a glance --------------------------------------------------------- */

.tc-ex__glance {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .tc-ex__glance {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: stretch;
  }
}

.tc-ex__glanceimg {
  min-height: 16rem;
  overflow: hidden;
  border-radius: 0.75rem;
  background: var(--tp-navy);
}

.tc-ex__glanceimg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tc-ex__facts {
  display: grid;
  margin: 0;
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--tp-line);
  border-radius: 0.75rem;
  background: #fff;
}

@media (min-width: 768px) {
  .tc-ex__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
  }

  /* A line under every row but the last one in each column. */
  .tc-ex__facts > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

.tc-ex__facts > div {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--tp-line);
}

.tc-ex__facts > div:last-child {
  border-bottom: 0;
}

.tc-ex__facts .tc-tp__icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.55rem;
  border-radius: 9999px;
  background: #e6f7f5;
  color: #0b6b5f;
}

.tc-ex__facts dt {
  color: var(--tp-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tc-ex__facts dd {
  margin-top: 0.2rem;
  color: var(--tp-ink);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* --- Questions ----------------------------------------------------------- */

/* Overrides the guide pages' bordered list (assets/content.css). */
.tc-ex .tc-faq {
  display: grid;
  gap: 1rem;
  overflow: visible;
  border: 0;
  border-radius: 0;
}

@media (min-width: 768px) {
  .tc-ex .tc-faq {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* An odd last question takes the full row rather than half of it. */
  .tc-ex .tc-faq > div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.tc-ex .tc-faq > div {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--tp-line);
  border-radius: 0.75rem;
  background: #fff;
}

.tc-ex .tc-faq > div:first-child {
  border-top: 1px solid var(--tp-line);
}

.tc-ex .tc-faq h3 {
  margin: 0 0 0.45rem;
  color: var(--tp-navy);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.tc-ex .tc-faq p {
  margin: 0;
  color: var(--tp-text);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* --- Our trips ----------------------------------------------------------- */

@media (min-width: 640px) {
  .tc-ex__trips > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .tc-ex__trips > ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* --- Help ---------------------------------------------------------------- */

.tc-ex__help {
  display: grid;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding: 2rem 1.5rem;
  border-radius: 0.75rem;
  background: var(--tp-navy) linear-gradient(120deg, rgba(0, 204, 179, 0.18), rgba(15, 31, 99, 0) 55%);
  color: #fff;
}

@media (min-width: 768px) {
  .tc-ex__help {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2.5rem;
    padding: 2.5rem 3rem;
  }
}

.tc-ex__help h2 {
  font-family: avenir, Poppins, sans-serif;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
}

.tc-ex__help p {
  max-width: 34rem;
  margin-top: 0.6rem !important;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.tc-ex__helpactions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  min-width: 16rem;
}

.tc-ex__mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  color: #fff;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.tc-ex__mail:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.tc-ex__charter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  color: var(--tp-teal);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.tc-ex__charter:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tc-ex__help a:focus-visible {
  outline-color: #fff;
}

/* --- Phones -------------------------------------------------------------- */

@media (max-width: 639px) {
  .tc-ex__section {
    margin-top: 2.75rem;
  }

  .tc-ex__plan .tc-ex__media {
    width: 34%;
    min-height: 8rem;
  }

  .tc-ex__plan .tc-ex__link {
    padding-top: 0.35rem;
  }
}

@media (max-width: 1023px) {
  .tc-ex__glanceimg {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tc-ex__card,
  .tc-ex__img {
    transition: none;
  }

  .tc-ex__card:hover {
    transform: none;
  }
}
