/* WP Timeline Pro — Frontend */

.wtp-timeline {
	--wtp-accent: #3b82f6;
	--wtp-line-color: #e2e6ea;
	--wtp-text: #1f2937;
	--wtp-text-muted: #6b7280;
	position: relative;
	max-width: 900px;
	margin: 40px auto;
	padding: 20px 0 40px;
	box-sizing: border-box;
}

.wtp-timeline * {
	box-sizing: border-box;
}

.wtp-timeline-title {
	text-align: center;
	font-size: 26px;
	font-weight: 700;
	color: var(--wtp-text);
	margin: 0 0 40px;
}

/* Línea vertical central */
.wtp-timeline .wtp-line {
	position: absolute;
	left: 50%;
	top: 90px;
	bottom: 20px;
	width: 2px;
	transform: translateX(-50%);
	background: var(--wtp-line-color);
	z-index: 0;
}

.wtp-timeline.wtp-line-dashed .wtp-line {
	background: repeating-linear-gradient(
		to bottom,
		var(--wtp-line-color) 0,
		var(--wtp-line-color) 6px,
		transparent 6px,
		transparent 12px
	);
}

.wtp-timeline .wtp-items {
	position: relative;
	z-index: 1;
}

/* Cada fila del timeline */
.wtp-item {
	position: relative;
	display: flex;
	align-items: flex-start;
	width: 100%;
	min-height: 40px;
	margin-bottom: 34px;
}

.wtp-item:last-child {
	margin-bottom: 0;
}

.wtp-item .wtp-date {
	width: calc(50% - 34px);
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}

.wtp-item .wtp-card {
	width: calc(50% - 34px);
}

.wtp-item .wtp-dot {
	position: absolute;
	left: 50%;
	top: 6px;
	width: 14px;
	height: 14px;
	margin-left: -7px;
	border-radius: 50%;
	background: var(--wtp-accent);
	box-shadow: 0 0 0 4px #ffffff, 0 0 0 5px var(--wtp-accent);
}

/* Fila con la tarjeta a la IZQUIERDA (fecha a la derecha, junto a la línea) */
.wtp-item-left {
	flex-direction: row;
}
.wtp-item-left .wtp-card {
	order: 1;
	text-align: right;
	margin-right: 20px;
}
.wtp-item-left .wtp-date {
	order: 2;
	margin-left: 20px;
	align-items: flex-start;
	text-align: left;
}

/* Fila con la tarjeta a la DERECHA (fecha a la izquierda, junto a la línea) */
.wtp-item-right {
	flex-direction: row;
}
.wtp-item-right .wtp-date {
	order: 1;
	margin-right: 20px;
	align-items: flex-end;
	text-align: right;
}
.wtp-item-right .wtp-card {
	order: 2;
	margin-left: 20px;
	text-align: left;
}

/* Layouts alternativos: todo a la derecha o todo a la izquierda */
.wtp-timeline.wtp-layout-right .wtp-item {
	flex-direction: row !important;
}
.wtp-timeline.wtp-layout-right .wtp-item .wtp-date {
	order: 1;
	margin-right: 20px;
	align-items: flex-end;
	text-align: right;
}
.wtp-timeline.wtp-layout-right .wtp-item .wtp-card {
	order: 2;
	margin-left: 20px;
	text-align: left;
}

.wtp-timeline.wtp-layout-left .wtp-item .wtp-card {
	order: 1;
	text-align: right;
	margin-right: 20px;
}
.wtp-timeline.wtp-layout-left .wtp-item .wtp-date {
	order: 2;
	margin-left: 20px;
	align-items: flex-start;
	text-align: left;
}

/* Fecha */
.wtp-date-month {
	font-size: 13px;
	font-weight: 600;
	color: var(--wtp-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.wtp-date-day {
	font-size: 26px;
	font-weight: 800;
	color: var(--wtp-text);
	line-height: 1.15;
}

.wtp-date-year {
	font-size: 12px;
	font-weight: 500;
	color: var(--wtp-text-muted);
}

/* Tarjeta */
.wtp-card {
	background: #ffffff;
	border-radius: 10px;
	padding: 16px 18px;
	position: relative;
}

.wtp-timeline.wtp-card-shadow .wtp-card {
	box-shadow: 0 4px 18px rgba(17, 24, 39, 0.08);
}

.wtp-timeline.wtp-card-bordered .wtp-card {
	border: 1px solid #e5e7eb;
}

.wtp-timeline.wtp-card-flat .wtp-card {
	background: transparent;
	padding: 0;
}

.wtp-card-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
	color: var(--wtp-text);
}

.wtp-card-desc {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--wtp-text-muted);
}

.wtp-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #eef2ff;
	background: color-mix(in srgb, var(--wtp-accent) 15%, white);
	color: var(--wtp-accent);
	font-size: 18px;
	margin-bottom: 10px;
}
.wtp-card-icon:before {
	line-height: 34px;
}

/* Grupo de avatares superpuestos (ej. "Inauguración de oficina") */
.wtp-avatars-group {
	display: flex;
	margin-bottom: 10px;
}
.wtp-item-left .wtp-avatars-group,
.wtp-timeline.wtp-layout-left .wtp-avatars-group {
	justify-content: flex-end;
}

.wtp-avatar-photo {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #ffffff;
	box-shadow: 0 0 0 1px #e5e7eb;
	margin-right: -10px;
}
.wtp-item-left .wtp-avatar-photo,
.wtp-timeline.wtp-layout-left .wtp-avatar-photo {
	margin-right: 0;
	margin-left: -10px;
}

/* Tarjeta de persona (ej. "Nuevo integrante") */
.wtp-person {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.wtp-item-left .wtp-person,
.wtp-timeline.wtp-layout-left .wtp-person {
	flex-direction: row-reverse;
}

.wtp-person-photo {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.wtp-person-info {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.wtp-person-name {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--wtp-text);
}

.wtp-person-role {
	font-size: 12px;
	color: var(--wtp-text-muted);
}

/* Animación de aparición al hacer scroll */
.wtp-item {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}
.wtp-item.wtp-in-view {
	opacity: 1;
	transform: translateY(0);
}

/* Responsive: una sola columna en pantallas pequeñas */
@media (max-width: 680px) {
	.wtp-timeline .wtp-line {
		left: 22px;
		transform: none;
	}

	.wtp-item,
	.wtp-timeline.wtp-layout-right .wtp-item,
	.wtp-timeline.wtp-layout-left .wtp-item {
		flex-direction: row !important;
		padding-left: 50px;
	}

	.wtp-item .wtp-dot {
		left: 22px;
	}

	.wtp-item .wtp-date,
	.wtp-item .wtp-card,
	.wtp-timeline.wtp-layout-right .wtp-item .wtp-date,
	.wtp-timeline.wtp-layout-left .wtp-item .wtp-card {
		width: 100%;
		margin: 0 !important;
		text-align: left !important;
		align-items: flex-start !important;
	}

	.wtp-item .wtp-date {
		flex-direction: row;
		gap: 6px;
		align-items: baseline !important;
		margin-bottom: 6px !important;
	}

	.wtp-item-left .wtp-card,
	.wtp-item-right .wtp-card {
		order: 2;
	}
	.wtp-item .wtp-date {
		order: 1;
	}

	.wtp-avatars-group,
	.wtp-person {
		justify-content: flex-start !important;
		flex-direction: row !important;
	}
	.wtp-avatar-photo {
		margin-right: -10px !important;
		margin-left: 0 !important;
	}
}
