/**
 * Carrusel de noticias para el sitio público (shortcode [bpc_noticias_carrusel]).
 * Variables propias para que sea fácil re-tematizar sin tocar el panel.
 */

.bpc-noticias-carrusel {
	--bpc-car-accent: #4F46E5;
	--bpc-car-accent-2: #06B6D4;
	--bpc-car-texto: #1F2937;
	--bpc-car-texto-suave: #6B7280;
	--bpc-car-superficie: #FFFFFF;
	--bpc-car-borde: rgba(15, 23, 42, 0.08);
	--bpc-car-radius: 16px;
	--bpc-car-gap: 20px;
	--bpc-car-sombra: 0 10px 30px rgba(15, 23, 42, 0.10);

	box-sizing: border-box;
	max-width: 100%;
	margin: 0 auto;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.bpc-noticias-carrusel *,
.bpc-noticias-carrusel *::before,
.bpc-noticias-carrusel *::after {
	box-sizing: border-box;
}

/* Tamaño base de los íconos (bpc_icon()). Estas reglas normalmente viven
   en panel.css, pero panel.css solo se carga dentro del panel de
   administración — nunca en el sitio público. Sin esto, los SVG de los
   botones prev/next se renderizan a su tamaño por defecto (mucho más
   grandes de lo esperado). */
.bpc-icon { width: 20px; height: 20px; flex-shrink: 0; }
.bpc-icon--sm { width: 16px; height: 16px; }
.bpc-icon--lg { width: 26px; height: 26px; }

.bpc-noticias-carrusel__vacio {
	color: var(--bpc-car-texto-suave, #6B7280);
	font-family: 'Poppins', sans-serif;
	text-align: center;
	padding: 24px;
}

.bpc-noticias-carrusel__viewport {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
}

.bpc-noticias-carrusel__track {
	display: flex;
	gap: var(--bpc-car-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 6px 4px 18px;
	flex: 1 1 auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.bpc-noticias-carrusel__track::-webkit-scrollbar {
	display: none;
}

.bpc-noticias-carrusel__slide {
	scroll-snap-align: start;
	flex: 0 0 clamp(230px, 80vw, 300px);
	background: var(--bpc-car-superficie);
	border: 1px solid var(--bpc-car-borde);
	border-radius: var(--bpc-car-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	box-shadow: var(--bpc-car-sombra);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bpc-noticias-carrusel__slide:hover,
.bpc-noticias-carrusel__slide:focus-visible {
	transform: translateY(-6px);
	box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.bpc-noticias-carrusel__imagen {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: linear-gradient(135deg, var(--bpc-car-accent), var(--bpc-car-accent-2));
}

.bpc-noticias-carrusel__imagen img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.bpc-noticias-carrusel__slide:hover .bpc-noticias-carrusel__imagen img {
	transform: scale(1.06);
}

.bpc-noticias-carrusel__imagen-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.85);
}

.bpc-noticias-carrusel__imagen-placeholder svg {
	width: 34px;
	height: 34px;
}

.bpc-noticias-carrusel__contenido {
	padding: 16px 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bpc-noticias-carrusel__fecha {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--bpc-car-accent);
}

.bpc-noticias-carrusel__titulo {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--bpc-car-texto);
}

.bpc-noticias-carrusel__extracto {
	margin: 4px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--bpc-car-texto-suave);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bpc-noticias-carrusel__nav {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 999px;
	border: 1px solid var(--bpc-car-borde);
	background: var(--bpc-car-superficie);
	box-shadow: var(--bpc-car-sombra);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--bpc-car-texto);
	transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.bpc-noticias-carrusel__nav:hover {
	background: var(--bpc-car-accent);
	color: #fff;
	transform: scale(1.05);
}

.bpc-noticias-carrusel__nav:disabled {
	opacity: 0.35;
	cursor: default;
	transform: none;
}

.bpc-noticias-carrusel__nav .bpc-icon--flip {
	transform: rotate(180deg);
}

.bpc-noticias-carrusel__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 4px;
}

.bpc-noticias-carrusel__dot {
	width: 8px;
	height: 8px;
	border-radius: 999px;
	border: none;
	background: var(--bpc-car-borde);
	cursor: pointer;
	padding: 0;
	transition: width 0.25s ease, background 0.25s ease;
}

.bpc-noticias-carrusel__dot.is-active {
	width: 26px;
	background: linear-gradient(90deg, var(--bpc-car-accent), var(--bpc-car-accent-2));
}

@media (max-width: 560px) {
	.bpc-noticias-carrusel__nav {
		display: none;
	}
}
