/* Страница „Кой“ — таймлайн „Моята история“, медии, CTA. */

/* ------------------------------------------------------------ Таймлайн: лента с години */
#moyata-istoriya .hts-timeline {
	display: flex !important;
	flex-wrap: nowrap !important;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
}

#moyata-istoriya .hts-timeline::-webkit-scrollbar {
	display: none;
}

#moyata-istoriya .hts-tl-item {
	flex: 0 0 min(320px, calc(100vw / 6)) !important;
	width: min(320px, calc(100vw / 6)) !important;
	scroll-snap-align: center;
	cursor: pointer;
	outline: none;
}

#moyata-istoriya .hts-tl-item:focus-visible .hts-tl-year {
	text-decoration: underline;
	text-underline-offset: 4px;
}

@media (max-width: 1024px) {
	#moyata-istoriya .hts-tl-item {
		flex-basis: calc(100vw / 4) !important;
		width: calc(100vw / 4) !important;
	}
}

@media (max-width: 767px) {
	#moyata-istoriya .hts-tl-item {
		flex-basis: calc(100vw / 3) !important;
		width: calc(100vw / 3) !important;
	}
}

/* ------------------------------------------------------------ Таймлайн: панели */
#moyata-istoriya.htp-tl-ready .hts-tl-pane:not(.is-active),
#moyata-istoriya .hts-tl-pane[hidden] {
	display: none !important;
}

#moyata-istoriya .hts-tl-pane.is-active {
	flex: 1 1 100%;
	width: 100%;
	animation: htp-tl-in .35s ease;
}

@keyframes htp-tl-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

/* Без JS: панелите една под друга. */
#moyata-istoriya:not(.htp-tl-ready) [data-id="2ea79a15"] {
	flex-direction: column;
	gap: 64px;
}

/* Празен контейнер за снимка (1995–2000, 2025, 2026 — снимките предстоят). */
#moyata-istoriya div.hts-tl-img {
	display: block;
	background: #f3f9f8;
	border: 1px dashed #cce8e6;
	border-radius: 16px;
}

/* Назад / напред */
.htp-tl-nav {
	display: flex;
	gap: 8px;
	margin-top: auto;
	padding-top: 40px;
}

#moyata-istoriya .htp-tl-btn {
	display: inline-grid;
	place-items: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0 !important;
	border-radius: 50% !important;
	background: rgba(204, 232, 230, .39) !important;
	color: #008990 !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}

.htp-tl-btn--prev svg {
	transform: rotate(180deg);
}

/* Hover — като стрелките на каруселите (Фигма): по-наситен светлозелен фон, стрелката остава тюркоазена. */
#moyata-istoriya .htp-tl-btn:hover:not(:disabled),
#moyata-istoriya .htp-tl-btn:focus-visible {
	background: #cce8e6 !important;
	color: #008990 !important;
	outline: none;
}

#moyata-istoriya .htp-tl-btn:disabled {
	opacity: .45;
	cursor: default;
}

@media (max-width: 767px) {
	.htp-tl-nav {
		padding-top: 24px;
	}

	#moyata-istoriya .htp-tl-btn {
		width: 48px;
		height: 48px;
	}
}

/* ------------------------------------------------------------ Медии: 3 карти → „Всички статии“ → 12 (3 на ред) */
html.htp-js #v-mediite.htp-media-ready:not(.is-expanded) .hts-post-card:nth-child(n+4) {
	display: none !important;
}

#v-mediite.is-expanded .hts-post-card:nth-child(n+4) {
	animation: htp-tl-in .35s ease;
}

#v-mediite .hts-post-card .hts-post-img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

/* ------------------------------------------------------------ CTA: заглавието на 2 реда */
@media (min-width: 1025px) {
	[data-id="19074b81"] > [data-id="4a9f66ac"] {
		flex-basis: 66% !important;
		max-width: 940px;
	}
}

/* Точките — кръгчета (по дизайна), активната по-голяма. */
#moyata-istoriya .hts-tl-dot {
	flex: 0 0 10px !important;
	width: 10px !important;
	min-width: 0 !important;
	height: 10px !important;
	border-radius: 50% !important;
	margin-inline: 4px;
}

#moyata-istoriya .hts-tl-item-active .hts-tl-dot {
	flex-basis: 14px !important;
	width: 14px !important;
	height: 14px !important;
}

/* Текстът започва горе, бутоните — долу (както във Figma). */
#moyata-istoriya .hts-tl-pane.is-active {
	align-items: stretch !important;
}

#moyata-istoriya .hts-tl-pane .hts-tl-body {
	justify-content: flex-start !important;
	padding-top: 40px;
}

