/**
 * Página: Quienes Somos
 * Secciones: ¿Quienes somos?, Nuestra visión, Nuestro equipo (carrusel), Organigrama.
 */
.page-quienes-somos {
	padding-bottom: 3rem;
}

.qs-wrapper {
	width: calc(100% - 40px);
	max-width: var(--max-width, 1055px);
	margin: 0 auto;
}

.qs-title {
	font: 700 28px var(--font-main);
	color: #fff;
	margin: 0 0 1rem;
	letter-spacing: -0.02em;
}

.qs-title--dark {
	color: #12183b;
}

.qs-title--center {
	text-align: center;
	margin-bottom: 2rem;
}

/* ---- 1. ¿Quienes somos? ---- */
.qs-intro {
	background: #fff;
	padding: 3rem 0;
}

.qs-intro-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: center;
}

.qs-intro .qs-title {
	color: #12183b;
	margin-bottom: 0.75rem;
}

.qs-intro-lead {
	font: 700 18px/1.4 var(--font-main);
	color: #12183b;
	margin: 0;
	font-weight: 700 !important;
	font-size: 18px !important;
}

.qs-intro-body,
.qs-intro-text p {
	font-size: 15px;
	line-height: 1.6;
	color: #12183b;
	font-weight: 400;
}

.qs-intro-text p:last-child,
.qs-intro-body:last-of-type {
	margin-bottom: 0;
}

.qs-intro-graphic {
	position: absolute;
    top: 130px;
    right: 0;
}

.qs-intro-graphic img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 8px;
}

/* ---- 2. Nuestra visión ---- */
.qs-vision {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 380px;
}

.qs-vision-left {
	background: #12183b;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.qs-vision-lighthouse {
	position: relative;
	z-index: 2;
}

.qs-vision-lighthouse img {
	width: 160px;
	height: auto;
	filter: brightness(0) invert(1);
	opacity: 0.95;
}

.qs-vision-shape {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 60%;
	height: 50%;
	background: var(--color-accent, #c3ef0f);
	clip-path: polygon(0 100%, 100% 100%, 0 0);
	z-index: 1;
}

.qs-vision-right {
	background: #fff;
	display: flex;
	align-items: center;
	padding: 2.5rem 2.5rem 2.5rem 3rem;
	box-sizing: border-box;
}

.qs-vision-content p {
	margin: 0 0 1rem;
	font-size: 15px;
	line-height: 1.6;
	color: #444;
}

.qs-vision-content p:last-child {
	margin-bottom: 0;
}

/* ---- 3. Nuestro equipo / Carrusel ---- */
.qs-team {
	background: #effbff;
	padding: 3rem 0;
}

.qs-carousel {
	position: relative;
	max-width: 100%;
	margin: 3rem 0 0; /* espacio arriba para que las flechas queden sobre este margen (top negativo) */
	padding: 0 80px 0 0; /* espacio derecha para flechas */
}

.qs-carousel__viewport {
	overflow: hidden;
	touch-action: pan-y;
	cursor: grab;
}

.qs-carousel__viewport:active {
	cursor: grabbing;
}

.qs-carousel__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 2rem;
	transition: transform 0.35s ease;
	will-change: transform;
}

.qs-carousel__item {
	flex: 0 0 calc((100% - (var(--qs-visible, 1) - 1) * 2rem) / var(--qs-visible, 1));
	min-width: 0;
	display: flex;
}

/* Card bicolor: parte superior blanca (foto), parte inferior azul oscuro (texto). Altura homogénea. */
.qs-carousel__card {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 100%;
	text-align: center;
	background: #fff;
	border-radius: 12px 12px 16px 16px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(18, 24, 59, 0.08);
}

