/* Trip (tour) detail page — title header, photo gallery, sticky section tabs,
   content sections, sticky booking card, mobile booking bar.
   Works alongside modern-trip-snapshot.css (snapshot card, departures table). */

.trip-page-wrap {
  --tp-accent: var(--color-accent-1, #EB662B);
  --tp-accent-dark: var(--color-accent-1-dark, #CE5A25);
  --tp-dark: var(--color-dark-1, #05073C);
  --tp-muted: var(--color-text-muted, #4A4D63);
  --tp-border: #E7E6E6;
  --tp-surface: #FBF7F4;
}

.trip-page-wrap .tripH2 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tp-dark);
}

/* ---------- Header ---------- */

.tripHead {
  padding: 28px 0 24px;
}

.tripHead .breadcrumbs {
  margin-bottom: 22px;
}

.tripHead__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tripTag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(235, 102, 43, 0.1);
  color: var(--tp-accent);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tripTag.-accent {
  background: var(--tp-accent);
  color: #fff;
}

.tripTag i {
  font-size: 10px;
}

.tripHead__title {
  max-width: 980px;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--tp-dark);
}

.tripHead__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--tp-muted);
}

.tripHead__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tripHead__meta i {
  color: var(--tp-accent);
}

/* ---------- Gallery ---------- */

.tripGalleryWrap {
  padding-bottom: 8px;
}

/* A 4-column × 2-row grid at a fixed height; each photo count (-n1…-n5)
   places its tiles so the block is always balanced — never thin strips.
     -n1: one wide photo           -n4: big | wide top / 2 small bottom
     -n2: two halves               -n5: big | 2 × 2 small (Airbnb style)
     -n3: big | 2 stacked                (6th+ photos open in the viewer) */
.tripGallery {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  height: 460px;
  overflow: hidden;
  border-radius: 18px;
}

.tripGallery__item {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  background: var(--tp-surface);
}

.tripGallery__item.-hidden {
  display: none;
}

.tripGallery__item picture,
.tripGallery__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tripGallery__item img {
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.3s ease;
}

a.tripGallery__item:hover img {
  transform: scale(1.03);
  filter: brightness(0.9);
}

/* Big lead photo: left half, full height */
.tripGallery .-i1 { grid-column: 1 / 3; grid-row: 1 / 3; }

/* 1 photo */
.tripGallery.-n1 .-i1 { grid-column: 1 / -1; }

/* 2 photos */
.tripGallery.-n2 .-i2 { grid-column: 3 / 5; grid-row: 1 / 3; }

/* 3 photos */
.tripGallery.-n3 .-i2 { grid-column: 3 / 5; grid-row: 1; }
.tripGallery.-n3 .-i3 { grid-column: 3 / 5; grid-row: 2; }

/* 4 photos */
.tripGallery.-n4 .-i2 { grid-column: 3 / 5; grid-row: 1; }
.tripGallery.-n4 .-i3 { grid-column: 3; grid-row: 2; }
.tripGallery.-n4 .-i4 { grid-column: 4; grid-row: 2; }

/* 5+ photos */
.tripGallery.-n5 .-i2 { grid-column: 3; grid-row: 1; }
.tripGallery.-n5 .-i3 { grid-column: 4; grid-row: 1; }
.tripGallery.-n5 .-i4 { grid-column: 3; grid-row: 2; }
.tripGallery.-n5 .-i5 { grid-column: 4; grid-row: 2; }

