/* ── Wrapper principal: rompe el container de Elementor para que los
   fondos de cada grupo lleguen al borde del viewport ── */
.vts-equipo {
	width: 100vw;
	margin-left: calc(50% - 50vw);
}

/* ── Encabezado ── */
.vts-equipo__header {
	background-color: #ACBFCE;
	padding: 60px 0 0 0;
}

.vts-equipo__header-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 10px;
}

.vts-equipo__heading {
	display: inline-block;
	padding: 4px 0 4px 10px;
	font-family: "Inter Tight", sans-serif;
	font-size: clamp(17px, 1.65vw + 5.24px, 29px);
	font-weight: 500;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: #FFFFFF;
	background-color: #000000;
	margin: 0;
}

/* ── Grupos por nivel ── */
.vts-equipo__grupo {
	padding: 0 0 60px 0;
	overflow: hidden; /* evita que las fotos desbordantes sangren al grupo vecino */
}

.vts-equipo__grupo--odd  { background-color: #ACBFCE; }
.vts-equipo__grupo--even { background-color: rgba(172, 191, 206, 0.8); }

.vts-equipo__grupo-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ── Grid nivel 1 (principal): fila centrada, misma lógica de columnas que el grid genérico ── */
.vts-equipo__grid--principal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 130px 100px; /* row-gap provee espacio para el desborde de filas adicionales */
	padding-top: 24px;
}

/* ── Grid niveles 2+ : 3 columnas ── */
.vts-equipo__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 100px;
}

/* ── Card base (compartida) ── */
.vts-equipo__card {
	display: flex;
	flex-direction: column;
}

/* ── Card principal (nivel 1) ── */
.vts-equipo__card--principal {
	width: calc((100% - 200px) / 3); /* igual que una columna del grid genérico (3 cols, 2 gaps×100px) */
	overflow: visible;
}

/* La cabeza desborda por encima del photo-wrap; el cuerpo por debajo */
.vts-equipo__card--principal .vts-equipo__photo-wrap {
	overflow: visible;
}

/* bottom ancla la base de la foto a la base del grupo:
   info blocks (~165px) + padding-bottom del grupo (60px) = 225px.
   La cabeza desborda hacia arriba dentro del padding-top del grid.
   Si el foto es más alta/baja ajustar bottom; si la cabeza sube/baja ajustar width. */
.vts-equipo__card--principal .vts-equipo__photo-wrap img {
	inset: auto;
	width: 140%;
	max-width: none;
	height: auto;
	left: -20%;
	top: auto;
	bottom: -225px;
	object-fit: unset;
	z-index: 1;
}

/* Ambas capas del frame principal bajan un poco para que los segmentos
   horizontales queden a la altura de la frente/anteojos (igual que en Figma) */
.vts-equipo__card--principal .vts-equipo__frame--back,
.vts-equipo__card--principal .vts-equipo__frame--front {
	top: 21%;
}

/* Segmentos horizontales superiores: detrás de la foto → la cabeza los tapa */
.vts-equipo__card--principal .vts-equipo__frame--back {
	z-index: 0;
}

/* Lados verticales: delante de la foto → el cuerpo queda dentro del marco */
.vts-equipo__card--principal .vts-equipo__frame--front {
	z-index: 2;
}

/* Info encima de foto y frame, legible aunque la foto desborde */
.vts-equipo__card--principal .vts-equipo__info {
	position: relative;
	z-index: 3;
}

/* ── Card genérica (niveles 2+) ── */
.vts-equipo__card--generic .vts-equipo__photo-wrap {
	aspect-ratio: unset;
	overflow: visible;
	isolation: isolate; /* crea stacking context para contener z-index negativo del frame */
}

.vts-equipo__card--generic .vts-equipo__photo-wrap img {
	position: static;
	width: 100%;
	height: auto;
	object-fit: unset;
}

/* Frame arranca debajo de la cabeza (~28% desde arriba de la foto);
   z-index: -1 lo pone detrás de la imagen pero dentro del stacking context del photo-wrap */
.vts-equipo__card--generic .vts-equipo__frame {
	top: 28%;
	z-index: -1;
}

/* ── Foto + frame ── */
.vts-equipo__photo-wrap {
	position: relative;
	aspect-ratio: 339 / 383;
	overflow: hidden;
	/* Evita que el aspecto colapse: necesita un ancho de referencia */
	width: 100%;
}

.vts-equipo__photo-wrap img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
}

.vts-equipo__frame {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 2;
}

.vts-equipo__frame svg {
	width: 100%;
	height: 100%;
}

/* ── Info: nombre + cargo ── */
.vts-equipo__info {
	font-family: "Inter Tight", sans-serif;
}

.vts-equipo__name {
	font-size: clamp(17px, 1.51vw + 6.22px, 28px);
	font-weight: 600;
	color: #FFFFFF;
	background-color: #FF2730;
	margin: 0;
	padding: clamp(14px, 1.51vw + 3.23px, 25px) 16px;
	text-align: center;
}

