/**
 * tours.css — Estilos de la Sección Top Tours & Treks Machu Picchu.
 *
 * Carrusel interactivo de paquetes turísticos con badges, metadatos
 * y botones CTA optimizados para Modo Claro y Modo Oscuro.
 *
 * @package Machupicchu_Travel_Narcy
 * @since   1.0.0
 */

/* -------------------------------------------------------------------------
 * 1. Contenedor Principal y Sección
 * ---------------------------------------------------------------------- */
.section-tours {
	position: relative;
	background-color: var(--mtn-bg-alt, #f8faf8);
	padding: clamp(60px, 7vw, 96px) 0;
	transition: background-color 0.3s ease;
	overflow: hidden;
}

.tours-container {
	max-width: var(--mtn-header-max, 1600px);
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 48px);
}

/* -------------------------------------------------------------------------
 * 2. Encabezado de la Sección
 * ---------------------------------------------------------------------- */
.tours-header {
	max-width: 900px;
	margin: 0 auto clamp(36px, 5vw, 54px);
	text-align: center;
}

.tours-main-title {
	font-family: var(--mtn-font-heading);
	font-size: clamp(26px, 3.2vw, 40px);
	font-weight: 700;
	color: var(--mtn-heading, #142016);
	line-height: 1.25;
	margin: 0 0 16px;
	letter-spacing: -0.5px;
	transition: color 0.3s ease;
}

.tours-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 auto 20px;
	width: 120px;
}

.tours-divider-line {
	flex: 1;
	height: 1px;
	background: #dc3545;
	opacity: 0.5;
}

.tours-divider-dash {
	width: 24px;
	height: 3.5px;
	background: #b91c1c;
	border-radius: 2px;
}

.tours-description {
	font-family: var(--mtn-font-body);
	font-size: clamp(14px, 1.1vw, 15.5px);
	line-height: 1.65;
	color: var(--mtn-muted, #5b665b);
	margin: 0 auto;
	max-width: 840px;
	transition: color 0.3s ease;
}

/* -------------------------------------------------------------------------
 * 3. Envoltura del Carrusel y Botones de Navegación
 * ---------------------------------------------------------------------- */
.tours-carousel-wrapper {
	position: relative;
	padding-inline: 4px;
}

.tours-nav-btn {
	position: absolute;
	top: 38%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #1a7a3c;
	color: #ffffff;
	border: 2px solid #ffffff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
	transition: all 0.25s ease;
	outline: none;
}

.tours-nav-btn:hover,
.tours-nav-btn:focus-visible {
	background: #14612f;
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 6px 18px rgba(26, 122, 60, 0.45);
}

.tours-prev {
	left: -14px;
}

.tours-next {
	right: -14px;
}

/* -------------------------------------------------------------------------
 * 4. Pista de Tarjetas (Track)
 * ---------------------------------------------------------------------- */
.tours-track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 48px) / 3);
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 12px 4px 24px;
	scroll-behavior: smooth;
}

.tours-track::-webkit-scrollbar {
	display: none;
}

/* -------------------------------------------------------------------------
 * 5. Tarjeta de Tour (Tour Card)
 * ---------------------------------------------------------------------- */
.tour-card {
	background: var(--mtn-bg-card, #ffffff);
	border: 1px solid var(--mtn-border, #e8ebe8);
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	scroll-snap-align: start;
	transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.tour-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
	border-color: rgba(26, 122, 60, 0.3);
}

/* Media de la tarjeta */
.tour-card-media {
	position: relative;
	width: 100%;
	height: 230px;
	overflow: hidden;
	background-color: #1a261e;
}

.tour-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-card:hover .tour-img {
	transform: scale(1.06);
}

/* Badge decorativo */
.tour-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	background: #f2c230;
	color: #181c18;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	padding: 5px 12px;
	border-radius: 5px;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
	display: flex;
	align-items: center;
	gap: 5px;
	z-index: 2;
}

.badge-star {
	color: #181c18;
	font-size: 12px;
	line-height: 1;
}

/* -------------------------------------------------------------------------
 * 6. Cuerpo de la Tarjeta
 * ---------------------------------------------------------------------- */
.tour-card-body {
	padding: 22px 20px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.tour-card-title {
	font-family: var(--mtn-font-heading);
	font-size: 18px;
	font-weight: 700;
	color: var(--mtn-heading, #142016);
	line-height: 1.35;
	margin: 0 0 10px;
	min-height: 48px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.3s ease;
}

.tour-card-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.tour-card-title a:hover {
	color: var(--mtn-green, #1a7a3c);
}

.tour-card-excerpt {
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--mtn-muted, #5b665b);
	margin: 0 0 18px;
	min-height: 44px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.3s ease;
}

/* -------------------------------------------------------------------------
 * 7. Barra de Metadatos (Pills Flexibles)
 * ---------------------------------------------------------------------- */
.tour-meta-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px 12px;
	padding: 10px 12px;
	background: var(--mtn-bg, #ffffff);
	border: 1px solid var(--mtn-border-light, #edf0ed);
	border-radius: 8px;
	margin-top: auto;
	margin-bottom: 18px;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.tour-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--mtn-text, #2c352e);
	white-space: nowrap;
	line-height: 1.2;
	transition: color 0.3s ease;
}

.tour-meta-item .mtn-icon {
	color: var(--mtn-green, #1a7a3c);
	flex-shrink: 0;
}

/* -------------------------------------------------------------------------
 * 8. Botón CTA Ver Itinerario
 * ---------------------------------------------------------------------- */
.tour-btn-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 18px;
	background: var(--mtn-orange, #f4611e);
	color: #ffffff !important;
	font-weight: 700;
	font-size: 13.5px;
	border-radius: 8px;
	text-decoration: none;
	transition: all 0.25s ease;
}

.tour-btn-cta:hover,
.tour-btn-cta:focus-visible {
	background: var(--mtn-orange-dark, #dc4f10);
	color: #ffffff !important;
	box-shadow: 0 4px 14px rgba(244, 97, 30, 0.4);
}

.btn-arrow {
	transition: transform 0.2s ease;
	font-size: 16px;
	line-height: 1;
}

.tour-btn-cta:hover .btn-arrow {
	transform: translateX(4px);
}

/* -------------------------------------------------------------------------
 * 9. Modo Oscuro
 * ---------------------------------------------------------------------- */
[data-theme="dark"] .section-tours,
.dark-mode .section-tours {
	background-color: var(--mtn-bg-alt, #161e19);
}

[data-theme="dark"] .tour-card,
.dark-mode .tour-card {
	background-color: var(--mtn-bg-card, #18221b);
	border-color: var(--mtn-border, #233126);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .tour-card:hover,
.dark-mode .tour-card:hover {
	border-color: var(--mtn-green, #3ec774);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .tour-meta-bar,
.dark-mode .tour-meta-bar {
	background-color: var(--mtn-bg, #101512);
	border-color: var(--mtn-border, #233126);
}

[data-theme="dark"] .tours-nav-btn,
.dark-mode .tours-nav-btn {
	border-color: #18221b;
}

/* -------------------------------------------------------------------------
 * 10. Responsividad
 * ---------------------------------------------------------------------- */
@media (max-width: 1080px) {
	.tours-track {
		grid-auto-columns: calc((100% - 24px) / 2);
	}
}

@media (max-width: 720px) {
	.tours-track {
		grid-auto-columns: 88%;
		gap: 16px;
	}

	.tours-prev {
		left: -6px;
	}

	.tours-next {
		right: -6px;
	}
}
