/* ==========================================================================
   AD Systems — galvenais stils
   Izmēri nomērīti no vecās Oxygen + Automatic.css vietnes (1440px ekrānā).
   ========================================================================== */

@font-face {
	font-family: "Manrope";
	src: url("../fonts/manrope.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

:root {
	--navy: #2e3448;        /* galvene, tumšās pogas, "Sazinies ar mums" */
	--ink: #0b1623;         /* kājene, formas poga */
	--line: #1c3871;        /* sadaļu virsrakstu līnija, pogu apmales */
	--card: #f8f8f8;        /* kartīšu fons */
	--card-active: #f2f3f4; /* aktīvā slaidera kartīte */
	--tab: #ededed;         /* produktu cilnes */
	--muted: #bebebe;       /* kategoriju kartīšu teksts */
	--text: #000;
	--white: #fff;

	--container: 1280px;
	--gutter: 30px;
	--header-h: 62px;

	--fs-body: 15px;
	--fs-h1: 42.63px;
	--fs-h2: 31.98px;
	--fs-h3: 24px;
	--fs-h4: 18px;

	--sp-xs: 53px;
	--sp-s: 80px;
	--sp-m: 120px;

	--ease: cubic-bezier(.25, .8, .25, 1);
}

/* --- pamati -------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 10px); }

body {
	margin: 0;
	font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: var(--fs-body);
	line-height: 1.48;
	color: var(--text);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--navy); text-decoration: none; transition: color .2s var(--ease), background-color .2s var(--ease), opacity .2s var(--ease); }
a:hover { color: var(--line); }

h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.2; font-weight: 700; }
p { margin: 0; }

button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--line); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 10px; top: -60px;
	z-index: 1000;
	padding: 10px 16px;
	background: var(--white);
	color: var(--navy);
}
.skip-link:focus { top: 10px; }

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.anchor { display: block; position: relative; top: calc(-1 * var(--header-h)); }

.empty { padding: 20px 0; color: #606e79; }

/* --- pogas --------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 13px;
	min-height: 45px;
	padding: 10px;
	border: 1px solid var(--line);
	background: transparent;
	color: var(--navy);
	font-size: var(--fs-body);
	line-height: 1.48;
	white-space: nowrap;
	transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn img { flex: none; }
.btn--outline:hover { background: var(--navy); color: var(--card); }
.btn--outline:hover img { filter: brightness(0) invert(1); }
.btn--dark { background: var(--navy); color: var(--card); }
.btn--dark:hover { background: var(--ink); color: var(--white); }

/* --- galvene ------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--header-h);
	background: var(--navy);
	transition: box-shadow .3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 0 10px rgba(0, 0, 0, .3); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.site-header__bar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

/* Baltais logo parādās tikai pēc ritināšanas (kā vecajā "sticky" galvenē) —
   katras lapas augšā jau ir lielais logo. */
.site-header__logo {
	position: absolute;
	left: var(--gutter);
	top: 6px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s var(--ease), visibility .3s;
}
.site-header__logo img { width: 62px; height: 50px; }
.is-scrolled .site-header__logo { opacity: 1; visibility: visible; }

.nav__list,
.nav .sub-menu { list-style: none; margin: 0; padding: 0; }

.nav__list { display: flex; }
.nav__list > li { position: relative; }
.nav__list > li > a {
	display: flex;
	align-items: center;
	gap: 6px;
	height: var(--header-h);
	padding: 0 20px;
	color: var(--white);
	font-size: var(--fs-body);
}
.nav__list > li > a:hover,
.nav__list > .current-menu-item > a,
.nav__list > .current-menu-ancestor > a { color: var(--white); background: rgba(255, 255, 255, .06); }

.nav__caret {
	width: 6px; height: 6px;
	margin-top: -3px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
}

.nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 197px;
	padding: 0;
	background: var(--navy);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.nav li:hover > .sub-menu,
.nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav .sub-menu a {
	display: block;
	padding: 20px;
	color: var(--white);
	white-space: nowrap;
}
.nav .sub-menu a:hover { background: rgba(255, 255, 255, .08); color: var(--white); }

.nav-toggle {
	display: none;
	position: absolute;
	right: var(--gutter);
	top: 50%;
	width: 44px; height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	background: transparent;
}
.nav-toggle__bars { display: grid; gap: 6px; width: 28px; margin: 0 auto; }
.nav-toggle__bars span { height: 2px; background: var(--white); transition: transform .3s var(--ease), opacity .3s; }
.nav-open .nav-toggle__bars span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle__bars span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- zīmols: tumšā "jumta" forma + logo ---------------------------------- */

.brand-logo { display: inline-block; }
.brand-logo img { width: 260px; height: 210px; }

.hero__shape,
.page-cover__shape {
	position: absolute;
	left: 0; top: 0;
	z-index: 2;
	width: 100%;
	height: 345px;
	background: url("../img/shape.svg") 80% 0 / contain no-repeat;
	pointer-events: none;
}

/* --- slaideris (sākumlapa, par mums) -------------------------------------- */

.hero {
	position: relative;
	height: calc(100vh - var(--header-h));
	height: calc(100svh - var(--header-h));
	min-height: 640px;
	max-height: 1100px;
	background: rgba(91, 91, 91, .7);
	color: var(--white);
}

.hero__brand { position: relative; z-index: 3; padding-top: 53px; }

.hero__slides { position: absolute; inset: 0; overflow: hidden; }
.hero__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity .9s var(--ease);
}
.hero__slide.is-active { opacity: 1; }
.hero__slide::after { content: ""; position: absolute; inset: 0; background: rgba(48, 46, 46, .1); }
.hero__img { width: 100%; height: 100%; object-fit: cover; }

.hero__arrow {
	position: absolute;
	top: 50%;
	z-index: 4;
	width: 35px; height: 35px;
	margin-top: -17px;
	border: 0;
	background: transparent;
}
.hero__arrow::before {
	content: "";
	position: absolute;
	left: 50%; top: 50%;
	width: 10px; height: 10px;
	border-left: 2px solid var(--white);
	border-bottom: 2px solid var(--white);
	transform: translate(-30%, -50%) rotate(45deg);
}
.hero__arrow--prev { left: 50px; }
.hero__arrow--next { right: 50px; }
.hero__arrow--next::before { transform: translate(-70%, -50%) rotate(-135deg); }

.hero__content {
	position: absolute;
	left: 0; right: 0;
	bottom: -15px;
	z-index: 3;
}

.hero__title { margin-bottom: 60px; border-bottom: 1px solid var(--white); }
.hero__title h1,
.hero__title h2 { font-size: var(--fs-h1); font-weight: 300; line-height: 1.2; color: var(--white); }

.hero__cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 25px;
}

