/* ---------- Containers ---------- */
.section {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding-inline: var(--gutter);
}
.container {
	position: relative;
	width: 100%;
	max-width: var(--site-width);
	margin-inline: auto;
}
.site-main { flex: 1 0 auto; }

/* ---------- Header (Bricks 40, Frames "header bravo") ---------- */
.site-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: var(--header-height);
	padding: 1rem var(--gutter) var(--space-s);
	overflow: visible;
	background: var(--white);
}
/* Fixed bar; no transform so the mobile overlay (position: fixed) covers the viewport. */
.site-header__inner {
	position: fixed;
	z-index: 1999;
	top: calc(1rem + var(--wp-admin--admin-bar--height, 0px)); /* below the admin bar, like the Bricks header */
	left: 0;
	right: 0;
	margin-inline: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--content-gap);
	width: 100%;
	max-width: var(--site-width);
	padding: 0 3.2rem 0 3rem;
	background: var(--white);
	border-radius: var(--radius-l);
	transition: max-width .3s ease, box-shadow .3s ease;
}
.site-header__inner.is-scrolled {
	max-width: var(--header-scrolled-width);
	box-shadow: var(--shadow-header);
}
.site-header__logo { display: inline-block; flex-shrink: 0; }
.site-header__logo img { width: 8.7rem; height: auto; }

.main-nav__items {
	display: flex;
	align-items: center;
	gap: 3rem;
	list-style: none;
}
.main-nav__item { position: static; }
.main-nav__link {
	display: block;
	padding: 3.3rem 0;
	font-size: 1.8rem;
	font-weight: 700;
	line-height: 2.4rem;
	color: var(--base);
	text-align: left;
}
.main-nav__item.is-active > .main-nav__link,
.main-nav__item.has-dropdown:hover > .main-nav__link,
.main-nav__item.is-open > .main-nav__link { color: var(--primary); }
.main-nav__item--strong > .main-nav__link:hover { color: var(--primary); }

/* Mega dropdown: white rounded panel under the bar, columns of links (Bricks .nav-nested__content). */
.mega {
	position: absolute;
	z-index: 999;
	top: 9.6rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: row;
	column-gap: 9.8rem;
	row-gap: 2.4rem;
	width: 100%;
	max-width: var(--site-width);
	padding: 4.6rem 8rem;
	background: var(--white);
	border-radius: var(--radius-l);
	box-shadow: var(--shadow-card);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, visibility .2s;
}
/* Hover bridge over the gap between the nav item and the panel. */
.mega::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 1.5rem;
}
.main-nav__item.is-open > .mega,
.main-nav__item.has-dropdown:hover > .mega {
	opacity: 1;
	visibility: visible;
}
.mega__col {
	display: flex;
	flex-direction: column;
	row-gap: 3.9rem;
	max-width: 29.7rem;
}
.mega__heading {
	padding-left: 3.5rem;
	font-size: 1.9rem;
	font-weight: 700;
	line-height: 2.4rem;
	color: var(--secondary);
}
.mega__menu {
	display: flex;
	flex-direction: column;
	gap: 2.3rem;
	list-style: none;
}
.mega__menu > li { margin-left: 1rem; }
.mega__menu a {
	position: relative;
	display: inline-block;
	padding-left: 2.5rem;
	font-size: 1.8rem;
	font-weight: 400;
	line-height: 2.4rem;
	color: var(--base);
}
.mega__menu a::before {
	content: "";
	position: absolute;
	left: 0;
	top: .5rem;
	width: 1rem;
	height: 1.2rem;
	background: url("../img/menu-arrow.svg") no-repeat center / contain;
	opacity: 0;
	transform: translateY(3px);
	filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .25));
	transition: opacity .3s ease;
	pointer-events: none;
}
.mega__menu a:hover,
.mega__menu .current-menu-item > a {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 5px;
}
.mega__menu a:hover::before,
.mega__menu .current-menu-item > a::before { opacity: 1; }

