/* ==========================================================================
   Plantilla de viaje (tours, paquetes y caminatas)
   ========================================================================== */

/* Galería ------------------------------------------------------------------ */
.gallery { display: grid; gap: 8px; margin-top: 20px; border-radius: var(--radius); overflow: hidden; grid-template-columns: 1fr; }
.gallery__item { position: relative; padding: 0; border: 0; background: var(--c-primary-soft); overflow: hidden; cursor: zoom-in; aspect-ratio: 16 / 10; }
.gallery__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery__item:hover img { transform: scale(1.03); }
.gallery__item:not(:first-of-type) { display: none; }
.gallery__more { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: #fff; color: var(--c-heading); font-weight: 700; font-size: .8125rem; box-shadow: var(--shadow); }
.gallery__more .icon { width: 16px; height: 16px; }
@media (min-width: 900px) {
	.gallery { height: 440px; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
	.gallery__item { aspect-ratio: auto; }
	.gallery__item:not(:first-of-type) { display: block; }
	.gallery__item:first-of-type { grid-row: 1 / 3; }
	.gallery--count-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; height: auto; aspect-ratio: 1200 / 440; max-height: 480px; }
	.gallery--count-1 .gallery__item:first-of-type { grid-row: auto; }
	.gallery--count-2 { grid-template-columns: 2fr 1fr; }
	.gallery--count-2 .gallery__item:nth-of-type(2) { grid-row: 1 / 3; }
	.gallery--count-3 { grid-template-columns: 2fr 1fr; }
	.gallery--count-4 .gallery__item:nth-of-type(4) { grid-column: 2 / 4; }
}

/* Visor */
.lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 14, 10, .96); color: #fff; }
.lightbox::backdrop { background: rgba(0, 0, 0, .7); }
.lightbox[open] { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; }
.lightbox__track { grid-column: 2; list-style: none; margin: 0; padding: 0; height: 100%; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lightbox__track::-webkit-scrollbar { display: none; }
.lightbox__slide { flex: 0 0 100%; display: grid; place-items: center; padding: 48px 0; scroll-snap-align: center; }
.lightbox__slide img { max-height: calc(100vh - 120px); width: auto; object-fit: contain; border-radius: var(--radius-sm); }
.lightbox__close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.lightbox__close, .lightbox__nav { display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.28); }
.lightbox__nav--prev { grid-column: 1; justify-self: center; }
.lightbox__nav--next { grid-column: 3; justify-self: center; }
.lightbox__count { position: absolute; bottom: 14px; left: 50%; margin: 0; transform: translateX(-50%); font-size: .875rem; }
@media (max-width: 640px) { .lightbox[open] { grid-template-columns: 0 1fr 0; } .lightbox__nav { position: absolute; bottom: 8px; } .lightbox__nav--prev { left: 16px; } .lightbox__nav--next { right: 16px; } }

/* Diseño en dos columnas ---------------------------------------------------- */
.trip__layout { display: grid; gap: 32px; padding-bottom: var(--section); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .trip__layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; } }

.trip__type { margin: 0 0 6px; font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c-primary); }
.trip__badge { color: var(--c-red); }
.trip__title { margin-bottom: 20px; }