.vts-equipo p.vts-equipo__cargo,
.vts-equipo__cargo {
	font-size: clamp(14px, 0.83vw + 8.08px, 20px);
	font-weight: 800;
	color: #fff;
	background-color: #6F8697;
	margin: 0;
	padding: clamp(12px, 0.83vw + 2.08px, 14px) 16px;
	min-height: 76px;
	text-align: center;
	line-height: 1.2;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ── Grid centrado: nivel 1 con menos de 3 items ── */
.vts-equipo__grid--center {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 100px;
}

.vts-equipo__grid--center .vts-equipo__card {
	width: calc((100% - 200px) / 3);
}

/* ── Responsive ── */
@media (max-width: 900px) {
	.vts-equipo p.vts-equipo__cargo,
	.vts-equipo__cargo {
		min-height: unset;
	}

	.vts-equipo__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* 2 cols, 1 gap */
	.vts-equipo__card--principal {
		width: calc((100% - 100px) / 2);
	}

	.vts-equipo__grid--principal {
		gap: 100px 100px;
		padding-top: 24px;
	}

	.vts-equipo__card--principal .vts-equipo__photo-wrap img {
		width: 130%;
		left: -15%;
		bottom: -200px;
	}

	.vts-equipo__grid--center .vts-equipo__card {
		width: calc((100% - 100px) / 2);
	}
}

@media (max-width: 600px) {
	.vts-equipo__grid {
		grid-template-columns: 1fr;
	}

	/* 1 col, sin gap */
	.vts-equipo__card--principal {
		width: 100%;
	}

	.vts-equipo__grid--principal {
		gap: 70px 100px;
		padding-top: 24px;
	}

	.vts-equipo__card--principal .vts-equipo__photo-wrap img {
		width: 115%;
		left: -7.5%;
		bottom: -120px;
	}

	.vts-equipo__grid--center .vts-equipo__card {
		width: 100%;
	}
}

/* ════════════════════════════════════════════
   Modal de biografía
   ════════════════════════════════════════════ */

.vts-equipo__card[data-bio] {
	cursor: pointer;
}

.vts-equipo-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 10000;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.vts-equipo-modal--open {
	display: flex;
}

.vts-equipo-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
}

.vts-equipo-modal__box {
	position: relative;
	z-index: 1;
	background: #fff;
	max-width: 860px;
	width: 100%;
	max-height: 340px;
	display: flex;
	border-radius: 2px;
	overflow: hidden;
}

.vts-equipo-modal__close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: #888;
	z-index: 2;
	padding: 4px 8px;
	transition: color 0.2s;
}

.vts-equipo-modal__close:hover {
	color: #FF2730;
}

/* Columna izquierda: foto + nombre + cargo */
.vts-equipo-modal__left {
	width: 220px;
	flex-shrink: 0;
	background: #ACBFCE;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 40px 20px 32px;
}

.vts-equipo-modal__foto-wrap {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	margin-bottom: 0;
}

.vts-equipo-modal__foto {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	display: block;
}

.vts-equipo-modal__name {
	font-family: "Inter Tight", sans-serif;
	font-size: clamp(11px, 0.42vw + 8px, 13px);
	font-weight: 700;
	color: #fff;
	background-color: #FF2730;
	margin: 0;
	padding: 10px 16px;
	text-align: center;
	width: 100%;
}

.vts-equipo-modal__cargo {
	font-family: "Inter Tight", sans-serif;
	font-size: clamp(9px, 0.42vw + 6px, 11px);
	font-weight: 800;
	color: #fff;
	background-color: #6F8697;
	margin: 0;
	padding: 8px 16px;
	text-align: center;
	width: 100%;
	line-height: 1.3;
}

/* Columna derecha: bio + secciones */
.vts-equipo-modal__right {
	flex: 1;
	padding: 40px 36px 32px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #ACBFCE transparent;
}

.vts-equipo-modal__right::-webkit-scrollbar {
	width: 4px;
}

.vts-equipo-modal__right::-webkit-scrollbar-track {
	background: transparent;
}

.vts-equipo-modal__right::-webkit-scrollbar-thumb {
	background-color: #ACBFCE;
	border-radius: 2px;
}

.vts-equipo-modal__bio {
	font-family: "Inter Tight", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.7;
	color: #333;
	white-space: pre-wrap;
	margin-bottom: 28px;
}

.vts-equipo-modal__seccion {
	margin-bottom: 20px;
}

.vts-equipo-modal__sec-titulo {
	font-family: "Inter Tight", sans-serif;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #FF2730;
	margin: 0 0 6px;
}

.vts-equipo-modal__sec-contenido {
	font-family: "Inter Tight", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.7;
	color: #444;
	margin: 0;
}

.vts-equipo-modal__sec-contenido ul,
.vts-equipo-modal__sec-contenido ol {
	margin: 4px 0 0 18px;
	padding: 0;
}

.vts-equipo-modal__sec-contenido li {
	margin-bottom: 2px;
}

.vts-equipo-modal__sec-contenido a {
	color: #FF2730;
	text-decoration: underline;
}

.vts-equipo-modal__sec-contenido a:hover {
	opacity: 0.8;
}

@media (max-width: 600px) {
	.vts-equipo-modal__box {
		flex-direction: column;
		max-height: 88vh;
		overflow-y: auto;
	}

	.vts-equipo-modal__left {
		width: 100%;
		padding: 28px 20px 0;
		flex-direction: row;
		align-items: flex-end;
		gap: 16px;
	}

	.vts-equipo-modal__foto-wrap {
		width: 90px;
		flex-shrink: 0;
		aspect-ratio: 1 / 1;
	}

	.vts-equipo-modal__name,
	.vts-equipo-modal__cargo {
		text-align: left;
	}

	.vts-equipo-modal__right {
		padding: 24px 20px 28px;
	}
}
