/* ============================================================
   TARARIVERRAFTING.COM - tour.css
   Tour & lodging detail page components only
   ============================================================ */

/* ---------- Tour Hero ---------- */
.tour-hero {
  position: relative;
  height: 70vh;
  min-height: 480px;
  max-height: 700px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--black);
}
.tour-hero-bg {
  position: absolute;
  inset: 0;
}
.tour-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s;
}
.tour-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,19,13,0.92) 0%, rgba(7,19,13,0.4) 55%, rgba(7,19,13,0.12) 100%);
  z-index: 1;
}
.tour-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--gutter) 48px;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.tour-hero-content h1 { color: var(--accent); margin-bottom: 18px; }

.tour-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tour-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: rgba(7,19,13,0.65);
  border: 1px solid rgba(247,242,230,0.2);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--white);
  backdrop-filter: blur(6px);
}

/* ---------- Tour Body Layout ---------- */
.tour-body {
  padding: var(--section-pad) 0;
}
.tour-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

/* ---------- Photo Gallery ---------- */
.tour-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 40px;
  aspect-ratio: 16/8;
}
.g-img {
  overflow: hidden;
  background: var(--off);
}
.g-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.g-img:hover img { transform: scale(1.04); }
.tour-gallery-main {
  grid-row: 1 / 3;
}

/* ---------- Highlights ---------- */
.tour-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin-bottom: 36px;
  padding: 24px;
  background: var(--off);
  border-radius: var(--r-lg);
  border: 1px solid var(--gray);
}
.highlight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--white);
}
.hi-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--black);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Route Stats Strip ---------- */
.route-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--gray);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 40px;
}
.route-stat {
  padding: 20px 16px;
  text-align: center;
  background: var(--off);
  border-right: 1px solid var(--gray);
}
.route-stat:last-child { border-right: none; }
.rs-val {
  display: block;
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 4px;
  color: var(--accent);
}
.rs-key {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}

/* ---------- Tour Content Sections ---------- */
.tour-section {
  margin-bottom: 44px;
}
.tour-section h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray);
}

/* ---------- Itinerary ---------- */
.itinerary {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.itinerary-day {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--gray);
}
.itinerary-day:last-child { border-bottom: none; }
.day-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  padding-top: 4px;
}
.day-content h4 { margin-bottom: 6px; }
.day-content p { font-size: 0.875rem; margin: 0; }

/* ---------- What's Included Grid ---------- */
.includes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
.include-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  padding: 6px 0;
  color: var(--white);
}
.include-item .check {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255, 239, 98, 0.15);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}
.include-item.no .check {
  background: rgba(255, 80, 80, 0.15);
  color: #ff7070;
}

/* ---------- Accommodation Block ---------- */
.accom-block {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--off);
  border-radius: var(--r-lg);
  border: 1px solid var(--gray);
}
.accom-icon { font-size: 1.8rem; flex-shrink: 0; }
.accom-body h4 { margin-bottom: 6px; }
.accom-body p { font-size: 0.875rem; margin: 0; }

/* ---------- Getting Here Grid ---------- */
.get-here-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.get-here-item {
  padding: 16px 18px;
  background: var(--off);
  border-radius: var(--r-md);
  border: 1px solid var(--gray);
}
.get-here-city { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; color: var(--white); }
.get-here-time { font-size: 0.82rem; font-weight: 600; color: var(--accent); margin-bottom: 3px; }
.get-here-note { font-size: 0.78rem; color: var(--mid); }

/* ---------- Tour FAQ ---------- */
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--gray); }
.faq-item:first-child { border-top: 1px solid var(--gray); }
.faq-item .faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  text-align: left;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--white);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: color 0.15s;
}
.faq-item .faq-question:hover { color: var(--accent); }
button.faq-question::after { content: "+"; font-size: 1.3rem; font-weight: 300; color: var(--mid); margin-left: 12px; flex-shrink: 0; }
.faq-item.open button.faq-question::after { content: "−"; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-item.open .faq-answer { max-height: 400px; }
.faq-answer p { font-size: 0.875rem; color: rgba(247,242,230,0.62); padding-bottom: 16px; line-height: 1.65; }

/* ---------- Booking Sidebar Card ---------- */
.booking-card {
  position: sticky;
  top: 88px;
  background: var(--off);
  border: 1px solid var(--gray);
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}
.booking-card .label { margin-bottom: 4px; display: block; }
.booking-price {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 16px;
  color: var(--accent);
}
.booking-price span {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--mid);
}
.booking-details {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 20px;
  border: 1px solid var(--gray);
  border-radius: var(--r-md);
  overflow: hidden;
}
.booking-detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray);
  font-size: 0.82rem;
}
.booking-detail:last-child { border-bottom: none; }
.booking-detail .key { color: var(--mid); }
.booking-detail .val { font-weight: 600; color: var(--white); }
.booking-card .btn { width: 100%; text-align: center; margin-bottom: 10px; justify-content: center; }
.booking-guarantee {
  text-align: center;
  font-size: 0.75rem;
  color: var(--mid);
  margin-top: 12px;
}

/* ---------- Sticky Mobile Booking Bar ---------- */
.tour-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: var(--off);
  border-top: 1px solid var(--gray);
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 800;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.35);
}
.sticky-price {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
}
.sticky-price span {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--mid);
}
.sticky-actions { display: flex; gap: 10px; }
.sticky-actions .btn { padding: 11px 22px; font-size: 0.85rem; display: flex; align-items: center; gap: 6px; }

