/* Structure only.
 *
 * Colour, type, border, shadow and decorative treatment were stripped when
 * this became the blank starter. The design comes from the build's own
 * Figma / Claude Design work, not from here.
 *
 * Spacing and sizing are exposed as --fw-<selector>-<property> tokens that
 * default to 0, so the starter asserts nothing and the design layer sets
 * them. Everything left is layout mechanics the block needs to function.
 */

/* Block: framework/timeline (+ timeline-item) — alternating timeline carousel.
   Auto-advances one entry at a time inside a content-width viewport (no
   scrollbar); view.js clones the set for a seamless loop. Above/below is set
   by explicit classes (clone-safe), not :nth-child. */

.fw-timeline {
	padding: var(--fw-section-py, 48px) 20px;
}

/* Stage holds the viewport + the prev/next buttons so the buttons can sit on
   the centre line (50%) at its left and right ends. */
.fw-timeline__stage {
	position: relative;
	max-width: var(--fw-timeline-stage-max-width, 0);
	margin: var(--fw-timeline-stage-margin, 0);
}

.fw-timeline__viewport {
	position: relative;
	max-width: var(--fw-timeline-viewport-max-width, 0);
	margin: var(--fw-timeline-viewport-margin, 0);
	overflow: hidden;
}

/* The centre line — static across the whole viewport so every item that
   slides in sits on it (the line does NOT move with the track). */
.fw-timeline__viewport::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 2px;
	transform: translateY( -50% );
	z-index: 0;
}

.fw-timeline__track {
	position: relative;
	display: flex;
	margin: 0;
	padding: 0;
	transition: transform 0.6s ease;
	will-change: transform;
}

/* Vertical line element — only used in the mobile (vertical) layout. */
.fw-timeline__track::before {
	content: none;
}

.fw-timeline__item {
	position: relative;
	flex: 0 0 25%;
	min-height: var(--fw-timeline-item-min-height, 0);
	box-sizing: border-box;
}

/* Dot on the line. */
.fw-timeline__item::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	width: var(--fw-timeline-item-width, 0);
	height: var(--fw-timeline-item-height, 0);
	z-index: 2;
}

/* Connector from the dot to the year pill. */
.fw-timeline__item::after {
	content: '';
	position: absolute;
	left: 50%;
	transform: translateX( -50% );
	width: 2px;
	height: var(--fw-timeline-item-height, 0);
}
.fw-timeline__item--above::after {
	bottom: 50%;
}
.fw-timeline__item--below::after {
	top: 50%;
}

.fw-timeline__group {
	position: absolute;
	left: 14px;
	right: 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: var(--fw-timeline-group-gap, 0);
}
.fw-timeline__item--above .fw-timeline__group {
	bottom: calc( 50% + 30px );
	flex-direction: column-reverse;
}
.fw-timeline__item--below .fw-timeline__group {
	top: calc( 50% + 30px );
}

.fw-timeline__year {
	display: inline-block;
	padding: var(--fw-timeline-year-padding, 0);
	white-space: nowrap;
}

.fw-timeline__content p {
	margin: 0;
}

/* ---- Prev / next buttons — sit on the centre line at its two ends ---- */
.fw-timeline__nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	z-index: 5;
	width: var(--fw-timeline-nav-btn-width, 0);
	height: var(--fw-timeline-nav-btn-height, 0);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
}
.fw-timeline__nav-btn[data-direction="prev"] {
	left: 0;
}
.fw-timeline__nav-btn[data-direction="next"] {
	right: 0;
}

/* ---- Vertical timeline on small screens (no carousel) -------------- */
@media ( max-width: 768px ) {
	.fw-timeline__viewport {
	overflow: visible;
}
	.fw-timeline__viewport::before {
	display: none;
}
	.fw-timeline__nav-btn {
	display: none;
}
	.fw-timeline__track {
	flex-direction: column;
	width: var(--fw-timeline-track-width, 0);
	transform: none !important;
	transition: none;
}
	.fw-timeline__track::before {
	content: '';
	position: absolute;
	top: 6px;
	bottom: 6px;
	left: 9px;
	right: auto;
	width: 2px;
	height: auto;
	transform: none;
}
	.fw-timeline__item {
	flex: none !important;
	width: var(--fw-timeline-item-width, 0);
	min-height: 0;
	padding: var(--fw-timeline-item-padding, 0);
}
	.fw-timeline__item::before {
	top: 16px;
	left: 9px;
	transform: translate( -50%, 0 );
}
	.fw-timeline__item::after {
	display: none;
}
	.fw-timeline__item--clone {
	display: none;
}
	.fw-timeline__group,
	.fw-timeline__item--above .fw-timeline__group,
	.fw-timeline__item--below .fw-timeline__group {
	position: static;
	left: auto;
	right: auto;
	top: auto;
	bottom: auto;
	align-items: flex-start;
	text-align: left;
	flex-direction: column;
	gap: var(--fw-timeline-group-gap, 0);
}
}