.header-info { display: flex; flex-direction: column; align-items: flex-start; flex-shrink: 0; }
.header-info__label {
	font-size: 1.4rem;
	line-height: 2.4rem;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--primary);
}
.header-info__phones {
	display: flex;
	justify-content: space-around;
	column-gap: 1rem;
	width: 100%;
}
.header-info__phones a {
	font-size: 1.6rem;
	font-weight: 600;
	line-height: 2.4rem;
	color: var(--primary);
}

.nav-toggle {
	display: none;
	position: relative;
	z-index: 2;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 2.2rem;
	color: var(--secondary);
}
.nav-toggle svg { width: 3rem; height: 2.2rem; }
.nav-toggle__close { display: none; }
.nav-toggle__close svg { width: 1.2rem; height: 1.6rem; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }

@media (max-width: 991px) {
	.site-header__inner { column-gap: 1rem; }
	.mega {
		width: 94.2%;
		padding-inline: 4rem;
		column-gap: 5rem;
	}
}
@media (max-width: 781px) {
	.header-info { display: none; }
}
/* Mobile: full-screen white overlay, items centred (Bricks "Mobile Nav Nested"). */
@media (max-width: 767px) {
	.nav-toggle { display: flex; }
	.main-nav {
		position: fixed;
		inset: 0;
		z-index: 1;
		display: flex;
		overflow-y: auto;
		padding: 4rem 0;
		background: var(--white);
		opacity: 0;
		visibility: hidden;
		transition: opacity .2s ease, visibility .2s;
	}
	.main-nav.is-open { opacity: 1; visibility: visible; }
	.main-nav__items {
		flex-direction: column;
		align-items: flex-start;
		gap: 2rem;
		margin: auto;
	}
	.main-nav__item { padding-inline: 2rem; }
	.main-nav__link {
		padding: 0;
		font-size: 1.9rem;
		font-weight: 600;
		line-height: 2.5rem;
	}
	.main-nav__item--strong > .main-nav__link { font-weight: 700; }
	.main-nav__item.has-dropdown:hover > .main-nav__link { color: var(--base); }
	.main-nav__item.is-active > .main-nav__link,
	.main-nav__item.is-open > .main-nav__link { color: var(--primary); }
	.mega {
		position: static;
		transform: none;
		display: none;
		flex-direction: column;
		row-gap: 2.3rem;
		width: auto;
		max-width: none;
		padding: 2rem 0;
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transition: none;
	}
	.mega::before { display: none; }
	.main-nav__item.is-open > .mega { display: flex; }
	.mega__col { max-width: none; row-gap: 2rem; }
	.mega__heading { font-size: 1.75rem; line-height: 2.5rem; }
	.mega__menu a { font-size: 1.6rem; line-height: 2.5rem; }
	html.has-nav-open { overflow: hidden; }
}

/* ---------- Breadcrumbs (Bricks breadcrumbs element) ---------- */
.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.6rem;
	line-height: 2.4rem;
}
.breadcrumbs__item {
	font-size: 1.4rem;
	font-weight: 400;
	text-transform: capitalize;
	color: var(--crumb);
}
.breadcrumbs__home svg { width: 1.4rem; height: 1.4rem; }
.breadcrumbs__sep { display: flex; color: rgba(33, 56, 110, .6); }
.breadcrumbs__sep svg { width: 1.4rem; height: 1.4rem; }

/* ---------- Page hero card: breadcrumbs + H1 (Bricks section 938) ---------- */
.page-hero { padding-block: 0; }
.page-hero__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	row-gap: 3.5rem;
	padding: 2.1rem 3.5rem 6.5rem;
	border-radius: var(--radius-s);
	background: var(--hero-bg) no-repeat top left / cover;
}
.page-hero__title {
	font-size: 3.9rem;
	letter-spacing: -1.1px;
	color: var(--secondary);
}
@media (max-width: 767px) {
	.page-hero__card { padding-bottom: 4rem; }
	.page-hero__title { font-size: 2.5rem; }
}