.qs-carousel__photo {
	width: 160px;
	height: 160px;
	margin: 1.25rem auto 0;
	border-radius: 50%;
	overflow: hidden;
	background: #fff;
	border: 4px solid var(--color-accent, #c3ef0f);
	box-sizing: border-box;
	flex-shrink: 0;
}

.qs-carousel__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.qs-carousel__info {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: center;
	text-align: center;
	min-height: 100px;
	background: #12183b;
	color: #fff;
	padding: 1rem 0.75rem 1.25rem;
	margin-top: 1rem;
}

.qs-carousel__name {
	font: 700 16px var(--font-main);
	color: #fff;
	margin: 0 0 0.25rem;
}

.qs-carousel__role {
	font-size: 14px;
	color: #fff;
	margin: 0;
	line-height: 1.35;
	font-weight: 400;
}

.qs-carousel__email {
	font-size: 13px;
	color: var(--color-accent, #c3ef0f);
	margin: 0.5rem 0 0;
	text-decoration: none;
	word-break: break-all;
}

.qs-carousel__email:hover {
	color: #e0ff80;
	text-decoration: underline;
}

/* Flechas: esquina superior derecha, arriba del contenedor de cards (top negativo) */
.qs-carousel__btn {
	position: absolute;
	top: -3rem;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 0;
	background: transparent;
	color: #12183b;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	line-height: 1;
	transition: color 0.2s;
	z-index: 2;
}

.qs-carousel__btn:hover:not(:disabled) {
	color: #12183b;
}

.qs-carousel__btn:disabled {
	color: #9cb3c4;
	cursor: not-allowed;
}

.qs-carousel__prev {
	left: auto;
	right: 44px;
}

.qs-carousel__next {
	right: 0;
}

.qs-carousel__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 1.5rem;
	flex-wrap: wrap;
}

.qs-carousel__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid #12183b;
	background: transparent;
	padding: 0;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
}

.qs-carousel__dot.is-active,
.qs-carousel__dot:hover {
	background: var(--color-accent, #c3ef0f);
	border-color: var(--color-accent, #c3ef0f);
}

/* Visible items: 1 en móvil, 2 en tablet, 4 en desktop (más ancho por card) */
@media (min-width: 600px) {
	.qs-carousel__list {
		--qs-visible: 2;
	}
}

@media (min-width: 900px) {
	.qs-carousel__list {
		--qs-visible: 4;
	}
}

/* ---- 4. Organigrama (imagen) ---- */
.qs-organigrama {
	background: #fff;
	padding: 3rem 0;
}

.qs-organigrama-figure {
	margin: 0;
	text-align: center;
}

.qs-organigrama-figure img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
	vertical-align: middle;
}

.qs-organigrama-swipe-hint {
	display: none;
}

/* Responsive */
@media (max-width: 900px) {
	.qs-intro-inner {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.qs-intro-graphic {
		order: -1;
		max-width: 400px;
		margin: 0 auto;
	}

	.qs-vision {
		grid-template-columns: 1fr;
		min-height: auto;
	}

	.qs-vision-left {
		min-height: 220px;
	}

	.qs-vision-right {
		padding: 2rem 20px;
	}

	.qs-carousel {
		padding-right: 70px;
		margin-top: 2.5rem;
	}

	.qs-carousel__btn {
		top: -2.5rem;
	}
}

@media (max-width: 600px) {
	.qs-title {
		font-size: 22px;
	}

	.qs-title--center {
		margin-bottom: 1.5rem;
	}

	.qs-intro,
	.qs-team,
	.qs-organigrama {
		padding: 2rem 0;
	}

	.qs-intro-graphic {
		display: none;
	}

	/* Organigrama: imagen a la mitad, swipe sin barras, hint de mano */
	.qs-organigrama-figure {
		position: relative;
		overflow-x: auto;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		max-height: 75vh;
		width: 100%;
		text-align: left;
		touch-action: pan-x pan-y;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}

	.qs-organigrama-figure::-webkit-scrollbar {
		display: none;
	}

	.qs-organigrama-figure img {
		min-width: 720px;
		width: auto;
		height: auto;
		display: block;
		margin: 0;
	}

	/* Animación: mano deslizando (solo móvil) */
	.qs-organigrama-swipe-hint {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0.35rem;
		position: absolute;
		bottom: 12px;
		left: 50%;
		transform: translateX(-50%);
		z-index: 2;
		font-size: 13px;
		color: #12183b;
		background: rgba(255, 255, 255, 0.95);
		padding: 8px 14px;
		border-radius: 24px;
		box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
		pointer-events: none;
		animation: qs-swipe-hint-fade 4s ease-in-out forwards;
	}

	.qs-organigrama-swipe-hint__icon {
		display: inline-block;
		font-size: 20px;
		animation: qs-swipe-hand 1.2s ease-in-out 2;
	}

	@keyframes qs-swipe-hand {
		0%, 100% { transform: translateX(0) rotate(-20deg); }
		50% { transform: translateX(24px) rotate(-10deg); }
	}

	@keyframes qs-swipe-hint-fade {
		0%, 60% { opacity: 1; }
		100% { opacity: 0; visibility: hidden; }
	}

	.qs-carousel__btn {
		display: none;
	}

	.qs-carousel {
		padding-right: 0;
	}

	.qs-carousel__item {
		flex: 0 0 100%;
	}

	.qs-carousel__photo {
		width: 140px;
		height: 140px;
	}

	.qs-carousel {
		margin-top: 2.5rem;
	}
}
