/* =============================================================
   Single Tour Page — gallery, tabs, itinerary timeline,
   included/excluded lists, FAQ accordion, booking sidebar.
   Loaded alongside frontend.css, shares its variables/reset.
   ============================================================= */

.tib-single-layout {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 48px;
	align-items: start;
	margin-top: 8px;
}

.tib-single-main { min-width: 0; }

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

.tib-single-gallery {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 12px !important;
	margin-bottom: 36px;
}
.tib-gallery-item {
	height: 140px;
	border-radius: 12px;
	background-size: cover !important;
	background-position: center !important;
	background-color: #eee;
}
.tib-gallery-item-large {
	grid-column: span 2 !important;
	grid-row: span 2 !important;
	height: 292px;
}

@media (max-width: 640px) {
	.tib-single-gallery { grid-template-columns: repeat(2, 1fr) !important; }
	.tib-gallery-item-large { grid-column: span 2 !important; grid-row: span 1 !important; height: 140px; }
}

/* ---------- Scroll reveal ---------- */

[data-reveal] {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1);
}
[data-reveal].is-revealed {
	opacity: 1;
	transform: translateY(0);
}

/* ---------- Gallery (buttons, for lightbox trigger + a11y) ---------- */

.tib-single-gallery button.tib-gallery-item {
	all: revert;
	display: block !important;
	width: 100% !important;
	height: 140px !important;
	border: none !important;
	border-radius: 12px !important;
	background-size: cover !important;
	background-position: center !important;
	background-color: #eee !important;
	cursor: zoom-in;
	padding: 0 !important;
	overflow: hidden;
	transition: transform .3s ease, filter .3s ease;
}
.tib-single-gallery button.tib-gallery-item:hover {
	transform: scale(1.02);
	filter: brightness(1.05);
}
.tib-single-gallery button.tib-gallery-item-large { height: 292px !important; }

@media (max-width: 640px) {
	.tib-single-gallery button.tib-gallery-item-large { height: 140px !important; }
}

/* ---------- Lightbox ---------- */

.tib-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(10,10,12,0.92);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
}
.tib-lightbox.is-open { opacity: 1; visibility: visible; }

.tib-lightbox-img {
	max-width: 88vw;
	max-height: 82vh;
	border-radius: 8px;
	transition: opacity .18s ease;
	box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.tib-lightbox-close,
.tib-lightbox-nav {
	position: absolute;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: rgba(255,255,255,0.1) !important;
	border: none !important;
	color: #fff !important;
	border-radius: 50% !important;
	cursor: pointer;
	transition: background .15s ease;
}
.tib-lightbox-close:hover,
.tib-lightbox-nav:hover { background: rgba(255,255,255,0.22) !important; }

.tib-lightbox-close {
	top: 24px; right: 24px;
	width: 40px; height: 40px;
	font-size: 22px !important;
}
.tib-lightbox-nav {
	top: 50%;
	transform: translateY(-50%);
	width: 48px; height: 48px;
}
.tib-lightbox-prev { left: 20px; }
.tib-lightbox-next { right: 20px; }

@media (max-width: 640px) {
	.tib-lightbox-nav { width: 40px; height: 40px; }
	.tib-lightbox-prev { left: 8px; }
	.tib-lightbox-next { right: 8px; }
}

/* ---------- Sections ---------- */

.tib-single-section {
	background: var(--tib-cream);
	border: 1px solid var(--tib-border);
	border-radius: 18px;
	padding: 32px;
	margin-bottom: 32px;
	box-shadow: 0 1px 3px rgba(17,19,24,0.03);
}
.tib-single-section:last-child { margin-bottom: 0; }
.tib-similar-section { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin-top: 48px !important; }

.tib-single-section h2 {
	font-size: 22px !important;
	font-weight: 700 !important;
	color: var(--tib-ink) !important;
	margin: 0 0 16px !important;
	position: relative;
	padding-left: 14px !important;
}
.tib-single-section h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: 3px;
	bottom: 3px;
	width: 4px;
	border-radius: 2px;
	background: #d5c38d;
}
.tib-single-section h3 {
	font-size: 16px !important;
	font-weight: 700 !important;
	color: var(--tib-ink) !important;
	margin: 0 0 14px !important;
}