.hero__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-height: 255px;
	padding: 30px;
	border: 0;
	background: rgba(255, 255, 255, .08);
	color: #efefef;
	text-align: left;
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	transition: background-color .4s, color .4s, transform .4s;
}
.hero__card:hover { background: rgba(255, 255, 255, .16); }
.hero__card.is-active { background: var(--card-active); color: #111; }
.hero__card-icon { width: 50px; height: 50px; transition: filter .4s; }
.hero__card:not(.is-active) .hero__card-icon { filter: brightness(0) invert(1); }
.hero__card-title { display: block; font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; }
.hero__card-text { display: block; margin-top: 5px; font-size: var(--fs-body); line-height: 1.48; }

/* --- lapas augša ---------------------------------------------------------- */

.page-cover {
	position: relative;
	height: 317px;
	background: #5b5b5b center / cover no-repeat;
}
.page-cover::after { content: ""; position: absolute; inset: 0; background: rgba(48, 46, 46, .1); }
.page-cover__inner { position: relative; z-index: 3; padding-top: 54px; }

.page-plain { padding-top: var(--sp-s); }
.page-plain .brand-logo { margin-bottom: 30px; }
.page-plain .brand-logo img { width: 250px; height: 202px; }

/* --- sadaļas un virsraksti ------------------------------------------------ */

.section--xs { padding-top: var(--sp-xs); }
.section--s { padding: var(--sp-s) 0; }
.section--m { padding: var(--sp-m) 0; }
.section--tabs { padding-bottom: 0; }
.section--flush { padding: var(--sp-s) 0 0; }
.section--page { padding-bottom: var(--sp-s); }
.section--products { padding: var(--sp-m) 0 var(--sp-s); }
.section--navy { background: var(--navy); color: var(--white); }

.section-title {
	margin-bottom: 30px;
	border-bottom: 1px solid var(--line);
}
.section-title > * { font-size: var(--fs-h2); font-weight: 300; line-height: 1.2; color: var(--text); }
.section-title--page { margin-bottom: 54px; border-color: var(--navy); }
.section-title--page > * { font-size: var(--fs-h1); }
.section-title--light { border-color: var(--white); }
.section-title--light > * { color: var(--white); }
.section--tabs .section-title { margin-bottom: 30px; }
.section--xs.section--tabs .section-title--page { margin-bottom: 54px; }

/* --- produktu cilnes ------------------------------------------------------ */

.product-tabs { position: relative; }
.product-tabs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.product-tabs__item { flex: 1 1 auto; min-width: 142px; background: var(--tab); }
.product-tabs__link {
	display: flex;
	align-items: center;
	gap: 7px;
	height: 52px;
	padding: 5px 10px;
	color: var(--text);
	white-space: nowrap;
}
.product-tabs__link:hover,
.product-tabs__item.is-open .product-tabs__link,
.product-tabs__item.is-current .product-tabs__link { color: var(--navy); background: #e2e3e6; }
.product-tabs__caret {
	width: 6px; height: 6px;
	margin-top: -3px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s;
}
.is-open .product-tabs__caret { transform: translateY(3px) rotate(-135deg); }

.product-tabs__panel {
	position: absolute;
	left: 0; right: 0;
	top: 100%;
	z-index: 20;
	padding: 30px;
	background: var(--white);
	box-shadow: 0 18px 30px rgba(11, 22, 35, .08);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.product-tabs__item.is-open .product-tabs__panel { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) {
	.product-tabs__item:hover .product-tabs__panel { opacity: 1; visibility: visible; transform: none; }
}
.product-tabs__products {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 383px));
	gap: 8px 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.product-tabs__products li::before { content: "•"; margin-right: 6px; color: var(--navy); }
.product-tabs__products a { color: var(--navy); }
.product-tabs__products a:hover { text-decoration: underline; }

/* --- kategoriju mozaīka --------------------------------------------------- */

.mosaic { display: grid; gap: 30px; }
.mosaic__row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: stretch; }
.mosaic__stack { display: grid; gap: 30px; align-content: start; }
.mosaic__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

.cat-card {
	display: flex;
	flex-direction: column;
	padding-bottom: 20px;
	background: var(--card);
}
.cat-card__media { display: block; overflow: hidden; }
.cat-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.cat-card:hover .cat-card__img { transform: scale(1.03); }
.cat-card--square .cat-card__media { width: 250px; aspect-ratio: 1; }
.cat-card--tall .cat-card__media { width: 100%; aspect-ratio: 1; }
.cat-card--tall .cat-card__img { object-fit: contain; }
.cat-card--half .cat-card__media { width: 100%; height: 225px; }
.cat-card--wide .cat-card__media { width: 296px; height: 222px; }
.cat-card__title { margin: 13px 14px 5px; font-size: var(--fs-h3); line-height: 1.2; }
.cat-card__title a { color: var(--navy); }
.cat-card__title a:hover { color: var(--line); }
.cat-card__text { margin: 0 14px; max-width: 476px; color: var(--muted); }

/* --- produkta kartīte ----------------------------------------------------- */

.products { display: grid; gap: 30px; }

.product {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	background: var(--card);
	scroll-margin-top: calc(var(--header-h) + 20px);
}

.product__gallery { padding: 50px 0 50px 53px; }
.product__main { display: block; width: 100%; max-width: 490px; aspect-ratio: 1; overflow: hidden; }
.product__main-img { width: 100%; height: 100%; object-fit: cover; }
.product__thumbs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	max-width: 490px;
	margin-top: 10px;
}
.product__thumb { display: block; width: 150px; height: 84px; overflow: hidden; }
.product__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease), opacity .3s; }
.product__thumb:hover img { transform: scale(1.05); }

