/* Home page hero slider (plugin_blocks/templates/slider_plugin.html), variant A */
.sa-hero {
	--sa-blue: #355a9f;
	--sa-blue-d: #2a4a86;
	position: relative;
	/* full screen width: break out of the 1470px .wrapper-inner box */
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	margin-bottom: 0; /* next block (blue Акции band) starts right below, no white gap */
	/* whole first screen: window height minus the sticky header (--sa-header-h is measured in base.html) */
	height: calc(100vh - var(--sa-header-h, 77px));
	height: calc(100svh - var(--sa-header-h, 77px));
	min-height: 420px;
	overflow: hidden;
	background: #111827;
	color: #fff;
	font-family: 'Roboto', sans-serif;
	line-height: 1.4;
	text-align: left;
}
.sa-hero * { box-sizing: border-box; }

.sa-hero .sa-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 0s linear 1s; }
.sa-hero .sa-slide.is-on { opacity: 1; visibility: visible; z-index: 1; transition: opacity 1s ease; }
.sa-hero .sa-slide > img {
	position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
	object-fit: cover; transform: scale(1.08); transition: transform 7s linear;
}
.sa-hero .sa-slide.is-on > img { transform: scale(1); }
.sa-hero .sa-slide::after {
	content: ''; position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(10, 15, 25, .78) 0%, rgba(10, 15, 25, .45) 45%, rgba(10, 15, 25, 0) 75%);
}

.sa-hero .sa-slide-txt {
	position: absolute; z-index: 2; top: 50%; transform: translateY(-46%);
	left: max(var(--sa-gutter, 32px), calc((100% - var(--sa-wrap, 1200px)) / 2)); max-width: 580px;
}
.sa-hero .sa-slide-txt > * { opacity: 0; transform: translateY(14px); transition: opacity .6s ease .35s, transform .6s ease .35s; }
.sa-hero .sa-slide.is-on .sa-slide-txt > * { opacity: 1; transform: none; }
.sa-hero .sa-slide.is-on .sa-slide-txt > :nth-child(2) { transition-delay: .45s; }
.sa-hero .sa-slide.is-on .sa-slide-txt > :nth-child(3) { transition-delay: .55s; }
.sa-hero .sa-slide.is-on .sa-slide-txt > :nth-child(4) { transition-delay: .65s; }

.sa-hero .sa-slide-tag {
	display: inline-block; padding: 6px 12px; border-radius: 20px;
	background: rgba(69, 173, 227, .22); color: #cfeeff; font-size: 14px; font-weight: 500; line-height: 1.3;
}
.sa-hero .sa-slide-title {
	margin: 16px 0 12px; padding: 0; color: #fff; font-family: inherit;
	font-size: clamp(30px, 4.4vw, 54px); line-height: 1.08; font-weight: 700;
	text-transform: none; letter-spacing: 0; text-align: left;
}
.sa-hero .sa-slide-title::before, .sa-hero .sa-slide-title::after { display: none; }
.sa-hero .sa-slide-text { margin: 0 0 26px; color: #e5e7eb; font-size: 18px; line-height: 1.5; }
.sa-hero .sa-slide-text b { color: #fff; font-weight: 700; white-space: nowrap; }

.sa-hero .sa-slide-acts { display: flex; flex-wrap: wrap; gap: 12px; }
.sa-hero .sa-hbtn {
	display: inline-flex; align-items: center; justify-content: center; padding: 13px 22px; border-radius: 10px;
	font-size: 16px; font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap;
	transition: background .15s, color .15s;
}
.sa-hero .sa-hbtn-primary { background: var(--sa-blue); color: #fff; }
.sa-hero .sa-hbtn-primary:hover { background: var(--sa-blue-d); color: #fff; }
.sa-hero .sa-hbtn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .5); }
.sa-hero .sa-hbtn-ghost:hover { background: rgba(255, 255, 255, .25); color: #fff; }

/* Controls: progress bars, counter, arrows */
.sa-hero .sa-hero-ctrl {
	position: absolute; z-index: 3; bottom: 28px; display: flex; align-items: center; gap: 16px;
	left: max(var(--sa-gutter, 32px), calc((100% - var(--sa-wrap, 1200px)) / 2)); right: max(var(--sa-gutter, 32px), calc((100% - var(--sa-wrap, 1200px)) / 2));
}
.sa-hero .sa-hero-bars { display: flex; gap: 8px; flex: 1; max-width: 420px; }
.sa-hero .sa-hero-bars button {
	position: relative; flex: 1; height: 4px; margin: 0; padding: 0; border: 0; border-radius: 2px;
	background: rgba(255, 255, 255, .3); cursor: pointer; overflow: hidden;
}
.sa-hero .sa-hero-bars button::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; } /* bigger tap area */
.sa-hero .sa-hero-bars i { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: #fff; }
.sa-hero .sa-hero-bars button.is-on i { animation: sa-hero-fill var(--sa-dur, 6s) linear forwards; }
.sa-hero .sa-hero-bars button.is-done i { width: 100%; }
@keyframes sa-hero-fill { to { width: 100%; } }
.sa-hero .sa-hero-count { min-width: 48px; color: #d1d5db; font-size: 14px; }
.sa-hero .sa-hero-arrows { display: flex; gap: 10px; margin-left: auto; }
.sa-hero .sa-hero-arrow {
	display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 0;
	border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: #1d2433; cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .15); transition: transform .15s;
}
.sa-hero .sa-hero-arrow:hover { transform: scale(1.06); }
.sa-hero .sa-hero-arrow svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
	.sa-hero .sa-slide::after {
		background: linear-gradient(0deg, rgba(10, 15, 25, .88) 0%, rgba(10, 15, 25, .4) 55%, rgba(10, 15, 25, .1) 100%);
	}
	.sa-hero .sa-slide-txt { left: var(--sa-gutter, 16px); right: var(--sa-gutter, 16px); top: auto; bottom: 76px; transform: none; }
	.sa-hero .sa-slide-text { margin-bottom: 18px; font-size: 17px; }
	.sa-hero .sa-slide-tag { font-size: 15px; }
	.sa-hero .sa-hbtn { padding: 13px 20px; font-size: 16px; }
	.sa-hero .sa-hero-ctrl { left: var(--sa-gutter, 16px); right: var(--sa-gutter, 16px); bottom: 24px; }
	.sa-hero .sa-hero-arrows { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.sa-hero .sa-slide, .sa-hero .sa-slide > img, .sa-hero .sa-slide-txt > * { transition: none; }
	.sa-hero .sa-slide > img { transform: none; }
	.sa-hero .sa-hero-bars button.is-on i { animation: none; width: 100%; }
}
