/*
 * Aliinns reusable tour-page styles
 * Load after assets/css/style.css on every individual tour page.
 */

/* Screen-reader-only utility used by reusable dialogs. */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Tour facts */
.tour-facts-section {
  padding-top: 36px;
}

.tour-facts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tour-fact-card {
  background: #fff;
  border: 1px solid rgba(13, 45, 45, .12);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(13, 45, 45, .06);
}

.tour-fact-card i {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(24, 112, 97, .10);
  color: #187061;
  margin-bottom: 14px;
}

.tour-fact-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #0d2d2d;
}

.tour-fact-card p {
  margin: 0;
  color: #596765;
  line-height: 1.55;
  font-size: .94rem;
}

.tour-fact-card.wide {
  grid-column: span 2;
}

/* Included / not included accordions */
.package-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.package-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.package-toggle {
  border: 1px solid rgba(13, 45, 45, .18);
  background: #fff;
  color: #0d2d2d;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.package-toggle:hover {
  border-color: rgba(13, 45, 45, .4);
  background: #f6f9f8;
  transform: translateY(-1px);
}

.package-list {
  display: grid;
  gap: 12px;
}

.package-item {
  background: #fff;
  border: 1px solid rgba(13, 45, 45, .12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(13, 45, 45, .05);
}

.package-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  font-weight: 800;
  color: #0d2d2d;
}

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

.package-item summary i:first-child {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  background: rgba(24, 112, 97, .10);
  color: #187061;
}

.package-item summary .summary-plus {
  margin-left: auto;
  transition: transform .2s ease;
}

.package-item[open] summary .summary-plus {
  transform: rotate(45deg);
}

.package-body {
  padding: 0 20px 20px 68px;
  color: #4f5f5d;
  line-height: 1.7;
}

.package-body p {
  margin: 0 0 10px;
}

.package-body ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.package-body li + li {
  margin-top: 8px;
}

.package-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6f3e9;
  color: #4f5549;
  font-size: .92rem;
}

/* Detailed itinerary accordions */
.itinerary-accordion {
  display: grid;
  gap: 14px;
}

.itinerary-day {
  background: #fff;
  border: 1px solid rgba(13, 45, 45, .12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(13, 45, 45, .05);
}

.itinerary-day summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

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

.day-number {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: #0d2d2d;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .82rem;
  text-align: center;
  line-height: 1.15;
}

.itinerary-day h3 {
  margin: 0;
  color: #0d2d2d;
  font-size: 1.07rem;
}

.itinerary-day summary > i {
  color: #187061;
  transition: transform .2s ease;
}

.itinerary-day[open] summary > i {
  transform: rotate(180deg);
}

.itinerary-body {
  padding: 0 22px 22px 90px;
  color: #4d5d5a;
  line-height: 1.7;
}

.itinerary-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.itinerary-meta div {
  background: #f4f7f6;
  border-radius: 12px;
  padding: 12px 14px;
}

.itinerary-meta strong {
  display: block;
  color: #0d2d2d;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 3px;
}

.activity-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.activity-box {
  border: 1px solid rgba(13, 45, 45, .10);
  border-radius: 14px;
  padding: 16px;
  background: #fbfcfc;
}

.activity-box h4 {
  margin: 0 0 10px;
  color: #0d2d2d;
  font-size: .95rem;
}

.activity-box ul {
  margin: 0;
  padding-left: 18px;
}

.activity-box li + li {
  margin-top: 6px;
}

/* Route map */
.route-map-section {
  padding-top: 28px;
}

.route-map-heading {
  margin-bottom: 24px;
}

.route-map-card {
  background: #fff;
  border: 1px solid rgba(13, 45, 45, .10);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(13, 45, 45, .08);
}

.route-map-trigger {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: #eef4ef;
  cursor: zoom-in;
  overflow: hidden;
}

.route-map-trigger img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 220px;
  object-fit: contain;
  background: #eef4ef;
  transition: transform .3s ease;
}

.route-map-trigger:hover img {
  transform: scale(1.008);
}

