/*
 * Strona „O firmie” — kalendarium / oś czasu (templates/about-page.php, Pencil eA4hN).
 * Namespace: dehoust-timeline__* (NIE dehoust-about__* — kolizja z sekcją „O nas” w home.css).
 * Zależny od dehoust-main (kontener, tokeny).
 */

.dehoust-timeline {
	background: #fff;
	padding-block: 3rem 4rem;
}

@media (min-width: 1024px) {
	.dehoust-timeline {
		padding-block: 4.5rem 6rem;
	}
}

.dehoust-timeline__inner {
	display: flex;
	flex-direction: column;
}

/* Nagłówek + podtytuł (odwzorowanie dehoust_section_header, self-contained) */
.dehoust-timeline__head {
	margin-bottom: 2.5rem;
}

.dehoust-timeline__title {
	margin: 0;
	font-family: var(--dehoust-font-heading);
	font-size: clamp(1.75rem, 4vw, 2.5rem); /* 40 px */
	font-weight: 700;
	line-height: 1.2;
	color: var(--dehoust-color-text); /* #252525 */
}

.dehoust-timeline__rule {
	display: flex;
	align-items: center;
	gap: 0;
	margin-top: 0.75rem;
}

.dehoust-timeline__accent {
	width: 2.5rem; /* 40 px */
	height: 0.375rem; /* 6 px */
	flex-shrink: 0;
	background: var(--dehoust-color-primary); /* #096cb2 */
}

.dehoust-timeline__rule-line {
	height: 0.8px;
	flex: 1;
	background: #e2f3ff;
}

.dehoust-timeline__subtitle {
	margin: 1.5rem 0 0;
	max-width: 85.5rem;
	font-family: var(--dehoust-font-heading);
	font-size: 1.25rem; /* 20 px */
	font-weight: 700;
	line-height: 1.4;
	color: var(--dehoust-color-text); /* #252525 */
	white-space: pre-line;
}

/* Tekst wprowadzający (opcjonalny the_content) */
.dehoust-timeline__intro {
	margin-bottom: 2rem;
	max-width: 85rem;
	font-family: var(--dehoust-font-body);
	font-size: 1.125rem;
	line-height: 1.6;
	color: var(--dehoust-color-text-muted);
}

.dehoust-timeline__intro p {
	margin: 0 0 1rem;
}

.dehoust-timeline__intro p:last-child {
	margin-bottom: 0;
}

/* Oś czasu */
.dehoust-timeline__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dehoust-timeline__item {
	position: relative;
	display: grid;
	grid-template-columns: 8.1875rem 1fr; /* koło 131 px + reszta */
	column-gap: 1.4375rem; /* 23 px */
	align-items: center;
	padding-block: 1.75rem; /* ~57 px odstęp między kołami */
}

/* Pionowa linia łącząca koła (biegnie przez środek kół) */
.dehoust-timeline__item::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 4.09375rem; /* środek koła: 131/2 = 65.5 px */
	width: 2px;
	transform: translateX(-1px);
	background: #00a2e0;
	z-index: 0;
}

.dehoust-timeline__item:first-child::before {
	top: 50%;
}

.dehoust-timeline__item:last-child::before {
	bottom: 50%;
}

.dehoust-timeline__marker {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 8.1875rem;
	height: 8.1875rem;
}

.dehoust-timeline__circle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 8.1875rem; /* 131 px */
	height: 8.1875rem;
	border: 0.8px solid #00a2e0;
	border-radius: 50%;
	background: #fff;
}

.dehoust-timeline__item--highlight .dehoust-timeline__circle {
	background: #00a2e0;
}

.dehoust-timeline__year {
	font-family: var(--dehoust-font-heading);
	font-size: 1.75rem; /* 28 px */
	font-weight: 700;
	line-height: 1;
	color: #00a2e0;
}

.dehoust-timeline__item--highlight .dehoust-timeline__year {
	color: #fff;
}

.dehoust-timeline__content {
	display: flex;
	align-items: center;
	gap: 2rem; /* 32 px */
	min-width: 0;
}

/* Kwadrat 1:1 — grafiki z kalendarium mają różne proporcje, kadrowanie ucinałoby dokumenty. */
.dehoust-timeline__figure {
	flex: 0 0 14.625rem; /* 234 px */
	width: 14.625rem;
	aspect-ratio: 1;
	margin: 0;
	border: 0.8px solid #00a2e0;
	border-radius: 0.5rem;
	overflow: hidden;
	background: #fff;
}

.dehoust-timeline__zoom {
	display: block;
	width: 100%;
	height: 100%;
	cursor: zoom-in;
}

.dehoust-timeline__figure img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform var(--dehoust-transition);
}

.dehoust-timeline__zoom:hover img,
.dehoust-timeline__zoom:focus-visible img {
	transform: scale(1.04);
}

.dehoust-timeline__text {
	margin: 0;
	min-width: 0;
	font-family: var(--dehoust-font-body);
	font-size: 1.125rem; /* 18 px */
	line-height: 1.5;
	color: var(--dehoust-color-text-muted); /* #1d1d1d */
}

.dehoust-timeline__text > :first-child {
	margin-top: 0;
}

.dehoust-timeline__text > :last-child {
	margin-bottom: 0;
}

.dehoust-timeline__text p {
	margin: 0 0 0.75em;
}

.dehoust-timeline__text ul,
.dehoust-timeline__text ol {
	margin: 0 0 0.75em;
	padding-left: 1.25em;
}

.dehoust-timeline__text a {
	text-decoration: underline;
}

/* Style podglądu grafiki (.dehoust-lightbox) siedzą w main.css — używa go też
   galeria sekcji ofertowych i kategorii. */

.dehoust-timeline__empty {
	margin: 0;
	font-size: 1.125rem;
	color: var(--dehoust-color-text-muted);
}

/* Responsywność */
@media (max-width: 768px) {
	.dehoust-timeline__item {
		grid-template-columns: 1fr;
		row-gap: 1rem;
		padding-block: 1.25rem;
	}

	.dehoust-timeline__item::before {
		display: none;
	}

	.dehoust-timeline__marker {
		width: 6rem;
		height: 6rem;
		justify-content: flex-start;
	}

	.dehoust-timeline__circle {
		width: 6rem;
		height: 6rem;
	}

	.dehoust-timeline__year {
		font-size: 1.375rem;
	}

	.dehoust-timeline__content {
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
	}

	.dehoust-timeline__figure {
		flex-basis: auto;
		width: 100%;
		max-width: 18rem; /* 288 px — kwadrat na całą szerokość byłby za wysoki */
	}
}