.tib-single-body {
	font-size: 15.5px !important;
	line-height: 1.75 !important;
	color: var(--tib-ink) !important;
}
.tib-single-body p { margin: 0 0 16px !important; }
.tib-single-body p:last-child { margin-bottom: 0 !important; }

/* ---------- Checklists (highlights / included / excluded) ---------- */

.tib-check-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.tib-check-list li {
	display: flex !important;
	align-items: flex-start !important;
	gap: 10px;
	font-size: 14.5px !important;
	line-height: 1.5 !important;
	color: var(--tib-ink) !important;
	opacity: 0;
	transform: translateX(-16px);
	transition: opacity .5s ease, transform .5s ease;
}
[data-reveal].is-revealed .tib-check-list li { opacity: 1; transform: translateX(0); }
.tib-check-list li:nth-child(1) { transition-delay: .05s; }
.tib-check-list li:nth-child(2) { transition-delay: .13s; }
.tib-check-list li:nth-child(3) { transition-delay: .21s; }
.tib-check-list li:nth-child(4) { transition-delay: .29s; }
.tib-check-list li:nth-child(5) { transition-delay: .37s; }
.tib-check-list li:nth-child(6) { transition-delay: .45s; }
.tib-check-list li:nth-child(n+7) { transition-delay: .5s; }

.tib-check-list svg { flex-shrink: 0; margin-top: 1px; }
.tib-check-list svg path {
	stroke-dasharray: 26;
	stroke-dashoffset: 26;
	transition: stroke-dashoffset .45s ease .15s;
}
[data-reveal].is-revealed .tib-check-list li svg path { stroke-dashoffset: 0; }
.tib-check-list-included svg { color: var(--tib-success); }
.tib-check-list-excluded svg { color: #b0b3b9; }
.tib-check-list-excluded li { color: var(--tib-muted) !important; }

.tib-include-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
}
@media (max-width: 640px) {
	.tib-include-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Tabs (Important Info / Cancellation) ---------- */

.tib-tabs-nav {
	position: relative;
	display: flex;
	gap: 4px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--tib-border);
}
.tib-tab-btn {
	background: none !important;
	border: none !important;
	border-bottom: 2px solid transparent !important;
	padding: 10px 4px !important;
	margin-right: 24px;
	font-family: inherit !important;
	font-size: 14.5px !important;
	font-weight: 600 !important;
	color: var(--tib-muted) !important;
	cursor: pointer;
	transition: color .15s ease;
	position: relative;
	z-index: 1;
}
.tib-tab-btn.is-active { color: var(--tib-ink) !important; }
.tib-tab-indicator {
	position: absolute;
	bottom: -1px;
	left: 0;
	height: 2px;
	background: var(--tib-ink);
	transition: transform .25s cubic-bezier(.4,0,.2,1), width .25s cubic-bezier(.4,0,.2,1);
}

.tib-tab-panel { display: none; animation: tib-fade-up .25s ease; }
.tib-tab-panel.is-active { display: block; }