.product__body { padding: 0 20px 35px; }
.product__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 14px;
	margin: 0 -20px 65px 0;
}
.product__title { font-size: var(--fs-h3); line-height: 1.2; }
.product__label { margin: 20px 0 14px; font-size: var(--fs-h4); }
.product__label--spaced { margin-top: 19px; }
.product__spec { margin: 0; padding-left: 40px; }
.product__content { margin-top: 20px; }

/* --- serviss -------------------------------------------------------------- */

.service { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: stretch; }
.service__media img { width: 100%; height: 100%; object-fit: cover; }
.service__body { display: flex; flex-direction: column; gap: 18px; padding: 20px 0; }
.service__title { font-size: var(--fs-h3); }
.service__sub { margin-top: 18px; font-size: var(--fs-h4); }
.service__cta { display: flex; justify-content: flex-end; margin-top: auto; padding-top: 30px; }

/* --- komanda -------------------------------------------------------------- */

.team { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.team__card { display: grid; grid-template-columns: 1fr 1fr; min-height: 450px; }
.team__photo { background: #dcdde0; }
.team__photo img { width: 100%; height: 100%; object-fit: cover; }
.team__body {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 20px;
	background: var(--card);
}
.team__head { text-align: right; }
.team__name { font-size: var(--fs-h3); }
.team__role { margin-top: 0; }
.team__contacts { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.team__contacts li { display: flex; align-items: center; gap: 14px; }
.team__contacts img { flex: none; width: 39px; height: 39px; }
.team__contacts a { color: var(--text); word-break: break-word; }
.team__contacts a:hover { color: var(--line); }

/* --- logotipi ------------------------------------------------------------- */

.logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 40px 60px;
	padding: 20px 0;
}
.logos__item img { max-height: 90px; width: auto; filter: grayscale(1); opacity: .85; transition: filter .3s, opacity .3s; }
.logos__item img:hover { filter: none; opacity: 1; }

/* --- kontakti (karte + forma) --------------------------------------------- */

.contact { display: grid; gap: 100px; }
.contact__map { position: relative; aspect-ratio: 16 / 9; background: rgba(255, 255, 255, .05); }
.contact__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* FluentForm: tādi paši toņi kā vecajā vietnē. */
.fluentform .ff-el-group { margin-bottom: 19px; }
.fluentform .ff-el-form-control {
	padding: 11px 15px;
	border: 1px solid #dadbdd;
	border-radius: 7px;
	background: var(--white);
	color: var(--text);
	font-family: inherit;
	font-size: 16px;
}
.fluentform .ff-el-form-control:focus { border-color: var(--line); outline: 0; box-shadow: 0 0 0 2px rgba(28, 56, 113, .2); }
.fluentform .ff-btn-submit,
.fluentform .ff-btn-submit:hover {
	padding: 8px 20px;
	border: 1px solid transparent;
	border-radius: 7px;
	background: var(--ink) !important;
	color: var(--card) !important;
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	opacity: 1;
}
.fluentform .ff-btn-submit:hover { background: #000 !important; }
.section--navy .fluentform .ff-el-input--label label,
.section--navy .ff-message-success,
.section--navy .ff-errors-in-stack { color: var(--white); }
.form-missing { color: inherit; opacity: .8; }

/* --- kājene --------------------------------------------------------------- */

.site-footer { padding: var(--sp-xs) 0; background: var(--ink); color: var(--white); }
.site-footer__title { margin-bottom: 30px; font-size: var(--fs-h2); font-weight: 300; }
.site-footer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.site-footer__contacts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-content: start;
	gap: 17px 30px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-footer__contacts li { display: flex; align-items: center; gap: 20px; }
.site-footer__contacts img { flex: none; width: 39px; height: 39px; }
.site-footer__contacts a { color: var(--white); }
.site-footer__contacts a:hover { color: var(--white); opacity: .75; }
.site-footer__brand { display: flex; align-items: flex-end; justify-content: flex-end; gap: 55px; }
.site-footer__social { display: flex; gap: 14px; }
.site-footer__social a:hover { opacity: .75; }
.site-footer__social img { width: 44px; height: 44px; }
.site-footer__logo img { width: 200px; height: 162px; }

/* --- raksti --------------------------------------------------------------- */

.post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 50px;
}
.post-card { display: flex; flex-direction: column; }
.post-card__media { display: block; height: 200px; margin-bottom: 16px; overflow: hidden; }
.post-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card__img { transform: scale(1.03); }
.post-card__title { font-size: var(--fs-h3); font-weight: 300; }
.post-card__title a { color: var(--text); }
.post-card__title a:hover { color: var(--line); }
.post-card__date { margin: 6px 0 13px; }
.post-card__more { align-self: flex-end; min-height: 44px; margin-top: auto; padding: 10px 16px; border-color: var(--text); color: var(--text); }
.post-card__excerpt { margin-bottom: 25px; }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 60px; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px; height: 44px;
	padding: 0 10px;
	border: 1px solid var(--text);
	color: var(--text);
}
.pagination .page-numbers.current,
.pagination a.page-numbers:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }

