/* Image Timeline Grid — front-end styles */

.itg-wrapper {
	--itg-line-color: #d0d5dd;
}

/* ---------- Grid layout ---------- */
.itg-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

/* ---------- Card (shared by grid + timeline) ---------- */
.itg-card {
	display: flex;
	flex-direction: column;
}

.itg-media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 8px;
}

.itg-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}

/* ---------- Tile shape (aspect ratio) ---------- */
.itg-ratio-square .itg-media {
	aspect-ratio: 1 / 1;
	height: auto;
}

.itg-ratio-portrait .itg-media {
	aspect-ratio: 3 / 4;
	height: auto;
}

.itg-ratio-landscape .itg-media {
	aspect-ratio: 16 / 9;
	height: auto;
}

.itg-hover-zoom .itg-media:hover img {
	transform: scale(1.08);
}

.itg-media-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0);
	transition: background 0.3s ease;
}

.itg-hover-overlay .itg-media:hover .itg-media-overlay {
	background: rgba(0, 0, 0, 0.35);
}

.itg-content {
	padding: 14px 4px;
}

.itg-date {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-bottom: 4px;
}

.itg-title {
	display: block;
	font-size: 18px;
	font-weight: 700;
	text-decoration: none;
	margin-bottom: 6px;
}

.itg-description {
	font-size: 14px;
	line-height: 1.5;
	margin: 0;
}

/* ---------- Overlay caption (compact / square grid) ---------- */
.itg-content-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 14px 16px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0) 100%);
	z-index: 1;
	margin: 0;
}

.itg-content-overlay .itg-title,
.itg-content-overlay .itg-date,
.itg-content-overlay .itg-description {
	color: #fff;
}

.itg-content-overlay .itg-title {
	margin-bottom: 2px;
}

.itg-content-overlay .itg-description {
	display: none;
}

/* ---------- Vertical alternating timeline ---------- */
.itg-timeline {
	position: relative;
	padding: 20px 0;
}

.itg-timeline::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	transform: translateX(-50%);
	background-color: var(--itg-line-color, #d0d5dd);
}

.itg-timeline .itg-item {
	position: relative;
	width: 50%;
	padding: 0 40px 48px;
	box-sizing: border-box;
}

.itg-timeline .itg-item-left {
	left: 0;
	text-align: right;
}

.itg-timeline .itg-item-right {
	left: 50%;
	text-align: left;
}

.itg-marker {
	position: absolute;
	top: 8px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #6c5ce7;
	border: 3px solid #fff;
	box-shadow: 0 0 0 2px #6c5ce7;
	z-index: 2;
}

.itg-item-left .itg-marker {
	right: -7px;
}

.itg-item-right .itg-marker {
	left: -7px;
}

/* ---------- Scroll fade-in ---------- */
.itg-animate .itg-item {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.itg-animate .itg-item.itg-in-view {
	opacity: 1;
	transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
	.itg-timeline::before {
		left: 20px;
	}

	.itg-timeline .itg-item {
		width: 100%;
		left: 0 !important;
		padding: 0 0 40px 48px;
		text-align: left !important;
	}

	.itg-item-left .itg-marker,
	.itg-item-right .itg-marker {
		left: 13px;
		right: auto;
	}
}

/* Grid column counts per breakpoint are controlled by the widget's
 * "Columns" control (with tablet/mobile variants) in the Elementor
 * editor, so no forced overrides are set here. */