.tib-info-list {
	margin: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.tib-info-list dt {
	font-size: 13px !important;
	font-weight: 700 !important;
	color: var(--tib-ink) !important;
	margin: 0 0 3px !important;
}
.tib-info-list dd {
	font-size: 14px !important;
	color: var(--tib-muted) !important;
	margin: 0 !important;
	line-height: 1.5 !important;
}

.tib-cancel-text {
	font-size: 14.5px !important;
	line-height: 1.7 !important;
	color: var(--tib-muted) !important;
	margin: 0 !important;
}

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

.tib-timeline { position: relative; padding-left: 4px; }
.tib-timeline-item {
	position: relative;
	padding-left: 28px;
	padding-bottom: 28px;
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .5s ease, transform .5s ease;
}
.tib-timeline-item:last-child { padding-bottom: 0; }
[data-reveal].is-revealed .tib-timeline-item { opacity: 1; transform: translateY(0); }
.tib-timeline-item:nth-child(1) { transition-delay: .05s; }
.tib-timeline-item:nth-child(2) { transition-delay: .18s; }
.tib-timeline-item:nth-child(3) { transition-delay: .31s; }
.tib-timeline-item:nth-child(4) { transition-delay: .44s; }
.tib-timeline-item:nth-child(n+5) { transition-delay: .55s; }

.tib-timeline-item::before {
	content: "";
	position: absolute;
	left: 5px;
	top: 18px;
	bottom: -4px;
	width: 1px;
	background: var(--tib-border);
	transform-origin: top;
	transform: scaleY(0);
	transition: transform .5s ease .2s;
}
.tib-timeline-item:last-child::before { display: none; }
[data-reveal].is-revealed .tib-timeline-item::before { transform: scaleY(1); }

.tib-timeline-marker {
	position: absolute;
	left: 0;
	top: 4px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--tib-warm);
	border: 3px solid #fff;
	box-shadow: 0 0 0 1px var(--tib-warm-soft);
	transform: scale(0);
	transition: transform .4s cubic-bezier(.34,1.56,.64,1) .1s;
}
[data-reveal].is-revealed .tib-timeline-item .tib-timeline-marker { transform: scale(1); }