.article__head {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	min-height: 500px;
	margin-bottom: 65px;
}
.article__head--noimg { grid-template-columns: 1fr; min-height: 0; }
.article__media img { width: 100%; height: 100%; max-height: 500px; object-fit: cover; }
.article__titlebox {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-end;
	padding: 30px;
	background: var(--card);
}
.article__title { font-size: var(--fs-h1); font-weight: 300; line-height: 1.2; text-align: left; }
.article__date { margin-top: 10px; }

.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.6em; font-size: var(--fs-h2); }
.prose h3 { margin-top: 1.4em; font-size: var(--fs-h3); }
.prose h4 { margin-top: 1.2em; font-size: var(--fs-h4); }
.prose ul, .prose ol { padding-left: 40px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose img { height: auto; }
.prose figure { margin-left: 0; margin-right: 0; }
.page-intro { margin-bottom: 40px; }

/* --- galerija ------------------------------------------------------------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filters__btn {
	padding: 6px 12px;
	border: 0;
	border-radius: 3px;
	background: var(--card-active);
	color: var(--text);
	font-size: 13px;
	transition: background-color .2s, color .2s;
}
.filters__btn:hover { background: #e2e3e6; }
.filters__btn.is-active { background: #606e79; color: var(--white); }

.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.gallery__item { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--card); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item.is-hidden { display: none; }

/* --- modālais logs un bilžu skatītājs ------------------------------------- */

.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(11, 22, 35, .7); }
.modal__dialog {
	position: relative;
	width: 100%;
	max-width: 600px;
	max-height: calc(100vh - 40px);
	overflow: auto;
	padding: 60px 40px 40px;
	background: var(--white);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	animation: ads-pop .25s var(--ease);
}
.modal__close,
.lightbox__close {
	position: absolute;
	top: 10px; right: 14px;
	width: 40px; height: 40px;
	border: 0;
	background: transparent;
	font-size: 32px;
	line-height: 1;
}
body.has-modal { overflow: hidden; }