.tripGallery__all {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(5, 7, 60, 0.12);
  border-radius: 10px;
  background: #fff;
  color: var(--tp-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(5, 7, 60, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tripGallery__all:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(5, 7, 60, 0.22);
}

.tripGallery__all i {
  font-size: 13px;
  color: var(--tp-accent);
}

/* ---------- Section tabs ---------- */

.tripTabs {
  position: sticky;
  top: 0;
  z-index: 50;
  margin-top: 24px;
  background: #fff;
  border-bottom: 1px solid var(--tp-border);
  transition: box-shadow 0.2s ease;
}

.tripTabs.is-stuck {
  box-shadow: 0 8px 20px rgba(5, 7, 60, 0.08);
}

.tripTabs__list {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tripTabs__list a {
  position: relative;
  display: block;
  padding: 18px 14px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--tp-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tripTabs__list a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--tp-accent);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.tripTabs__list a:hover,
.tripTabs__list a.is-active {
  color: var(--tp-dark);
}

.tripTabs__list a.is-active::after {
  transform: scaleX(1);
}

/* ---------- Body layout ---------- */

.tripBody {
  padding: 40px 0 70px;
}

.tripBody__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 48px;
  align-items: start;
}

.tripMain > * + * {
  margin-top: 56px;
}

.trip-page-wrap .tripSection {
  scroll-margin-top: 80px;
}

.trip-page-wrap .tripSection__header {
  margin-bottom: 22px;
}

.trip-page-wrap .tripSection__header.-split {
  justify-content: space-between;
  flex-wrap: wrap;
}

.trip-page-wrap .tripSection__titleWrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Softer section/snapshot icons than the old solid gradient badges */
.trip-page-wrap .tripSection__icon,
.trip-page-wrap .tripSnapshot__icon {
  background: rgba(235, 102, 43, 0.1);
  color: var(--tp-accent);
  box-shadow: none;
}

.trip-page-wrap .tripSnapshot {
  border-color: var(--tp-border);
  box-shadow: none;
  background: var(--tp-surface);
}

.trip-page-wrap .tripRich p {
  font-size: 16px;
  line-height: 1.8;
}

/* Some tour content (overview/itinerary typed in admin) contains its own h1s;
   size them as subheadings so they don't compete with the page title. */
.trip-page-wrap .tripRich h1 {
  margin: 1.2em 0 0.5em;
  font-size: 21px;
  line-height: 1.35;
}

.trip-page-wrap .tripRich > h1:first-child {
  margin-top: 0;
}

.tripLinkBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--tp-border);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--tp-dark);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.tripLinkBtn:hover {
  border-color: var(--tp-accent);
  color: var(--tp-accent);
}

.tripLinkBtn i {
  font-size: 12px;
}

/* ---------- Itinerary timeline ---------- */

.tripDays {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tripDays::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 19px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, rgba(235, 102, 43, 0.35) 0 6px, transparent 6px 12px);
}

.tripDay {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  list-style: none;
}

.tripDay + .tripDay {
  margin-top: 12px;
}

.tripDay__marker {
  position: relative;
  z-index: 1;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin-top: 8px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid var(--tp-accent);
  color: var(--tp-accent);
  font-size: 14px;
  font-weight: 700;
}

.tripDay:first-child .tripDay__marker,
.tripDay:last-child .tripDay__marker {
  background: var(--tp-accent);
  color: #fff;
}

.tripDay__card {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--tp-border);
  border-radius: 14px;
  background: #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tripDay__card:hover {
  border-color: rgba(235, 102, 43, 0.3);
}

.tripDay__toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.tripDay__label {
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tp-accent);
}

.tripDay__title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--tp-dark);
}

.tripDay__chevron {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--tp-muted);
  transition: transform 0.25s ease;
}

.tripDay__toggle[aria-expanded="true"] .tripDay__chevron {
  transform: rotate(180deg);
}

.tripDay__toggle[aria-expanded="true"] + .tripDay__content {
  border-top: 1px solid var(--tp-border);
}

.tripDay__content {
  padding: 16px 18px 6px;
}

.tripDay__content[hidden] {
  display: none;
}

/* ---------- Includes ---------- */

.tripIncludes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.tripIncludes__col {
  padding: 24px;
  border: 1px solid var(--tp-border);
  border-radius: 16px;
  background: #fff;
}

.tripIncludes__col.-in {
  border-top: 3px solid #1F9D55;
}

.tripIncludes__col.-out {
  border-top: 3px solid #D93025;
}