.tib-timeline-time {
	font-size: 12px !important;
	font-weight: 700 !important;
	color: var(--tib-muted) !important;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.tib-timeline-content h4 {
	font-size: 16px !important;
	font-weight: 700 !important;
	color: var(--tib-ink) !important;
	margin: 4px 0 6px !important;
}
.tib-timeline-content p {
	font-size: 14px !important;
	line-height: 1.55 !important;
	color: var(--tib-muted) !important;
	margin: 0 !important;
}

/* ---------- FAQ accordion ---------- */

.tib-accordion { display: flex; flex-direction: column; }
.tib-accordion-item { border-bottom: 1px solid var(--tib-border); }
.tib-accordion-item:first-child { border-top: 1px solid var(--tib-border); }

.tib-accordion-trigger {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	width: 100% !important;
	background: none !important;
	border: none !important;
	padding: 18px 4px !important;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	color: var(--tib-ink) !important;
	text-align: left;
	cursor: pointer;
}
.tib-accordion-trigger svg { flex-shrink: 0; transition: transform .2s ease; color: var(--tib-muted); }
.tib-accordion-item.is-open .tib-accordion-trigger svg { transform: rotate(180deg); }

.tib-accordion-panel {
	max-height: 0;
	overflow: hidden;
	transition: max-height .25s ease;
}
.tib-accordion-panel p {
	font-size: 14px !important;
	line-height: 1.6 !important;
	color: var(--tib-muted) !important;
	margin: 0 0 18px !important;
	padding-right: 24px;
}

/* ---------- Booking sidebar ---------- */

.tib-single-sidebar { position: sticky; top: 24px; }

.tib-booking-card {
	background: #FAFAFA;
	border: 1px solid var(--tib-border);
	border-radius: 16px;
	padding: 24px;
}

.tib-booking-price { margin-bottom: 18px; }
.tib-booking-price-row {
	display: flex;
	align-items: baseline;
	gap: 10px;
}
.tib-booking-price-row strong { font-size: 30px !important; font-weight: 800 !important; color: var(--tib-ink) !important; }
.tib-booking-original-price {
	font-size: 16px !important;
	color: #b0b3b9 !important;
	text-decoration: line-through;
}

.tib-single-cta {
	width: 100% !important;
	padding: 13px !important;
	font-size: 14.5px !important;
	background: linear-gradient(135deg, var(--tib-warm), var(--tib-warm-dark)) !important;
	border: none !important;
}
.tib-single-cta:hover { background: var(--tib-warm-dark) !important; }

.tib-bokun-widget { margin-bottom: 4px; position: relative; min-height: 40px; }

.tib-bokun-skeleton {
	display: flex;
	flex-direction: column;
	transition: opacity .3s ease, visibility .3s ease;
}
.tib-bokun-skeleton.is-hidden { opacity: 0; visibility: hidden; height: 0; overflow: hidden; }
.tib-skeleton-line {
	display: block;
	height: 12px;
	border-radius: 4px;
	background: linear-gradient(90deg, #ececec 25%, #f5f5f5 37%, #ececec 63%);
	background-size: 400% 100%;
	animation: tib-skeleton-shimmer 1.4s ease infinite;
}
.tib-skeleton-hint {
	display: block;
	font-size: 12px;
	color: var(--tib-muted);
	margin-top: 10px;
	text-align: center;
}
@keyframes tib-skeleton-shimmer {
	0% { background-position: 100% 50%; }
	100% { background-position: 0 50%; }
}

.tib-booking-facts {
	list-style: none !important;
	margin: 20px 0 0 !important;
	padding: 20px 0 0 !important;
	border-top: 1px solid var(--tib-border);
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.tib-booking-facts li {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	font-size: 13.5px !important;
}
.tib-booking-facts li span { color: var(--tib-muted) !important; }
.tib-booking-facts li strong { color: var(--tib-ink) !important; font-weight: 600 !important; }

@keyframes tib-fade-up {
	from { opacity: 0; transform: translateY(4px); }
	to   { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 900px) {
	.tib-single-layout { grid-template-columns: 1fr; }
	.tib-single-sidebar { position: static; order: -1; margin-bottom: 8px; }
}

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

.tib-mobile-book-bar {
	display: none;
	position: fixed;
	left: 0; right: 0; bottom: 0;
	background: #fff;
	border-top: 1px solid var(--tib-border);
	box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
	padding: 14px 20px;
	z-index: 9990;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	transform: translateY(100%);
	transition: transform .3s cubic-bezier(.34,1.4,.64,1);
}
.tib-mobile-book-bar.is-visible { transform: translateY(0); }
.tib-mobile-book-bar-price { display: flex; flex-direction: column; }
.tib-mobile-book-bar-price strong { font-size: 18px !important; color: var(--tib-ink) !important; font-weight: 800 !important; }
.tib-mobile-book-bar .tib-add-btn {
	padding: 11px 22px !important;
	background: linear-gradient(135deg, var(--tib-warm), var(--tib-warm-dark)) !important;
	border: none !important;
}

@media (max-width: 900px) {
	.tib-mobile-book-bar { display: flex; }
	.tib-single-tour { padding-bottom: 90px; }
}

/* =============================================================
   Continuous "alive" motion — subtle, looping animations layered
   on top of the one-time scroll reveals, so the page keeps some
   life to it instead of going still once everything's loaded.
   ============================================================= */

/* Hero photo: slow Ken Burns drift */
.tib-single-image { overflow: hidden; }
.tib-single-image img {
	animation: tib-kenburns 22s ease-in-out infinite alternate;
}
@keyframes tib-kenburns {
	from { transform: scale(1) translate(0, 0); }
	to   { transform: scale(1.07) translate(-1%, -1%); }
}

/* Timeline markers: soft radar pulse, once each step has revealed */
.tib-timeline-marker { position: absolute; z-index: 1; }
.tib-timeline-marker::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid var(--tib-warm);
	opacity: 0;
}
[data-reveal].is-revealed .tib-timeline-item .tib-timeline-marker::after {
	animation: tib-marker-pulse 2.6s ease-out infinite;
}
.tib-timeline-item:nth-child(1) .tib-timeline-marker::after { animation-delay: .3s; }
.tib-timeline-item:nth-child(2) .tib-timeline-marker::after { animation-delay: .5s; }
.tib-timeline-item:nth-child(3) .tib-timeline-marker::after { animation-delay: .7s; }
.tib-timeline-item:nth-child(4) .tib-timeline-marker::after { animation-delay: .9s; }
.tib-timeline-item:nth-child(n+5) .tib-timeline-marker::after { animation-delay: 1.1s; }
@keyframes tib-marker-pulse {
	0%   { transform: scale(.6); opacity: .55; }
	70%  { transform: scale(1.9); opacity: 0; }
	100% { transform: scale(1.9); opacity: 0; }
}

/* Booking CTA: gentle breathing glow to draw the eye */
.tib-single-cta,
.tib-mobile-book-bar .tib-add-btn,
[data-scroll-to-booking] {
	animation: tib-cta-breathe 2.8s ease-in-out infinite;
}
@keyframes tib-cta-breathe {
	0%, 100% { box-shadow: 0 0 0 0 rgba(22,24,29,0.18); }
	50%      { box-shadow: 0 0 0 7px rgba(22,24,29,0); }
}

/* Price: a light sweep passes over it every few seconds */
.tib-booking-price-row strong {
	position: relative;
	display: inline-block;
	overflow: hidden;
}
.tib-booking-price-row strong::after {
	content: "";
	position: absolute;
	top: 0; left: -60%;
	width: 40%;
	height: 100%;
	background: linear-gradient(115deg, transparent, rgba(255,255,255,0.75), transparent);
	animation: tib-price-shine 4.5s ease-in-out infinite;
}
@keyframes tib-price-shine {
	0%   { left: -60%; }
	18%  { left: 130%; }
	100% { left: 130%; }
}

@media (prefers-reduced-motion: reduce) {
	.tib-single-image img,
	.tib-timeline-marker::after,
	.tib-single-cta,
	.tib-mobile-book-bar .tib-add-btn,
	[data-scroll-to-booking],
	.tib-booking-price-row strong::after {
		animation: none !important;
	}
}

/* ---------- Trust badge (near title) ---------- */

.tib-trust-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 999px;
	padding: 6px 14px;
	margin-bottom: 16px;
}
.tib-trust-label { font-size: 12.5px !important; font-weight: 700 !important; color: #15803d !important; }
.tib-trust-badge .tib-stars { color: #f5b400; }
.tib-trust-badge strong { font-size: 13.5px !important; color: var(--tib-ink) !important; font-weight: 700 !important; }
.tib-trust-count { font-size: 12.5px !important; color: var(--tib-muted) !important; }

.tib-stars { display: inline-flex; gap: 1px; }

/* ---------- Meeting point ---------- */

.tib-meeting-point {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	color: var(--tib-ink);
	font-size: 14.5px;
}
.tib-meeting-point svg { flex-shrink: 0; color: var(--tib-warm); }
.tib-meeting-map-link {
	display: inline-flex !important;
	align-items: center !important;
	background: none !important;
	color: var(--tib-ink) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	text-decoration: underline !important;
	margin-left: auto;
}

/* ---------- Reviews ---------- */

.tib-reviews-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 22px;
}
.tib-reviews-avg {
	display: flex;
	align-items: center;
	gap: 8px;
}
.tib-reviews-avg strong { font-size: 20px !important; color: var(--tib-ink) !important; font-weight: 800 !important; }
.tib-reviews-avg .tib-stars { color: #f5b400; }
.tib-reviews-avg span { font-size: 13px !important; color: var(--tib-muted) !important; }

.tib-review-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}
@media (max-width: 640px) {
	.tib-review-grid { grid-template-columns: 1fr; }
}

.tib-review-card {
	background: #f9fafb;
	border: 1px solid var(--tib-border);
	border-radius: 12px;
	padding: 18px;
}
.tib-review-top {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.tib-review-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--tib-warm), var(--tib-warm-dark));
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	flex-shrink: 0;
}
.tib-review-name { font-size: 13.5px !important; font-weight: 700 !important; color: var(--tib-ink) !important; margin: 0 !important; }
.tib-review-date { font-size: 12px !important; color: var(--tib-muted) !important; margin: 2px 0 0 !important; }
.tib-review-card .tib-stars { color: #f5b400; margin-bottom: 8px; }
.tib-review-text { font-size: 13.5px !important; line-height: 1.55 !important; color: var(--tib-ink) !important; margin: 0 !important; }

/* ---------- Similar tours ---------- */

.tib-similar-section { border-bottom: none !important; }
.tib-similar-grid { margin-top: 4px !important; }
