/* ==========================================================================
   Simple Timeline — front-end styles
   --------------------------------------------------------------------------
   Colors, shadow color, and the rounded-corners toggle are all supplied
   per-instance via CSS custom properties set in an inline <style> block
   generated by class-render.php (scoped to that instance's wrapper ID).
   This file only ever needs updating for STRUCTURAL/layout changes — never
   for a client's color choices.
   ========================================================================== */

.simple-timeline {
	position: relative;
	max-width: 1000px;
	margin: 0 auto;
	padding: 20px 0;
}

/* Center vertical line */
.simple-timeline::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 4px;
	background-color: var( --st-line-color );
	transform: translateX( -50% );
}

.st-entry {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 50px;
}

.st-entry:last-child {
	margin-bottom: 0;
}

.st-entry .st-col {
	width: 45%;
}

/* Entry dot ("Announcement Color"), centered on the line for each entry */
.st-dot {
	position: absolute;
	top: 8px;
	left: 50%;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background-color: var( --st-dot-color );
	border: 3px solid #ffffff;
	box-sizing: content-box; /* border ADDS to the 20px dot, doesn't shrink it */
	transform: translate( -50%, -50% );
	z-index: 2;
}

/* Description box */
.st-description {
	background-color: var( --st-bg-color );
	box-shadow: var( --st-shadow-color ) 0px 3px 0px 0px;
	border-radius: var( --st-radius );
	box-sizing: border-box;
	padding: 32px;
}

.st-description .st-headline {
	margin: 0 0 10px;
	font-size: 1.1em;
}

.st-description .st-date {
	margin: 0 0 10px;
}

.st-description .st-content {
	margin: 0;
}

.st-description .st-content > *:last-child {
	margin-bottom: 0;
}

/* Photo — fixed 4:3 crop, rounded corners follow the same setting as the
   description box, but NEVER gets a box-shadow. */
.st-photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var( --st-radius );
}

/* ==========================================================================
   Mobile: line moves to the left, every entry stacks full-width with the
   photo on top and description below, regardless of desktop alternation.
   ========================================================================== */
@media ( max-width: 782px ) {

	.simple-timeline::before {
		left: 20px;
	}

	.st-entry {
		flex-direction: column;
		padding-left: 50px;
	}

	.st-entry .st-col {
		width: 100%;
	}

	.st-entry .st-col + .st-col {
		margin-top: 16px;
	}

	.st-dot {
		left: 20px;
		top: 8px;
	}

	/* Force photo-above-description regardless of source order */
	.st-entry .st-photo {
		order: 1;
	}

	.st-entry .st-description {
		order: 2;
	}
}