.facts { list-style: none; margin: 0 0 20px; padding: 16px; display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-soft); }
@media (min-width: 640px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.facts__item { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.facts__item .icon { grid-row: 1 / 3; width: 28px; height: 28px; color: var(--c-primary); }
.facts__label { font-size: .75rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; }
.facts__value { color: var(--c-heading); font-size: .9375rem; line-height: 1.3; }
.checklist--highlights { margin-bottom: 24px; }

.trip__description { margin-bottom: 32px; }
.trip__description.is-collapsed .trip__description-body { position: relative; max-height: 560px; overflow: hidden; }
.trip__description.is-collapsed .trip__description-body::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(rgba(255,255,255,0), #fff); }
.trip__more { margin-top: 12px; }
.panel-intro { margin-bottom: 24px; }

/* Pestañas */
.trip-tabs { scroll-margin-top: 140px; }
/* Barra fija con flechas a los lados cuando las pestañas no caben */
.trip-tabs__bar { position: sticky; top: var(--header-h); z-index: 20; display: flex; align-items: center; margin: 0 0 24px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.trip-tabs__bar[hidden] { display: none; }
/* Sin scroll-snap ni scroll-behavior en la barra: en Chrome impiden medir el LCP. El desplazamiento suave lo hace el JS. */
@media (min-width: 1100px) { .trip-tabs__bar { top: calc(var(--header-h) + 52px); } }
.admin-bar .trip-tabs__bar { top: calc(var(--header-h) + 32px); }
@media (min-width: 1100px) { .admin-bar .trip-tabs__bar { top: calc(var(--header-h) + 84px); } }
.trip-tabs__nav { position: relative; flex: 1; min-width: 0; display: flex; gap: 4px; padding: 6px; overflow-x: auto; scrollbar-width: none; }
.trip-tabs__nav::-webkit-scrollbar { display: none; }
/* Degradado que indica que hay más pestañas a ese lado */
.trip-tabs__bar::before, .trip-tabs__bar::after { content: ""; position: absolute; top: 0; bottom: 0; z-index: 1; width: 56px; pointer-events: none; opacity: 0; transition: opacity .2s; }
.trip-tabs__bar::before { left: 40px; background: linear-gradient(90deg, #fff, rgba(255,255,255,0)); }
.trip-tabs__bar::after { right: 40px; background: linear-gradient(270deg, #fff, rgba(255,255,255,0)); }
.trip-tabs__bar.has-prev::before, .trip-tabs__bar.has-next::after { opacity: 1; }
.trip-tabs__arrow { position: relative; z-index: 2; flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin: 0 2px; border: 0; border-radius: 50%; background: var(--c-primary-soft); color: var(--c-primary); transition: background-color .2s, color .2s; }
.trip-tabs__arrow:hover { background: var(--c-primary); color: #fff; }
.trip-tabs__arrow[hidden] { display: none; }
.trip-tabs__tab { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 10px; background: transparent; font-weight: 700; font-size: .8125rem; text-transform: uppercase; letter-spacing: .03em; color: var(--c-text); white-space: nowrap; transition: background-color .2s, color .2s; }
.trip-tabs__icon { width: 20px; height: 20px; color: var(--c-primary); transition: color .2s; }
.trip-tabs__tab:hover { color: var(--c-primary); background: var(--c-primary-soft); }
.trip-tabs__tab[aria-selected="true"] { background: var(--c-primary); color: #fff; }
.trip-tabs__tab[aria-selected="true"] .trip-tabs__icon { color: #fff; }
.trip-tabs__panel { margin-bottom: 40px; scroll-margin-top: 160px; }
.trip-tabs__panel:focus { outline: none; }
.trip-tabs__panel:focus-visible { outline: 2px dashed var(--c-primary-soft); outline-offset: 8px; }
.trip-tabs__heading { padding-bottom: 10px; border-bottom: 2px solid var(--c-primary-soft); }
.is-tabs .trip-tabs__panel { margin-bottom: 0; }
.is-tabs .trip-tabs__panel[hidden] { display: none; }
.is-tabs .trip-tabs__heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Itinerario */
.itinerary { list-style: none; margin: 0; padding: 0; position: relative; }
.itinerary::before { content: ""; position: absolute; left: 19px; top: 24px; bottom: 24px; width: 2px; background: var(--c-primary-soft); }
.itinerary__day { position: relative; margin-bottom: 12px; }
.itinerary__day details { border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; margin-left: 52px; }
.itinerary__title { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.itinerary__title::-webkit-details-marker { display: none; }
.itinerary__title h3 { flex: 1; margin: 0; font-size: 1.0625rem; }
.itinerary__num { position: absolute; left: 0; top: 10px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c-primary); color: #fff; font-weight: 700; box-shadow: 0 0 0 4px #fff; }
.itinerary__chevron { color: var(--c-primary); transition: transform .2s var(--ease); }
details[open] > .itinerary__title .itinerary__chevron { transform: rotate(180deg); }
.itinerary__content { padding: 0 18px 16px; }

/* Incluye / no incluye */
.includes { display: grid; gap: 24px; }
@media (min-width: 760px) { .includes { grid-template-columns: 1fr 1fr; } }
.includes__col { padding: 20px; border-radius: var(--radius); background: var(--c-primary-soft); }
.includes__col--no { background: #fdf1f2; }
.includes__col h3 { font-size: 1.0625rem; }

/* Precios */
.price-table { margin-bottom: 28px; }
.price-table__title { font-size: 1.0625rem; }
.table-scroll { overflow-x: auto; margin-bottom: 12px; border: 1px solid var(--c-border); border-radius: var(--radius); }
.price-table table { width: 100%; margin: 0; border-collapse: collapse; font-size: .9375rem; }
.price-table th, .price-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--c-border); }
.price-table thead th { background: var(--c-primary); color: #fff; font-size: .8125rem; text-transform: uppercase; letter-spacing: .04em; }
.price-table tbody tr:last-child > * { border-bottom: 0; }
.price-table tbody tr:nth-child(even) { background: var(--c-soft); }
.price-table tbody th { font-weight: 500; color: var(--c-heading); }
.price-table__price { text-align: right !important; white-space: nowrap; font-weight: 700; color: var(--c-brown); }
.price-table thead .price-table__price { color: #fff; }

/* Preguntas frecuentes */
.faq { display: grid; gap: 10px; }
.faq__item { border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; }
.faq__question { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.faq__question::-webkit-details-marker { display: none; }
.faq__question h3 { flex: 1; margin: 0; font-size: 1rem; }
.faq__icon { color: var(--c-primary); transition: transform .2s var(--ease); }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__answer { padding: 0 18px 16px; }

/* Caja de reserva */
.booking-box { padding: 24px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-lg); border-top: 4px solid var(--c-primary); }
@media (min-width: 1000px) { .trip__aside { position: relative; } .booking-box { position: sticky; top: calc(var(--header-h) + 72px); } }
.booking-box__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 18px; }
.booking-box__from { width: 100%; font-size: .8125rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; }
.booking-box__price del { color: var(--c-muted); }
.booking-box__price strong { font-size: 2rem; line-height: 1; color: var(--c-brown); }
.booking-box__pp { font-size: .875rem; color: var(--c-muted); }
.booking-box__price--ask { font-weight: 700; color: var(--c-heading); }
.booking-box__actions { display: grid; gap: 10px; margin-bottom: 18px; }
.booking-box__trust { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--c-border); display: grid; gap: 8px; font-size: .875rem; }
.booking-box__trust li { display: flex; align-items: center; gap: 8px; }
.booking-box__trust .icon { width: 18px; height: 18px; color: var(--c-primary); }

/* En móvil la caja pasa a barra fija inferior compacta */
@media (max-width: 999px) {
	.trip__aside { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; }
	.booking-box { display: flex; align-items: center; gap: 12px; padding: 10px 84px 10px 16px; border-radius: 0; border-top: 1px solid var(--c-border); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
	.booking-box__price { flex: 1; margin: 0; gap: 0 6px; }
	.booking-box__from { width: auto; font-size: .6875rem; }
	.booking-box__price strong { font-size: 1.25rem; }
	.booking-box__pp, .booking-box__price del, .booking-box__trust, .booking-box__actions .btn--whatsapp { display: none; }
	.booking-box__actions { margin: 0; }
	.booking-box__actions .btn { min-height: 42px; padding: 8px 16px; width: auto; }
	.booking-box__actions .btn .icon { display: none; }
	.single .wa-float { bottom: 76px; }
	.trip { padding-bottom: 64px; }
}

.trip__booking .form { max-width: 840px; margin-inline: auto; }