/* ---------- Generic page intro: breadcrumbs, centred H1 + date (Bricks 553 / 2068) ---------- */
.page-crumbs { padding-block: 0; }
.page-crumbs__inner { padding: 2.1rem 3.5rem; border-radius: var(--radius-s); }
.page-intro { margin-top: 7rem; }
.page-intro__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	row-gap: 4.3rem;
}
.page-intro__title {
	font-size: 5.6rem;
	letter-spacing: -1.1px;
	text-align: center;
	color: var(--base-ultra-dark);
}
.post-date-style {
	font-size: 1.8rem;
	font-weight: 400;
	line-height: 2.4rem;
	color: var(--text-faded);
}
@media (max-width: 767px) {
	.page-intro { margin-bottom: 2rem; }
	.page-intro__title { font-size: 3rem; }
	.single-actualites .page-intro__inner,
	.single-project-news .page-intro__inner { row-gap: 2rem; } /* news singles (2068); purchases/vacancies keep the 553 gap */
}

/* ---------- Generic page body (553 "Main content section", width--xl) ---------- */
.page-content.page-content--generic { padding: 0 var(--gutter); }
.page-content--generic > .page-main {
	display: flex;
	flex-direction: column;
	align-items: center;
	row-gap: 6.4rem;
	width: 100%;
	max-width: var(--width-xl);
	margin-inline: auto;
	padding-top: 4.2rem;
}
.page-content--generic > .page-main--share { padding-top: 6.4rem; }
.page-content--generic > .page-main + .page-main:not(.page-main--share) { margin-top: 0; padding-top: 6.4rem; }
@media (max-width: 767px) {
	.page-content--generic > .page-main { padding-top: 0; }
}
.page-main__image { display: flex; justify-content: center; width: 100%; }
.page-main__image img { width: 100%; max-width: 89rem; border-radius: var(--radius-l); }
/* Shrink-to-fit wrapper, as the Bricks div with align-self: center (narrow content stays narrow). */
.page-main__body {
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	max-width: 100%;
}
.page-main__body--wide { align-self: stretch; }
.page-main__content {
	width: 90%;
	font-size: 1.6rem;
	font-weight: 400;
	letter-spacing: -1.1px;
	color: var(--ink);
	text-align: left;
}
@media (max-width: 767px) {
	.page-main__content { width: 100%; }
}

/* ---------- News single (2068, width--l) ---------- */
.news-single { padding-top: 4.2rem; padding-bottom: 6.4rem; }
.news-single__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	row-gap: 6.4rem;
	width: 100%;
	max-width: var(--width-l);
}
.news-single__content {
	max-width: 100%;
	font-size: 1.6rem;
	font-weight: 400;
	letter-spacing: -1.1px;
	color: var(--ink);
	text-align: left;
}
.news-single__share { padding-bottom: 10.4rem; }
@media (max-width: 767px) {
	.news-single { padding-top: 0; }
	.news-single__content { width: 100%; }
}

/* ---------- Share links ("Dalīties") ---------- */
.share {
	display: flex;
	flex-direction: column;
	align-items: center;
	row-gap: 1.8rem;
}
.share__title {
	font-size: 1.6rem;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -1.1px;
	color: var(--text-faded);
}
.share__list { display: flex; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.share__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	color: var(--line-blue);
}
.share__link svg { width: 2.4rem; height: 2.4rem; }

/* ---------- Search results ---------- */
.search-results__list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 3.2rem; }
.search-results__title { padding: 0; font-size: 2.3rem; letter-spacing: -1.1px; }
.search-results__title a:hover { color: var(--primary); }
.search-results__excerpt { margin-top: .8rem; padding: 0; color: var(--secondary); }
.search-results .nav-links { display: flex; gap: 1.2rem; margin-top: 4rem; font-size: 1.6rem; }
.search-results .nav-links .current { color: var(--primary); font-weight: 700; }