/* Show sticky bar only on mobile (hidden on desktop since sidebar is visible) */
@media (min-width: 901px) {
  .tour-sticky-bar { display: none; }
}

/* ---------- Responsive Tour Layout ---------- */
@media (max-width: 900px) {
  .tour-layout { grid-template-columns: 1fr; }
  .booking-card { position: static; order: -1; }
  .tour-gallery { grid-template-columns: 1fr; grid-template-rows: auto; aspect-ratio: auto; }
  .tour-gallery-main { grid-row: auto; aspect-ratio: 4/3; }
  .g-img:not(.tour-gallery-main) { aspect-ratio: 4/3; }
  .tour-highlights { grid-template-columns: 1fr; }
  .includes-grid { grid-template-columns: 1fr; }
  .get-here-grid { grid-template-columns: 1fr; }
  .route-stats { grid-template-columns: repeat(2, 1fr); }
  .route-stat:nth-child(2) { border-right: none; }
  .route-stat:nth-child(3) { border-bottom: 1px solid var(--gray); }
}

@media (max-width: 480px) {
  .tour-hero { height: 60vh; }
  .tour-hero-content { padding-bottom: 32px; }
  .booking-price { font-size: 1.8rem; }
}

/* ---------- Tour Detail Refinements ---------- */
.tour-hero {
  height: min(68vh, 680px);
  min-height: 460px;
  max-height: 680px;
  margin: 18px var(--gutter) 0;
  border-radius: var(--r-xl);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.tour-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,19,13,0.92) 0%, rgba(7,19,13,0.48) 52%, rgba(7,19,13,0.12) 100%);
  z-index: 1;
}

.tour-body {
  padding: 56px 0 var(--section-pad);
}

.tour-gallery-featured {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 10px;
  overflow: visible;
  aspect-ratio: auto;
  border-radius: 0;
}

.tour-gallery-main,
.tour-gallery-thumb {
  border: 0;
  padding: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--off);
  cursor: pointer;
}

.tour-gallery-main {
  grid-row: auto;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.tour-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.tour-gallery-thumb {
  aspect-ratio: 4 / 3;
}

.tour-gallery-main img,
.tour-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.tour-gallery-main:hover img,
.tour-gallery-main:focus-visible img,
.tour-gallery-thumb:hover img,
.tour-gallery-thumb:focus-visible img {
  transform: scale(1.04);
}

.tour-section {
  margin-bottom: 28px;
  padding: 28px;
  background: rgba(247,242,230,0.035);
  border: 1px solid var(--gray);
  border-radius: var(--r-lg);
}

.tour-section p {
  max-width: 78ch;
}

.tour-section p + p {
  margin-top: 14px;
}

.section-kicker {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tour-highlights {
  padding: 26px;
}

.tour-highlights h2 {
  margin-bottom: 18px;
}

.highlights-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.highlights-list li {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--gray);
  border-radius: var(--r-md);
  color: var(--white);
  font-size: 0.9rem;
}

.highlights-list li::before {
  content: '';
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
}

.highlights-list li::after {
  content: '';
  position: absolute;
  left: 17px;
  width: 5px;
  height: 9px;
  border: solid var(--black);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.stat-item {
  padding: 20px 16px;
  text-align: center;
  background: var(--off);
  border-right: 1px solid var(--gray);
}

.stat-item:last-child {
  border-right: none;
}

.stat-value {
  display: block;
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 4px;
  color: var(--accent);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
}

.fixed-price-panel {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--gray);
  border-radius: var(--r-lg);
  background: var(--green);
}

.fixed-price-value {
  display: block;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.fixed-price-unit {
  display: block;
  margin-top: 5px;
  color: var(--mid);
  font-size: 0.85rem;
}

.fixed-price-panel p {
  margin: 0;
}

.group-discount-note {
  margin-top: 14px;
  color: rgba(247,242,230,0.78);
}

.booking-details li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray);
  font-size: 0.82rem;
  list-style: none;
}

.booking-details li:last-child {
  border-bottom: none;
}

.booking-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 18px;
  position: relative;
}

.booking-check::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid var(--black);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.bd-label {
  color: var(--mid);
}

.bd-value {
  margin-left: auto;
  text-align: right;
  font-weight: 600;
  color: var(--white);
}

@media (max-width: 900px) {
  .tour-gallery-featured {
    display: grid;
  }

  .tour-gallery-thumbs {
    grid-template-columns: repeat(2, 1fr);
  }

  .highlights-list {
    grid-template-columns: 1fr;
  }

  .fixed-price-panel {
    grid-template-columns: 1fr;
  }

  .stat-item:nth-child(2) {
    border-right: none;
  }

  .stat-item:nth-child(3) {
    border-bottom: 1px solid var(--gray);
  }
}

@media (max-width: 480px) {
  .tour-hero {
    height: 62vh;
    min-height: 420px;
    margin: 10px 10px 0;
    border-radius: var(--r-lg);
  }

  .tour-section,
  .tour-highlights,
  .booking-card {
    padding: 22px;
  }
}

/* ---------- Tours Listing Cards (tour.css override) ---------- */
.tours-section { padding: var(--section-pad) 0; }
.tours-section .container > h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 8px;
  margin-top: 48px;
}
.tours-section .container > h2:first-child { margin-top: 0; }
.tours-section .category-intro {
  font-size: 0.95rem;
  color: var(--mid);
  margin-bottom: 24px;
}
