/* =========================================
   XSCROLL - ESTILOS GENERALES
========================================= */
.xscroll {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.xscroll-content {
	width: 100%;
	margin: 0 auto;
	padding: 4rem 9rem;
	box-sizing: border-box;
}

.xscroll-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	margin-bottom: 3rem;
}

.xscroll-nav a {
	cursor: pointer;
	font-weight: 600;
	color: rgb(var(--c2) / 0.5);
	transition: color 0.3s ease;
}

.xscroll-nav a.is-active,
.xscroll-nav a:hover {
	color: rgb(var(--c2) / 1);
}

.xscroll-list {
	display: flex;
	gap: 1.5rem;
	width: 100%;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.xscroll-list::-webkit-scrollbar {
	display: none;
}

/* CADA TARJETA DEBE SER RELATIVE PARA CONTENER ELEMENTOS ABSOLUTOS INTERNOS */
.xscroll-list > li {
	flex: 0 0 calc(33.333% - 1rem);
	min-width: 320px;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	position: relative; 
}

.xscroll-list figure {
	width: 100%;
	margin: 0;
	overflow: hidden;
	position: relative;
}

.xscroll-list img,
.xscroll-list video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* =========================================
   ESTRUCTURA DE TEXTOS (.artxt)
   Por defecto: Debajo de la foto
========================================= */
.xscroll-list .artxt {
	width: 100%;
	position: static;
	box-sizing: border-box;
}

.xscroll-list .artxt dt h2 { 
	margin: 0 0 0.5rem; 
	font-size: 1.25rem; 
	font-weight: bold; 
	white-space: normal;
	word-break: normal;
	overflow-wrap: break-word;
}

.xscroll-list .artxt dt h4 { 
	margin: 0; 
	font-size: 1rem; 
	opacity: 0.8; 
	font-weight: normal; 
}

.xscroll-list .artxt dd p { 
	margin: 1rem 0 0; 
	line-height: 1.5; 
}


/* =========================================
   MODO OVERLAY (Texto SOBRE la foto)
   Añade la clase .is-overlay al <li> para activarlo
========================================= */
.xscroll-list > li.is-overlay figure {
	height: 100%;
	min-height: 480px;
}

.xscroll-list > li.is-overlay figure::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
	z-index: 1;
}

.xscroll-list > li.is-overlay .artxt {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: 2rem;
	box-sizing: border-box;
	z-index: 2;
	color: #fff;
}

.xscroll-list > li.is-overlay .artxt dt h4 {
	opacity: 0.9;
}


/* =========================================
   RESPONSIVE MÓVIL (< 767px)
========================================= */
@media (max-width: 767px) {
	.xscroll-content {
		padding: 2.5rem 1rem;
	}

	.xscroll-nav {
		display: none;
	}

	.xscroll-list {
		display: flex;
		flex-direction: row;
		gap: 1rem;
		padding: 0;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		
		/* Touch-action y scroll suave específicos para móvil */
		touch-action: pan-x pan-y;
		-webkit-overflow-scrolling: touch;
	}

	.xscroll-list > li {
		flex: 0 0 82vw;
		min-width: 280px;
		max-width: 340px;
		scroll-snap-align: start;
	}
}