@media (max-width: 1024px) {
	#moyata-istoriya .hts-tl-pane .hts-tl-body {
		padding-top: 0;
	}
}

/* Лентата с години: линията е на едно и също ниво при всички години (и при активната). */
#moyata-istoriya .hts-tl-track {
	display: flex !important;
	align-items: center !important;
	height: 14px !important;
	min-height: 14px !important;
}

#moyata-istoriya .hts-tl-dot {
	flex: 0 0 10px !important;
	width: 10px !important;
	height: 10px !important;
	transition: transform .25s ease, background-color .25s ease;
}

#moyata-istoriya .hts-tl-item-active .hts-tl-dot {
	transform: scale(1.4);
}

#moyata-istoriya .hts-tl-line {
	height: 3px !important;
	align-self: center !important;
	margin: 0 !important;
	top: auto !important;
	transition: background-color .25s ease;
}

/* Панелите: еднаква височина (виж koy.js) — без „скачане“ на страницата; плавно преливане. */
#moyata-istoriya .hts-tl-pane.is-active {
	animation: htp-tl-fade .4s ease both;
}

@keyframes htp-tl-fade {
	from {
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	#moyata-istoriya .hts-tl-pane.is-active {
		animation: none;
	}
}

/* Линията като progress bar: оцветена от началото до избраната година (точката ѝ включително);
   запълването тече последователно по сегментите (закъсненията — от koy.js). Избледнели са само годините. */
#moyata-istoriya .hts-tl-item {
	opacity: 1 !important;
}

#moyata-istoriya .hts-tl-year {
	transition: opacity .25s ease;
}

#moyata-istoriya .hts-tl-item:not(.hts-tl-item-active) .hts-tl-year {
	opacity: .3;
}

#moyata-istoriya .hts-tl-item:not(.hts-tl-item-active):hover .hts-tl-year {
	opacity: .6;
}

#moyata-istoriya .hts-tl-line {
	background: linear-gradient(#008990, #008990) 0 0 / 0 100% no-repeat, rgba(0, 137, 144, .3) !important;
	transition: background-size var(--htp-dur, .15s) linear var(--htp-delay, 0s) !important;
}

#moyata-istoriya .hts-tl-line.is-filled {
	background-size: 100% 100% !important;
}

#moyata-istoriya .hts-tl-dot {
	background: #b3dcde !important;
	transition: transform .25s ease, background-color .1s linear var(--htp-delay, 0s) !important;
}

#moyata-istoriya .hts-tl-dot.is-filled {
	background: #008990 !important;
}

@media (prefers-reduced-motion: reduce) {
	#moyata-istoriya .hts-tl-line,
	#moyata-istoriya .hts-tl-dot {
		transition: none !important;
	}
}

/* Телефон: „Разберете повече“ в hero — на цялата ширина. */
@media (max-width: 767px) {
	.elementor [data-id="6fa2c359"] > [data-id="797062f2"] {
		align-self: stretch !important;
		width: 100% !important;
		justify-content: center;
		text-align: center;
	}
}

/* Лентата с годините се влачи с мишката. */
@media (hover: hover) and (pointer: fine) {
	#moyata-istoriya .hts-timeline {
		cursor: grab;
		user-select: none;
	}

	#moyata-istoriya .hts-timeline.is-dragging,
	#moyata-istoriya .hts-timeline.is-dragging .hts-tl-item {
		cursor: grabbing;
		scroll-snap-type: none;
	}
}

/* Вертикалното видео (9:16) на телефон (сменя се от koy.js). */
video.htp-video-vertical {
	aspect-ratio: 9 / 16 !important;
	height: auto !important;
	object-fit: cover;
}

/* Абзаците в текста на годините — ясно разделени, но без празен ред (<br><br> → .htp-pgap от koy.js). */
#moyata-istoriya .htp-pgap {
	display: block;
	height: .9em;
}

/* Десктоп: целият текст се вижда (без превъртане вътре в панела). Всички години са с еднаква височина —
   тази на най-дългия текст (koy.js), а снимката запълва височината на панела, без да я определя. */
@media (min-width: 1025px) {
	#moyata-istoriya .hts-tl-pane.is-active {
		height: auto !important;
		min-height: var(--htp-tl-h, 0px);
	}

	#moyata-istoriya .hts-tl-pane > img,
	#moyata-istoriya .hts-tl-pane > .hts-tl-img {
		contain: size;
		align-self: stretch !important;
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		object-fit: cover;
		object-position: center 25%;
	}

	#moyata-istoriya .hts-tl-pane .hts-tl-body {
		padding-top: 24px;
	}

	#moyata-istoriya .htp-tl-nav {
		flex-shrink: 0;
		margin-top: auto;
		padding-top: 32px;
	}
}
