/* Site header (base.html). Light variant "A" chosen 2026-10-24. */

/* One grid for the whole site: content 1200px wide, side gutters 32 / 24 / 16px.
   Header, slider text, home blocks, page text and footer all start at the same left edge. */
:root { --sa-wrap: 1200px; --sa-gutter: 32px; --sa-section: 72px; }
@media (max-width: 1199px) { :root { --sa-gutter: 24px; } }
@media (max-width: 767px) { :root { --sa-gutter: 16px; --sa-section: 48px; } }

.sa-header {
	--h-blue: #355a9f;
	--h-blue-dark: #2a4a86;
	--h-ink: #1d2433;
	--h-text: #374151;
	--h-muted: #6b7280;
	--h-line: #e5e7eb;
	position: sticky;
	top: 0;
	z-index: 1000;
	background: #fff;
	border-bottom: 1px solid var(--h-line);
	font-family: 'Roboto', sans-serif;
	line-height: 1.4; /* body has line-height: 35px site-wide */
	transition: box-shadow .2s;
}
.sa-header.is-scrolled { box-shadow: 0 4px 16px rgba(17, 24, 39, .08); }
.sa-header * { box-sizing: border-box; }
.sa-header ul, .sa-header li {
	margin: 0; padding: 0; list-style: none;
	font-family: inherit; line-height: 1.4; text-transform: none; height: auto;
}
.sa-header a { text-decoration: none; }

.sa-header .sa-h-inner {
	display: flex; align-items: center; gap: 32px;
	max-width: calc(var(--sa-wrap) + 2 * var(--sa-gutter)); margin: 0 auto; padding: 14px var(--sa-gutter);
	transition: padding .2s;
}
.sa-header.is-scrolled .sa-h-inner { padding-top: 8px; padding-bottom: 8px; }

.sa-header .sa-logo { flex: none; display: block; line-height: 0; }
.sa-header .sa-logo img { display: block; height: 48px; width: auto; transition: height .2s; }
.sa-header.is-scrolled .sa-logo img { height: 38px; }

/* Navigation */
.sa-header .sa-nav { margin: 0 auto; }
.sa-header .sa-nav > ul { display: flex; gap: 30px; }
.sa-header .sa-nav-item { position: relative; }
.sa-header .sa-nav-item > a {
	display: block; position: relative; padding: 8px 0;
	color: var(--h-text); font-size: 16px; font-weight: 500; white-space: nowrap;
	transition: color .15s;
}
.sa-header .sa-nav-item > a:hover,
.sa-header .sa-nav-item.is-active > a { color: var(--h-blue); }
.sa-header .sa-nav-item.is-active > a::after {
	content: ''; position: absolute; left: 0; right: 0; bottom: 0;
	height: 2px; border-radius: 2px; background: var(--h-blue);
}
.sa-header .sa-nav-item.has-sub > a::before {
	content: ''; float: right; margin: 9px 0 0 6px;
	border: 4px solid transparent; border-top-color: currentColor;
}
.sa-header .sa-sub {
	position: absolute; top: 100%; left: -16px; min-width: 220px; padding: 8px 0;
	background: #fff; border: 1px solid var(--h-line); border-radius: 8px;
	box-shadow: 0 10px 30px rgba(17, 24, 39, .1);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .15s;
}
.sa-header .sa-nav-item.has-sub:hover .sa-sub,
.sa-header .sa-nav-item.has-sub:focus-within .sa-sub { opacity: 1; visibility: visible; transform: none; }
.sa-header .sa-sub a { display: block; padding: 8px 16px; color: var(--h-text); font-size: 15px; }
.sa-header .sa-sub a:hover { background: #f3f6fb; color: var(--h-blue); }

/* Right side: phone with working hours */
.sa-header .sa-h-right { flex: none; display: flex; align-items: center; gap: 20px; }
.sa-header .sa-phone { color: var(--h-ink); font-weight: 700; font-size: 22px; line-height: 1.25; white-space: nowrap; }
.sa-header .sa-phone:hover { color: var(--h-blue); }
.sa-header .sa-phone small { display: block; color: var(--h-muted); font-size: 13px; font-weight: 400; }

/* Burger (tablets and phones) */
.sa-header .sa-burger {
	display: none; flex: none; width: 42px; height: 42px; padding: 0;
	border: 1px solid var(--h-line); border-radius: 8px; background: #fff; color: var(--h-ink); cursor: pointer;
	align-items: center; justify-content: center;
}
.sa-header .sa-burger span,
.sa-header .sa-burger span::before,
.sa-header .sa-burger span::after {
	display: block; position: relative; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
	transition: transform .2s, background .2s;
}
.sa-header .sa-burger span::before,
.sa-header .sa-burger span::after { content: ''; position: absolute; left: 0; }
.sa-header .sa-burger span::before { top: -6px; }
.sa-header .sa-burger span::after { top: 6px; }
.sa-header.is-open .sa-burger span { background: transparent; }
.sa-header.is-open .sa-burger span::before { transform: translateY(6px) rotate(45deg); }
.sa-header.is-open .sa-burger span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1199px) {
	.sa-header .sa-h-inner { gap: 20px; }
	.sa-header .sa-nav > ul { gap: 20px; }
}