.tripIncludes__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 700;
  color: var(--tp-dark);
}

.tripIncludes__col.-in .tripIncludes__title i { color: #1F9D55; }
.tripIncludes__col.-out .tripIncludes__title i { color: #D93025; }

.tripIncludes ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tripIncludes li {
  position: relative;
  padding: 7px 0 7px 26px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--tp-dark);
  list-style: none;
}

.tripIncludes li + li {
  border-top: 1px dashed var(--tp-border);
}

.tripIncludes li::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 8px;
  font-size: 13px;
}

.tripIncludes__col.-in li::before {
  content: "\f00c";
  color: #1F9D55;
}

.tripIncludes__col.-out li::before {
  content: "\f00d";
  color: #D93025;
}

/* ---------- Departures notice ---------- */

.tripNotice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 20px;
  padding: 22px 24px;
  border: 1px dashed rgba(235, 102, 43, 0.4);
  border-radius: 16px;
  background: var(--tp-surface);
}

.tripNotice > i {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--tp-accent);
  font-size: 19px;
}

.tripNotice > div {
  flex: 1 1 260px;
}

.tripNotice strong {
  display: block;
  font-size: 16px;
  color: var(--tp-dark);
}

.tripNotice p {
  margin: 2px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--tp-muted);
}

/* ---------- Route map ---------- */

.tripMap {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--tp-border);
  border-radius: 16px;
  background: var(--tp-surface);
}

.tripMap img {
  display: block;
  width: 100%;
  height: auto;
}

.tripMap__zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--tp-dark);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(5, 7, 60, 0.15);
}

/* ---------- Accordions (FAQ, more details) ---------- */

.tripAccordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tripAccordion__item {
  border: 1px solid var(--tp-border);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.2s ease;
}

.tripAccordion__item[open] {
  border-color: rgba(235, 102, 43, 0.35);
}

.tripAccordion__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--tp-dark);
  cursor: pointer;
  list-style: none;
}

.tripAccordion__item summary::-webkit-details-marker {
  display: none;
}

.tripAccordion__item summary i {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tp-surface);
  color: var(--tp-accent);
  font-size: 12px;
  transition: transform 0.25s ease, background 0.2s ease, color 0.2s ease;
}

.tripAccordion__item[open] summary i {
  transform: rotate(45deg);
  background: var(--tp-accent);
  color: #fff;
}

.tripAccordion__q {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.tripAccordion__q img {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.tripAccordion__body {
  padding: 0 20px 16px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--tp-muted);
}

.tripAccordion__body p {
  font-size: 15.5px;
  line-height: 1.75;
  margin: 0 0 0.8em;
  color: inherit;
}

.tripAccordion__body > :last-child {
  margin-bottom: 0;
}

/* ---------- Buttons ---------- */

.tripBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tripBtn i {
  font-size: 13px;
}

.tripBtn:hover {
  transform: translateY(-2px);
}

.tripBtn.-block {
  width: 100%;
}

.tripBtn.-sm {
  padding: 11px 20px;
  font-size: 15px;
}

.tripBtn.-primary {
  background: var(--tp-accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(235, 102, 43, 0.28);
}

.tripBtn.-primary:hover {
  background: var(--tp-accent-dark);
  color: #fff;
}

.tripBtn.-ghost {
  border: 1px solid var(--tp-border);
  background: #fff;
  color: var(--tp-dark);
}

.tripBtn.-ghost:hover {
  border-color: var(--tp-dark);
  color: var(--tp-dark);
}

/* ---------- Booking card ---------- */

.tripAside {
  align-self: stretch;
}

.tripBook {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--tp-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 45px rgba(5, 7, 60, 0.1);
}

.tripBook__price {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--tp-border);
}

.tripBook__from,
.tripBook__per {
  display: block;
  font-size: 13.5px;
  color: var(--tp-muted);
}

.tripBook__amount {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2px 0;
}

.tripBook__amount strong {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--tp-dark);
}

.tripBook__amount strong.-request {
  font-size: 26px;
}

