/* Lipīgais header + augšējā josla ar tālruni + CTA (Paper „Variants 1 — Tumšā josla”).
   components/header.css ir ģenerēts un šis fails ielādējas pirms tā un pirms legacy/pages CSS — tāpēc ID prefikss (un !important tur, kur legacy lieto !important).
   Ritinātais stāvoklis (#c-header.is-scrolled) un --scroll-progress — assets/js/modules/header.js. */

/* legacy „html, body { overflow-x: hidden }” padara body par ritināšanas konteineru un salauž position: sticky; clip — tas pats bez konteinera. */
:root,
:root body { overflow-x: clip; }

#c-header { position: sticky; top: 0; z-index: 100; }
.admin-bar #c-header { top: 32px; }
@media (max-width: 782px) { .admin-bar #c-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar #c-header { top: 0; } }

/* Augšējā josla. */
/* Saturs tajā pašā .l-container kā header josla (plašos ekrānos 1440px centrā), malas kā #c-header__bar. */
#c-header .c-header__top { height: 36px; padding: 0 4rem; background: #1B1A19; border-bottom: 1px solid rgb(255 255 255 / 8%); }
#c-header .c-header__top-inner { display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 20px; height: 100%; }
#c-header .c-header__phone { display: inline-flex; align-items: center; gap: 10px; color: rgb(255 255 255 / 85%); font-size: 14px; font-weight: 500; line-height: 18px; letter-spacing: 0.02em; text-decoration: none; transition: color 0.2s ease; }
#c-header .c-header__phone svg { flex-shrink: 0; width: 14px; height: 14px; color: #A88F63; }
#c-header .c-header__phone:hover { color: #fff; }
#c-header .c-header__phone:focus-visible { outline: 1px solid #A88F63; outline-offset: 4px; }

/* Josla 72px (CTA 40 + 2×16); ritinot tumša ar ēnu. Augstums abos stāvokļos vienāds — saturs ritinot nelec. */
#c-header #c-header__inner { min-height: 40px; }
#c-header #c-header__bar { position: relative; padding-top: 16px; padding-bottom: 16px; transition: background-color 0.25s ease, box-shadow 0.25s ease; }

/* Izvēlne kā dizainā: 16px, bez <li> atkāpēm; atstarpe līdz 34px sarūk līdz ar ekrānu, lai logo + izvēlne + valoda + CTA ietilpst vienā rindā. */
#c-header #c-header__nav .c-nav__list > li { padding: 0; }
#c-header #c-header__nav .c-nav__list > .current-menu-item { padding: 0 4px; } /* zelta fons (legacy) neritinātā stāvoklī */
#c-header.is-scrolled #c-header__nav .c-nav__list > .current-menu-item { background: none; }
#c-header #c-header__nav .c-nav__list > li > a { font-size: 16px; line-height: 20px; white-space: nowrap; }
@media (min-width: 1101px) {
	#c-header #c-header__inner { column-gap: 16px; }
	#c-header .c-header__logo.c-logo { width: 134px; max-width: 134px; }
	/* (100vw − malas 80 − logo 134 − LV teksti ~681 − aktīvās atkāpe 8 − valoda+CTA 244 − 3×16 − rezerve 20) / 7 atstarpes */
	#c-header #c-header__nav .c-nav__list { gap: clamp(12px, calc((100vw - 1215px) / 7), 34px); }
}

/* 1101–1280px: CTA izvēlnes joslā neietilpst → tā pati poga augšējā joslā blakus tālrunim. */
#c-header .c-header__top .c-header__cta--top { display: none; }
@media (min-width: 1101px) and (max-width: 1280px) {
	#c-header .c-header__actions .c-header__cta { display: none; }
	#c-header .c-header__top .c-header__cta--top { display: inline-flex; height: 26px; padding: 0 14px; font-size: 13px; line-height: 13px; }
	/* bez CTA: (100vw − 80 − 134 − 681 − 8 − valoda 52 − 2×16 − 20) / 7 */
	#c-header #c-header__nav .c-nav__list { gap: clamp(12px, calc((100vw - 1007px) / 7), 34px); }
}
#c-header.is-scrolled #c-header__bar { background-color: #282725; box-shadow: 0 8px 24px rgb(16 25 35 / 18%); }

/* Valoda + CTA. */
#c-header .c-header__actions { order: 3; display: flex; align-items: center; gap: 24px; }
#c-header .c-header__actions #c-header__lang { order: 0; }
#c-header .c-header__cta { display: inline-flex; align-items: center; height: 40px; padding: 0 22px; border-radius: 999px; background: #8A744D; color: #F6F3EF; font-size: 16px; line-height: 16px; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color 0.2s ease; }
#c-header .c-header__cta:hover { background: var(--action-hover, #9D8458); }
#c-header .c-header__cta:focus-visible { outline: 2px solid #F6F3EF; outline-offset: 2px; }

/* Valodu izvēlne (WPML dropdown) datorā: legacy fonu dod tikai ≤1100px — virs gaiša satura ENG/RUS nebija salasāmi. Tumša kartīte abos stāvokļos. */
@media (min-width: 1101px) {
	/* left: −16px — ENG/RUS teksts tieši zem LV (saites atkāpe 16px); ::before — neredzams „tilts” pār 6px atstarpi, lai hover neatvienojas. */
	#c-header #c-header__lang .wpml-ls-sub-menu { left: -16px; width: max-content; min-width: 100%; margin-top: 6px; padding: 6px 0 !important; border: 1px solid rgb(255 255 255 / 10%); border-radius: 8px; background: #282725; box-shadow: 0 8px 24px rgb(16 25 35 / 18%); }
	#c-header #c-header__lang .wpml-ls-sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
	#c-header #c-header__lang .wpml-ls-sub-menu .wpml-ls-item { padding: 0; }
	#c-header #c-header__lang .wpml-ls-sub-menu .wpml-ls-link { display: block; padding: 8px 16px !important; color: rgb(255 255 255 / 72%) !important; white-space: nowrap; }
	#c-header #c-header__lang .wpml-ls-sub-menu .wpml-ls-link:is(:hover, :focus-visible) { color: #fff !important; }
}

/* Ritinātais stāvoklis: balts teksts/logo visās lapās (pārraksta lapu tumšā teksta izņēmumus legacy/06-global-css). */
#c-header.is-scrolled .c-header__logo img.css-filter { filter: none !important; }
#c-header.is-scrolled #c-header__nav .c-nav__list > li > a { color: #fff !important; opacity: 0.72; transition: opacity 0.2s ease; }
#c-header.is-scrolled #c-header__nav .c-nav__list > li > a:hover,
#c-header.is-scrolled #c-header__nav .c-nav__list > .current-menu-item > a { opacity: 1; }
#c-header.is-scrolled #c-header__nav .c-nav__list > .current-menu-item > a { position: relative; }
#c-header.is-scrolled #c-header__nav .c-nav__list > .current-menu-item > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: #BFAE8E; }
#c-header.is-scrolled #c-header__lang .wpml-ls-item-toggle,
#c-header.is-scrolled #c-header__lang .wpml-ls-item-toggle .wpml-ls-native { color: #fff !important; }
#c-header.is-scrolled #c-header__lang a.wpml-ls-item-toggle::after { background-color: #fff !important; }
#c-header.is-scrolled #c-header__burger svg line { stroke: #fff !important; }

/* Ritināšanas progress joslas apakšā. */
#c-header .c-header__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #3A3936; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
#c-header.is-scrolled .c-header__progress { opacity: 1; }
#c-header .c-header__progress span { display: block; height: 100%; background: #BFAE8E; transform: scaleX(var(--scroll-progress, 0)); transform-origin: left; }

@media (max-width: 1100px) {
	/* Bez desktop izvēlnes: logo kreisajā pusē, CTA pie burgera. */
	#c-header .c-header__actions { margin-left: auto; }
	#c-header #c-header__menu { order: 4; }
}

@media (max-width: 767px) {
	#c-header .c-header__top { padding: 0 1.6rem; }
	#c-header #c-header__bar { padding-top: 12px; padding-bottom: 12px; }
	#c-header #c-header__inner { min-height: 32px; }
	#c-header .c-header__cta { height: 32px; padding: 0 14px; font-size: 13px; line-height: 13px; }
}

@media (prefers-reduced-motion: reduce) {
	#c-header #c-header__bar,
	#c-header .c-header__progress,
	#c-header .c-header__cta { transition: none; }
}

/* Atvērta mega-menu/popups (body.no-scroll no nav.js/popup.js): lapa aizmugurē neritinās un tās ritjosla nerādās baltā joslā labajā malā;
   pašai izvēlnei ritjosla tikai tad, ja saturs neietilpst (ģenerētajā header.css ir overflow-y: scroll). */
html:has(body.no-scroll) { overflow: hidden; }
#c-header #c-header__menu .c-menu__items { overflow-y: auto; scrollbar-color: #5A5853 #282725; }