.lightbox { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; background: rgba(0, 0, 0, .9); }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 92vw; max-height: 88vh; object-fit: contain; animation: ads-pop .25s var(--ease); }
.lightbox__close { color: var(--white); }
.lightbox__nav {
	position: absolute;
	top: 50%;
	width: 56px; height: 56px;
	margin-top: -28px;
	border: 0;
	background: transparent;
	color: var(--white);
	font-size: 48px;
	line-height: 1;
}
.lightbox__nav--prev { left: 10px; }
.lightbox__nav--next { right: 10px; }
.lightbox.is-single .lightbox__nav { display: none; }

@keyframes ads-pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* --- planšete (Oxygen: ≤992px) -------------------------------------------- */

@media (max-width: 1160px) {
	.nav-toggle { display: block; }
	.nav-open .site-header__logo { opacity: 1; visibility: visible; }
	.nav {
		position: fixed;
		left: 0; right: 0;
		top: var(--header-h);
		bottom: 0;
		overflow-y: auto;
		padding: 10px 0 40px;
		background: var(--navy);
		opacity: 0;
		visibility: hidden;
		transition: opacity .25s var(--ease), visibility .25s;
	}
	.admin-bar .nav { top: calc(var(--header-h) + 46px); }
	.nav-open .nav { opacity: 1; visibility: visible; }
	.nav__list { flex-direction: column; }
	.nav__list > li > a { height: auto; padding: 16px var(--gutter); font-size: 17px; }
	.nav .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		padding-bottom: 8px;
		background: rgba(0, 0, 0, .12);
	}
	.nav .sub-menu a { padding: 11px calc(var(--gutter) + 18px); }
	.nav__caret { display: none; }
}