.tripBook__amount s {
  font-size: 17px;
  color: var(--tp-muted);
}

.tripBook__save {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #E9F8EE;
  color: #1F9D55;
  font-size: 13px;
  font-weight: 700;
}

.tripBook__facts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 8px;
  padding: 0;
  list-style: none;
}

.tripBook__facts li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--tp-dark);
  list-style: none;
}

.tripBook__facts i {
  width: 18px;
  color: var(--tp-accent);
  text-align: center;
}

.tripBook__help {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--tp-border);
  font-size: 14px;
}

.tripBook__help span {
  font-weight: 700;
  color: var(--tp-dark);
}

.tripBook__help a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--tp-muted);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.tripBook__help a:hover {
  color: var(--tp-accent);
}

.tripBook__help i {
  width: 16px;
  color: var(--tp-accent);
}

/* ---------- Related ---------- */

.trip-page-wrap .tripRelated {
  padding: 70px 0 90px;
  background: linear-gradient(180deg, var(--tp-surface) 0%, #fff 100%);
}

/* ---------- Mobile booking bar ---------- */

.tripMobileBar {
  display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
  .tripBody__grid {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 36px;
  }
}

@media (max-width: 991px) {
  .tripHead__title {
    font-size: 30px;
  }

  /* Tablets: lead photo + up to two stacked on the right */
  .tripGallery {
    height: 380px;
  }

  .tripGallery.-n4 .-i2,
  .tripGallery.-n5 .-i2 { grid-column: 3 / 5; grid-row: 1; }
  .tripGallery.-n4 .-i3,
  .tripGallery.-n5 .-i3 { grid-column: 3 / 5; grid-row: 2; }
  .tripGallery.-n4 .-i4,
  .tripGallery.-n5 .-i4,
  .tripGallery.-n5 .-i5 { display: none; }

  .tripBody__grid {
    grid-template-columns: 1fr;
  }

  /* The booking card moves below the content; the bottom bar takes over. */
  .tripBook {
    position: static;
  }

  .tripMobileBar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--tp-border);
    box-shadow: 0 -8px 24px rgba(5, 7, 60, 0.1);
  }

  .tripMobileBar__price span {
    display: block;
    font-size: 12px;
    color: var(--tp-muted);
  }

  .tripMobileBar__price strong {
    font-size: 20px;
    font-weight: 700;
    color: var(--tp-dark);
  }

  .trip-page-wrap {
    padding-bottom: 76px;
  }
}

@media (max-width: 767px) {
  .tripHead {
    padding: 20px 0 18px;
  }

  .tripHead__title {
    font-size: 25px;
  }

  .tripHead__meta {
    font-size: 14px;
    gap: 8px 16px;
  }

  /* Phones: lead photo only; "Show all photos" opens the rest */
  .tripGallery {
    display: block;
    height: 260px;
    border-radius: 14px;
  }

  .tripGallery .tripGallery__item {
    display: none;
  }

  .tripGallery .tripGallery__item.-i1 {
    display: block;
    height: 100%;
  }

  .tripGallery__all {
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .trip-page-wrap .tripH2 {
    font-size: 22px;
  }

  .tripMain > * + * {
    margin-top: 44px;
  }

  .tripIncludes {
    grid-template-columns: 1fr;
  }

  .tripDays::before {
    left: 15px;
  }

  .tripDay {
    gap: 12px;
  }

  .tripDay__marker {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    font-size: 12.5px;
  }

  .tripDay__toggle {
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 14px;
  }

  .tripDay__title {
    flex-basis: calc(100% - 30px);
    order: 2;
    font-size: 15px;
  }

  .tripDay__chevron {
    order: 1;
    margin-left: auto;
  }

  .tripDay__content {
    padding: 14px 14px 4px;
  }

  .tripAccordion__item summary {
    padding: 14px 16px;
    font-size: 15px;
  }

  .tripAccordion__body {
    padding: 0 16px 14px;
  }
}