/* ---------- 404 (Frames "error bravo") ---------- */
.error-404 { padding-block: var(--section-space-xl); }
.error-404__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	row-gap: 5rem;
	text-align: center;
}
.error-404__code { font-size: 9.5rem; }
.error-404__text { font-size: 6rem; font-weight: 700; line-height: 1; color: var(--base-ultra-dark); }
@media (max-width: 478px) {
	.error-404__text { font-size: 4rem; }
}

/* ---------- Footer (Bricks 42, Frames "footer alpha") ---------- */
.site-footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 5rem;
	padding: 0 2.5rem 2.3rem;
}
.site-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: var(--space-xxl);
	width: 100%;
	max-width: var(--site-width);
	padding: 5.4rem 2rem 5.5rem;
	background: var(--surface-blue) var(--footer-bg) repeat left top / contain;
	border-radius: var(--radius-l) var(--radius-l) 0 0;
}
.site-footer__brand { display: flex; flex-direction: column; row-gap: var(--content-gap); padding-left: 3rem; }
.site-footer__logo { display: block; width: 10.2rem; }
.site-footer__logo img { width: 10.2rem; height: auto; }
.site-footer__social { display: flex; flex-direction: row; gap: 1rem; }
.site-footer__social--mobile { display: none; }
.footer-social img { width: 2.2rem; height: 2.2rem; }
.site-footer__nav {
	display: flex;
	flex-direction: row;
	justify-content: space-evenly;
	gap: var(--space-l);
}
.site-footer__col { display: flex; flex-direction: column; row-gap: 1.7rem; width: fit-content; }
.site-footer__title {
	font-size: 1.6rem;
	font-weight: 700;
	letter-spacing: -.011em;
	text-transform: uppercase;
	color: var(--primary);
}
.site-footer__menu {
	display: flex;
	flex-direction: column;
	gap: .8rem;
	list-style: none;
}
.site-footer__menu a,
.site-footer__submenu a {
	display: flex;
	font-size: 1.6rem;
	color: var(--secondary);
}
.site-footer__submenu a { color: var(--base); }

.site-footer__sub {
	display: flex;
	width: 100%;
	max-width: var(--site-width);
	padding-bottom: 1.9rem;
	background: var(--surface-blue) var(--subfooter-bg) repeat center / 400px;
	border-radius: 0 0 var(--radius-l) var(--radius-l);
}
.site-footer__sub-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--space-s);
	width: 100%;
	margin-inline: 5.2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line-blue);
}
.site-footer__copy { font-size: 1.6rem; color: var(--secondary); }
.site-footer__submenu { display: flex; gap: 5rem; list-style: none; }

@media (max-width: 991px) {
	.site-footer__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
	.site-footer { background: var(--surface-blue); }
	.site-footer__grid { gap: 1.7rem; background-size: cover; }
	.site-footer__brand { padding: 0 0 1.7rem; align-items: center; }
	.site-footer__social--desktop { display: none; }
	.site-footer__social--mobile { display: flex; justify-content: center; margin-top: 1.3rem; }
	.site-footer__nav { flex-direction: column; align-items: center; justify-content: center; row-gap: 4.8rem; }
	.site-footer__col { align-items: center; }
	.site-footer__menu { align-items: center; }
	.site-footer__menu a { justify-content: center; }
	.site-footer__sub { background-size: cover; }
	.site-footer__sub-inner { flex-direction: column; row-gap: 3.2rem; margin-inline: 0; text-align: center; }
	.site-footer__copy { order: 2; width: 100%; }
	.site-footer__submenu { flex-direction: column; align-items: center; gap: .8rem; }
}
@media (max-width: 478px) {
	.site-footer__menu a { color: var(--base); }
}