.route-map-zoom {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(13, 45, 45, .88);
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.route-map-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 22px 22px;
}

.route-map-caption-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.route-map-caption-left strong {
  font-size: 1.05rem;
  color: #0d2d2d;
}

.route-map-caption-left span {
  max-width: 780px;
  color: #5b6b73;
  font-size: .96rem;
  line-height: 1.55;
}

.route-map-open-btn {
  flex-shrink: 0;
}

.route-map-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.route-map-modal.is-active {
  display: flex;
}

.route-map-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 18, 24, .82);
  backdrop-filter: blur(7px);
  cursor: zoom-out;
}

.route-map-dialog {
  position: relative;
  z-index: 2;
  width: min(1180px, 96vw);
  max-height: 92vh;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .34);
}

.route-map-dialog img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 88vh;
  object-fit: contain;
  background: #eef4ef;
}

.route-map-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(13, 45, 45, .92);
  color: #fff;
  font: inherit;
  font-size: 29px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .22);
}

body.tour-modal-open {
  overflow: hidden;
}

/* Photo gallery */
.tour-gallery {
  background: #f6f8f7;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 230px 230px;
  grid-auto-rows: 180px;
  gap: 12px;
}

.gallery-item {
  position: relative;
  border: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  cursor: zoom-in;
  background: #dfe7e5;
}