@media (max-width: 992px) {
	:root {
		--fs-h1: 36px;
		--fs-h2: 28px;
		--fs-h3: 22px;
		--sp-s: 64px;
		--sp-m: 90px;
	}

	.hero { height: auto; min-height: 0; max-height: none; padding-bottom: 40px; }
	.hero__slides { height: 560px; inset: 0 0 auto; }
	.hero__content { position: relative; bottom: auto; padding-top: 230px; }
	.hero__cards { grid-template-columns: 1fr; gap: 12px; }
	.hero__card { min-height: 0; }
	.hero__card:not(.is-active) { background: var(--navy); }
	.hero__title { margin-bottom: 30px; }

	.product-tabs__products { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.mosaic__row { grid-template-columns: 1fr; }

	.product { grid-template-columns: 1fr; gap: 0; }
	.product__gallery { padding: 30px 30px 0; }
	.product__main, .product__thumbs { max-width: none; }
	.product__thumbs { justify-content: flex-start; gap: 12px; }
	.product__body { padding: 30px; }
	.product__actions { justify-content: flex-start; order: 2; margin: 0 0 24px; }

	.service { grid-template-columns: 1fr; }
	.service__media img { aspect-ratio: 4 / 3; height: auto; }

	.team { grid-template-columns: 1fr; }

	.site-footer__grid { grid-template-columns: 1fr; }
	.site-footer__brand { justify-content: space-between; }

	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 30px; }
	.gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.article__head { grid-template-columns: 1fr; min-height: 0; }
	.article__media img { max-height: 420px; }
	.article__titlebox { align-items: flex-start; }
}

/* --- telefons (Oxygen: ≤768px / ≤480px) ----------------------------------- */

@media (max-width: 768px) {
	:root {
		--gutter: 20px;
		--fs-h1: 30px;
		--fs-h2: 25px;
		--fs-h3: 20px;
		--sp-xs: 36px;
		--sp-s: 50px;
		--sp-m: 64px;
	}

	.brand-logo img { width: 170px; height: auto; }
	.page-plain .brand-logo img { width: 170px; }
	.hero__shape, .page-cover__shape { height: 210px; background-position: 100% 0; background-size: auto 100%; }
	.hero__brand, .page-cover__inner { padding-top: 30px; }
	.hero__slides { height: 460px; }
	.hero__content { padding-top: 220px; }
	.hero__arrow--prev { left: 6px; }
	.hero__arrow--next { right: 6px; }
	.page-cover { height: 230px; }

	.product-tabs__list { gap: 2px; }
	.product-tabs__item { min-width: calc(50% - 1px); flex-basis: calc(50% - 1px); }
	.product-tabs__link { height: 46px; white-space: normal; line-height: 1.2; font-size: 14px; justify-content: space-between; }
	.product-tabs__panel { padding: 20px; }
	.product-tabs__products { grid-template-columns: 1fr; }

	.mosaic__pair { grid-template-columns: 1fr; }
	.cat-card--square .cat-card__media,
	.cat-card--wide .cat-card__media { width: 100%; height: auto; aspect-ratio: 4 / 3; }
	.cat-card--half .cat-card__media { height: auto; aspect-ratio: 4 / 3; }

	.product__gallery { padding: 20px 20px 0; }
	.product__body { padding: 24px 20px; }
	.product__thumb { width: calc(33.333% - 8px); height: auto; aspect-ratio: 16 / 9; }
	.product__spec { padding-left: 22px; }
	.product__actions .btn { flex: 1 1 auto; }

	.team__card { grid-template-columns: 1fr; min-height: 0; }
	.team__photo img { aspect-ratio: 4 / 5; height: auto; }
	.team__head { text-align: left; margin-bottom: 24px; }

	.contact { gap: 40px; }
	.contact__map { aspect-ratio: 4 / 3; }

	.site-footer__contacts { grid-template-columns: 1fr; }
	.site-footer__brand { flex-direction: column-reverse; align-items: flex-start; gap: 30px; }
	.site-footer__logo img { width: 150px; height: auto; }

	.post-grid { grid-template-columns: 1fr; }
	.gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.article__head { gap: 0; margin-bottom: 40px; }
	.modal__dialog { padding: 56px 20px 24px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