@media (max-width: 991px) {
	.sa-header .sa-h-inner,
	.sa-header.is-scrolled .sa-h-inner { gap: 12px; padding: 6px var(--sa-gutter); }
	.sa-header .sa-logo img, .sa-header.is-scrolled .sa-logo img { height: 40px; }
	.sa-header .sa-phone { font-size: 21px; text-align: right; }
	.sa-header .sa-phone small { font-size: 13px; }
	.sa-header .sa-burger { width: 38px; height: 38px; }
	.sa-header .sa-h-right { margin-left: auto; gap: 12px; }
	.sa-header .sa-burger { display: inline-flex; }
	.sa-header .sa-nav {
		display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
		background: #fff; border-bottom: 1px solid var(--h-line);
		box-shadow: 0 12px 24px rgba(17, 24, 39, .08);
		max-height: calc(100vh - 60px); overflow-y: auto;
	}
	.sa-header.is-open .sa-nav { display: block; }
	.sa-header .sa-nav > ul { display: block; padding: 8px 0; }
	.sa-header .sa-nav-item > a { padding: 13px 20px; font-size: 18px; }
	.sa-header .sa-nav-item.is-active > a { background: #f3f6fb; }
	.sa-header .sa-nav-item.is-active > a::after { left: 0; right: auto; top: 0; bottom: 0; width: 3px; height: auto; }
	.sa-header .sa-sub {
		position: static; min-width: 0; padding: 0 0 8px 16px; border: 0; box-shadow: none;
		opacity: 1; visibility: visible; transform: none;
	}
	.sa-header .sa-nav-item.has-sub > a::before { display: none; }
}

/* Typical phones 360-400px: logo + phone + burger must fit in one row */
@media (max-width: 400px) {
	.sa-header .sa-h-inner, .sa-header.is-scrolled .sa-h-inner { gap: 10px; } /* side gutters = site grid (16px) */
	.sa-header .sa-h-right { gap: 10px; }
	.sa-header .sa-logo img, .sa-header.is-scrolled .sa-logo img { height: 38px; }
	.sa-header .sa-phone { font-size: 18px; }
	.sa-header .sa-phone small { font-size: 12px; }
}
@media (max-width: 359px) {
	.sa-header .sa-h-inner, .sa-header.is-scrolled .sa-h-inner { gap: 8px; }
	.sa-header .sa-logo img, .sa-header.is-scrolled .sa-logo img { height: 32px; }
	.sa-header .sa-phone { font-size: 16px; }
	.sa-header .sa-phone small { font-size: 11px; }
}

/* Site footer (base.html), same light style as the header */
.sa-footer {
	--f-blue: #355a9f;
	--f-ink: #1d2433;
	--f-text: #4b5563;
	--f-muted: #6b7280;
	--f-line: #e5e7eb;
	background: #f6f8fb;
	border-top: 1px solid var(--f-line);
	color: var(--f-text);
	font-family: 'Roboto', sans-serif;
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
}
.sa-footer * { box-sizing: border-box; }
.sa-footer a { color: var(--f-text); text-decoration: none; transition: color .15s; }
.sa-footer a:hover { color: var(--f-blue); }
.sa-footer ul, .sa-footer li {
	margin: 0; padding: 0; list-style: none;
	font-family: inherit; font-size: inherit; line-height: inherit; text-transform: none; height: auto;
}
.sa-footer p { margin: 0; }
.sa-footer .sa-f-inner { max-width: calc(var(--sa-wrap) + 2 * var(--sa-gutter)); margin: 0 auto; padding: 0 var(--sa-gutter); }
.sa-footer > .sa-f-inner {
	display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: 40px;
	padding-top: 48px; padding-bottom: 40px;
}
.sa-footer .sa-f-logo img { display: block; height: 48px; width: auto; }
.sa-footer .sa-f-brand p { margin-top: 14px; color: var(--f-muted); }
.sa-footer .sa-f-title {
	margin-bottom: 14px; color: var(--f-ink); font-size: 14px; font-weight: 700;
	letter-spacing: .04em; text-transform: uppercase;
}
.sa-footer .sa-f-menu { display: grid; grid-template-columns: repeat(2, max-content); gap: 8px 32px; }
.sa-footer .sa-f-contacts { display: flex; flex-direction: column; gap: 8px; }
.sa-footer .sa-f-phone { color: var(--f-ink); font-size: 20px; font-weight: 700; }
.sa-footer .sa-f-bottom { border-top: 1px solid var(--f-line); font-size: 13px; color: var(--f-muted); }
.sa-footer .sa-f-bottom .sa-f-inner {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
	padding-top: 16px; padding-bottom: 16px;
}
.sa-footer .sa-f-bottom a { color: var(--f-muted); }

@media (max-width: 991px) {
	.sa-footer > .sa-f-inner { grid-template-columns: 1fr 1fr; gap: 32px 24px; padding-top: 36px; padding-bottom: 32px; }
	.sa-footer .sa-f-brand { grid-column: 1 / -1; }
}
@media (max-width: 575px) {
	.sa-footer { font-size: 16px; }
	.sa-footer .sa-f-bottom { font-size: 14px; }
	.sa-footer > .sa-f-inner { grid-template-columns: 1fr; gap: 28px; }
	.sa-footer .sa-f-logo img { height: 40px; }
}

/* Site-wide layout: content is no longer boxed into 1470px with a shadow (full screen width). */
body #wrapper .wrapper-inner { max-width: none; box-shadow: none; }
/* Old template pages (.row-container 1210px + .container-fluid 20px margins) follow the same grid */
html body #wrapper .row-container { max-width: calc(var(--sa-wrap) + 2 * var(--sa-gutter)); padding-left: var(--sa-gutter); padding-right: var(--sa-gutter); box-sizing: border-box; }
html body #wrapper .row-container > .container-fluid { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }

/* No decorative blue line under section headings (template: .page_header:after) */
html body .page_header::after, html body .page-header::after,
html body .parallax .moduletable > [class*=heading-style]::after { display: none; content: none; border: 0; }
html body .page_header, html body .page-header { padding-bottom: 0; }

/* Phones: larger base text */
@media (max-width: 767px) {
	body { font-size: 18px; }
	.item_fulltext p, .item_introtext p, .item__module p, .module_container p { font-size: 18px; line-height: 1.6; }
}

/* Fallback header height for the home slider until JS measures it */
:root { --sa-header-h: 77px; }
@media (max-width: 991px) { :root { --sa-header-h: 53px; } }