.gallery-item:first-child {
  grid-row: 1 / span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.gallery-item:hover img {
  transform: scale(1.035);
}

.gallery-item::after {
  content: 'View';
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(13, 45, 45, .82);
  color: #fff;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: .75rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .2s ease, transform .2s ease;
}

.gallery-item:hover::after {
  opacity: 1;
  transform: none;
}

.gallery-more {
  margin-top: 14px;
  color: #65706e;
  font-size: .92rem;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 18, 18, .92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 11900;
  padding: 28px;
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox img {
  max-width: min(1180px, 94vw);
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.gallery-lightbox button {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
}

.gallery-lightbox .gl-close {
  top: 20px;
  right: 20px;
}

.gallery-lightbox .gl-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.gallery-lightbox .gl-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 980px) {
  .tour-facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: 1.35fr 1fr;
    grid-template-rows: 210px 210px;
  }

  .gallery-item:nth-child(n + 4) {
    display: none;
  }

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

@media (max-width: 768px) {
  .route-map-caption {
    flex-direction: column;
    align-items: flex-start;
  }

  .route-map-open-btn {
    width: 100%;
  }

  .route-map-dialog {
    width: min(100%, 1100px);
    border-radius: 14px;
  }

  .route-map-trigger img {
    min-height: 180px;
  }
}

@media (max-width: 640px) {
  .tour-facts-grid {
    grid-template-columns: 1fr;
  }

  .tour-fact-card.wide {
    grid-column: auto;
  }

  .package-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .package-body {
    padding: 0 16px 18px;
  }

  .itinerary-day summary {
    grid-template-columns: auto 1fr auto;
    padding: 16px;
  }

  .day-number {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .itinerary-body {
    padding: 0 16px 18px;
  }

  .itinerary-meta {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 190px 150px;
  }

  .gallery-item:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .gallery-item:nth-child(n + 4) {
    display: block;
  }

  .gallery-item:nth-child(n + 6) {
    display: none;
  }

  .gallery-lightbox {
    padding: 14px;
  }

  .gallery-lightbox .gl-prev {
    left: 8px;
  }

  .gallery-lightbox .gl-next {
    right: 8px;
  }

  .gallery-lightbox .gl-close {
    top: 8px;
    right: 8px;
  }

  .route-map-section {
    padding-top: 18px;
  }

  .route-map-card {
    border-radius: 16px;
  }

  .route-map-caption {
    padding: 16px;
  }

  .route-map-zoom {
    right: 10px;
    bottom: 10px;
    padding: 8px 10px;
    font-size: .76rem;
  }

  .route-map-modal {
    padding: 9px;
  }

  .route-map-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
}

/* =========================================================
   Responsive layout repair for all individual tour pages
   This file is loaded after style.css, so these rules also
   neutralise late desktop overrides from the base stylesheet.
   ========================================================= */

.tour-hero-content,
.tour-hero-content > div,
.tour-overview-grid > *,
.conditions-layout > *,
.final-cta-box > * {
  min-width: 0;
}

.tour-hero h1,
.tour-hero-content > div > p,
.breadcrumb,
.hero-tour-meta,
.tour-fact-card,
.itinerary-day h3,
.package-body,
.route-map-caption-left {
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 1100px) {
  .tour-hero {
    height: auto !important;
    min-height: 0 !important;
    align-items: stretch !important;
  }

  .tour-hero-content {
    grid-template-columns: minmax(0, 1fr) 250px !important;
    gap: 30px !important;
    padding-top: 88px !important;
    padding-bottom: 38px !important;
    align-items: end !important;
  }

  .tour-hero h1 {
    max-width: 760px !important;
    font-size: clamp(44px, 5.7vw, 62px) !important;
    line-height: 1.02 !important;
  }

  .hero-price-card {
    width: 100%;
    max-width: 250px;
  }

  .tour-overview-grid {
    gap: 44px;
  }
}

@media (max-width: 920px) {
  .tour-hero {
    min-height: 0 !important;
  }

  .tour-hero-bg {
    object-position: center center;
  }

  .tour-hero-overlay {
    background:
      linear-gradient(90deg, rgba(3, 27, 29, .91), rgba(3, 27, 29, .67) 66%, rgba(3, 27, 29, .43)),
      linear-gradient(0deg, rgba(3, 27, 29, .72), rgba(3, 27, 29, .10) 70%) !important;
  }

  .tour-hero-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
    padding-top: 62px !important;
    padding-bottom: 30px !important;
    align-items: start !important;
  }

  .tour-hero-content > div {
    width: 100%;
  }

  .breadcrumb {
    gap: 7px !important;
    margin-bottom: 16px !important;
    font-size: 10px !important;
    line-height: 1.4;
  }

  .tour-hero .eyebrow,
  .tour-hero .eyebrow.light {
    display: block;
    width: fit-content;
    max-width: 100%;
    white-space: normal;
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: .12em;
  }

  .tour-hero h1 {
    width: 100%;
    max-width: 720px !important;
    margin-top: 14px;
    margin-bottom: 14px !important;
    font-size: clamp(42px, 7.5vw, 58px) !important;
    line-height: 1.01 !important;
    letter-spacing: -.035em !important;
  }

  .tour-hero-content > div > p {
    max-width: 720px;
    font-size: 15px !important;
    line-height: 1.55;
  }

  .hero-tour-meta {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px !important;
    margin-top: 18px !important;
    font-size: 11px !important;
    line-height: 1.4;
  }

  .hero-price-card {
    width: 100%;
    max-width: none !important;
    padding: 20px !important;
    border-radius: 16px !important;
  }

  .hero-price-card > strong {
    font-size: 38px !important;
  }

  .tour-subnav {
    top: 66px !important;
  }

  .tour-subnav .container {
    width: 100% !important;
    padding-left: 14px;
    padding-right: 14px;
    gap: 20px !important;
    overscroll-behavior-x: contain;
  }

  .tour-subnav a {
    padding: 14px 0 !important;
  }

  .tour-overview-grid,
  .conditions-layout,
  .faq-layout,
  .included-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .tour-overview-photo {
    width: 100%;
  }

  .tour-overview-photo > img {
    height: clamp(300px, 52vw, 430px) !important;
  }

  .photo-label {
    right: 12px !important;
    left: 12px;
    max-width: none !important;
    width: auto;
  }

  .final-cta-box {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .final-cta-box .btn {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .section {
    padding-top: 54px !important;
    padding-bottom: 54px !important;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .section-heading h2,
  .package-head h2,
  .faq-title h2,
  .tour-overview-copy h2 {
    font-size: clamp(30px, 9vw, 40px) !important;
    line-height: 1.05 !important;
  }

  .tour-hero-content {
    padding-top: 42px !important;
    padding-bottom: 24px !important;
  }

  .tour-hero h1 {
    font-size: clamp(36px, 11.2vw, 48px) !important;
    line-height: .99 !important;
    letter-spacing: -.04em !important;
  }

  .tour-hero-content > div > p {
    font-size: 14px !important;
    line-height: 1.5;
  }

  .hero-tour-meta {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  .hero-tour-meta span {
    display: flex;
    align-items: flex-start;
  }

  .hero-price-card {
    padding: 18px !important;
  }

  .hero-price-card > strong {
    font-size: 34px !important;
  }

  .stat-row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .stat-row > div {
    min-width: 0 !important;
    padding: 11px 8px !important;
  }

  .stat-row strong {
    font-size: 19px !important;
  }

  .tour-facts-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .tour-fact-card,
  .tour-fact-card.wide {
    grid-column: auto !important;
    padding: 17px !important;
  }

  .package-head {
    gap: 14px !important;
  }

  .package-actions,
  .package-toggle {
    width: 100%;
  }

  .package-toggle {
    text-align: center;
  }

  .package-item summary {
    padding: 15px 14px !important;
    gap: 10px !important;
  }

  .package-item summary i:first-child {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .package-body {
    padding: 0 14px 16px !important;
    font-size: .95rem;
    line-height: 1.65;
  }

  .itinerary-day summary {
    grid-template-columns: 42px minmax(0, 1fr) 16px !important;
    gap: 11px !important;
    padding: 14px !important;
  }

  .day-number {
    width: 42px !important;
    height: 42px !important;
    border-radius: 11px !important;
    font-size: .72rem !important;
  }

  .itinerary-day h3 {
    font-size: .98rem !important;
    line-height: 1.28;
  }

  .itinerary-body {
    padding: 0 14px 16px !important;
    font-size: .95rem;
  }

  .itinerary-meta {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .activity-columns {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .route-map-section {
    padding-top: 12px !important;
  }

  .route-map-card {
    border-radius: 14px !important;
  }

  .route-map-trigger img {
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .route-map-caption {
    padding: 14px !important;
    gap: 14px !important;
  }

  .route-map-caption-left strong {
    font-size: 1rem;
    line-height: 1.3;
  }

  .route-map-caption-left span {
    font-size: .9rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 180px 145px !important;
    gap: 8px !important;
  }

  .gallery-item {
    border-radius: 12px !important;
  }

  .gallery-item:first-child {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  .gallery-item:nth-child(n + 6) {
    display: none !important;
  }

  .conditions-layout,
  .faq-layout {
    gap: 26px !important;
  }

  .final-cta-box {
    padding: 24px 18px !important;
    border-radius: 18px !important;
  }

  .final-cta-box h2 {
    font-size: clamp(30px, 9vw, 38px) !important;
  }
}

@media (max-width: 420px) {
  .container {
    width: calc(100% - 24px) !important;
  }

  .tour-hero-content {
    padding-top: 34px !important;
  }

  .breadcrumb {
    font-size: 9px !important;
  }

  .tour-hero .eyebrow,
  .tour-hero .eyebrow.light {
    font-size: 9px !important;
  }

  .tour-hero h1 {
    font-size: clamp(34px, 10.8vw, 44px) !important;
  }

  .hero-price-card .btn,
  .route-map-open-btn {
    width: 100% !important;
  }

  .stat-row {
    grid-template-columns: 1fr !important;
  }

  .tour-overview-photo > img {
    height: 290px !important;
  }

  .gallery-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    grid-auto-rows: 210px !important;
  }

  .gallery-item:first-child {
    grid-column: auto !important;
  }

  .gallery-item:nth-child(n + 5) {
    display: none !important;
  }

  .gallery-lightbox {
    padding: 8px !important;
  }

  .gallery-lightbox img {
    max-width: calc(100vw - 16px) !important;
    max-height: 82vh !important;
  }
}
