/* ============================================================
   Главная: лента ближайших открытых тренингов (template-parts/home-trainings-rail.php)
   Макет: maket-treningi/bannery.html, вариант Б.
   Базовые стили билета (.trn-ticket) и заголовков (.trn-eyebrow, .trn-heading) — в custom.css.
   ============================================================ */

.hrail {
	padding-top: clamp(25px, 4.4vw, 30px);
}

.hrail__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 32px;
	margin-bottom: 24px;
}

.hrail__head .trn-heading {
	margin: 0;
}

.hrail__ctl {
	display: flex;
	align-items: center;
	gap: 6px;
}

.hrail__more {
	margin-right: 14px;
}

.hrail__btn {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid #d9d9d9;
	border-radius: 50%;
	background: #fff;
	color: #555;
	font-size: 1.05rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}

.hrail__btn:hover {
	background: #f6f6f6;
	color: #222;
}

.hrail__btn:disabled {
	opacity: 0.35;
	cursor: default;
	background: #fff;
}

/* Лента: на компьютере 4 карточки, остальные — вбок; листается свайпом и стрелками */
.hrail__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: max(255px, calc((100% - 60px) / 5.2));
	gap: 30px;
	margin: 0;
	padding: 2px 2px 16px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	/* Полоса прокрутки: thin — тонкая, none — скрыть (листать стрелками и свайпом). Меняется только здесь. */
	--hrail-scrollbar: thin;
	scrollbar-width: var(--hrail-scrollbar);
	scrollbar-color: #d9d9d9 transparent;
}

.hrail__track > li {
	display: flex;
	scroll-snap-align: start;
}

.hrail__track:focus {
	outline: none;
}

.hrail__track:focus-visible {
	outline: 2px solid #C13B44;
	outline-offset: 4px;
}

/* Билет в вертикальном виде: корешок с датой сверху, линия отрыва горизонтальная */
.hrail .trn-ticket {
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: auto 1fr;
	width: 100%;
}

.hrail .trn-ticket__stub {
	flex-direction: row;
	align-items: baseline;
	justify-content: flex-start;
	gap: 10px;
	padding: 18px 20px;
	border-right: 0;
	border-bottom: 1px dashed #d9d9d9;
	border-radius: 14px 14px 0 0;
}

.hrail .trn-ticket__stub::before,
.hrail .trn-ticket__stub::after {
	top: auto;
	bottom: -9px;
	width: 9px;
	height: 16px;
	border: 1px solid #ececec;
}

.hrail .trn-ticket__stub::before {
	left: -1px;
	right: auto;
	border-left: 0;
	border-radius: 0 9px 9px 0;
}

.hrail .trn-ticket__stub::after {
	right: -1px;
	border-right: 0;
	border-radius: 9px 0 0 9px;
}

.hrail .trn-ticket__day {
	font-size: 2rem;
}

.hrail .trn-ticket__wd {
	margin-left: auto;
}

@media (max-width: 767px) {
	.hrail__more {
		margin-right: auto;
	}

	.hrail__ctl {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hrail__btn {
		transition: none;
	}
}

/* Тёмная плашка «Тренинг для вашей команды» под лентой — стили .tools-cta из custom.css, здесь только отступ сверху */
.hrail-band {
	margin-top: clamp(40px, 5vw, 64px);
}
