/* ==========================================================================
   Header: a floating bar ("island") that sits detached from the top edge.
   Visual layer only: loads after app.css / palette.css / home.css / catalog-light.css and restyles
   the existing header markup. Navigation, sector panel, cart, account and the mobile menu keep their
   behaviour. The bar has no search button: Ctrl K / ⌘K / "/" and the mobile menu open search.
   Logo left, menu centred, cart and account right.
   Dark ink glass over the home page's hero, light glass on the light pages.
   ========================================================================== */
:root { --head: 72px; }
@media (max-width: 640px) { :root { --head: 66px; } }

/* the strip itself is transparent; only the island shows */
.site-head,
.site-head.is-stuck,
.site-head.is-open,
.home .site-head:not(.is-stuck):not(.is-open),
body.home .site-head.is-stuck,
body.home .site-head.is-open,
.is-template .site-head,
:is(.is-light, .post-type-archive-ofa_template) .site-head,
:is(.is-light, .post-type-archive-ofa_template) .site-head.is-stuck,
:is(.is-light, .post-type-archive-ofa_template) .site-head.is-open {
	background: transparent;
	border-bottom-color: transparent;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
	box-shadow: none;
}
.site-head { padding-top: 10px; }

/* ---------- the island (light glass by default) ---------- */
.site-head {
	--is-bg: rgb(250 251 252 / .86);
	--is-bg-stuck: rgb(250 251 252 / .94);
	--is-border: rgb(14 17 22 / .09);
	--is-border-stuck: rgb(14 17 22 / .14);
	--is-text: #111318;
	--is-text-2: #2a2d35;
	--is-tray: rgb(14 17 22 / .05);
	--is-accent: #005efb;
	--is-shadow: 0 2px 6px rgb(16 24 40 / .05), 0 24px 56px -28px rgb(16 24 40 / .32);
	--is-glint: inset 0 1px 0 rgb(255 255 255 / .7);
}
/* home: dark ink glass over the hero */
.home .site-head {
	--is-bg: rgb(17 19 24 / .6);
	--is-bg-stuck: rgb(17 19 24 / .9);
	--is-border: rgb(255 255 255 / .1);
	--is-border-stuck: rgb(255 255 255 / .14);
	--is-text: #ffffff;
	--is-text-2: rgb(255 255 255 / .86);
	--is-tray: rgb(255 255 255 / .07);
	--is-accent: #5b8cff;
	--is-shadow: 0 2px 6px rgb(0 0 0 / .2), 0 28px 60px -28px rgb(0 0 0 / .55);
	--is-glint: inset 0 1px 0 rgb(255 255 255 / .06);
}

.site-head .site-head__in,
.site-head.is-stuck .site-head__in {
	width: calc(100% - var(--gut) * 2);
	max-width: calc(var(--wrap) - var(--gut) * 2 + 36px);
	height: 60px;
	padding: 0 8px 0 18px;
	border-radius: 14px;
	background: var(--is-bg);
	border: 1px solid var(--is-border);
	box-shadow: var(--is-glint);
	color: var(--is-text);
	-webkit-backdrop-filter: saturate(160%) blur(18px);
	backdrop-filter: saturate(160%) blur(18px);
	transition: background-color .45s cubic-bezier(.16, 1, .3, 1), box-shadow .45s cubic-bezier(.16, 1, .3, 1), border-color .45s cubic-bezier(.16, 1, .3, 1);
}
.site-head.is-stuck .site-head__in,
.site-head.is-open .site-head__in {
	background: var(--is-bg-stuck);
	border-color: var(--is-border-stuck);
	box-shadow: var(--is-glint), var(--is-shadow);
}
@media (prefers-reduced-transparency: reduce) {
	.site-head .site-head__in { background: var(--is-bg-stuck); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* logo left, menu centred, cart and account right (desktop, where the menu is shown) */
@media (min-width: 1181px) {
	/* equal side padding, so "centred" is the bar's true centre */
	.site-head .site-head__in, .site-head.is-stuck .site-head__in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 24px; padding-inline: 14px; }
	.site-head .site-head__in > .brand { justify-self: start; }
	.site-head .site-head__in > .nav { justify-self: center; margin: 0; }
	.site-head .site-head__in > .head-actions { justify-self: end; margin-left: 0; }
}

/* logo */
.site-head .brand img.brand__logo { height: 26px; }

/* navigation */
.site-head .nav { gap: 2px; }
.site-head .nav__link,
.home .site-head .nav__link {
	height: 40px;
	padding: 0 13px;
	border-radius: 10px;
	font-size: .9rem;
	font-weight: 500;
	color: var(--is-text-2);
	opacity: 1;
	background: none;
	transition: color .25s, background-color .25s;
}
.site-head .nav__link:hover,
.home .site-head .nav__link:hover,
.site-head .nav__link[aria-expanded="true"] { color: var(--is-text); background: var(--is-tray); }
.site-head .nav__link[aria-current="page"] { color: var(--is-text); }
/* current page: a short skewed bar in the logo's blue */
.site-head .nav__link[aria-current="page"]::after {
	left: 50%; bottom: 3px; width: 14px; height: 3px; margin-left: -7px; border-radius: 1px;
	background: var(--is-accent); opacity: 1; transform: skewX(-24deg);
}

/* cart, account, menu */
.site-head .icon-btn { width: 40px; height: 40px; border-radius: 10px; color: var(--is-text); }
.site-head .icon-btn:hover { background: var(--is-tray); }
.site-head .icon-btn__count { top: 3px; right: 2px; background: var(--is-accent); color: #fff; }
/* language (TR / EN): a text button the size of the icons */
.site-head .lang-btn { font-size: .74rem; font-weight: 650; letter-spacing: .06em; text-decoration: none; }
.drawer__langs { display: flex; gap: 8px; margin: 14px 0 0; }
.drawer__langs a { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-align: center; font-size: .92rem; font-weight: 500; }
.drawer__langs a[aria-current] { border-color: currentColor; font-weight: 650; }

/* the catalog is the second menu item; no separate call-to-action in the bar */
.site-head .head-cta { display: none; }

@media (max-width: 640px) {
	.site-head { padding-top: 8px; }
	.site-head .site-head__in, .site-head.is-stuck .site-head__in { height: 56px; padding-left: 14px; width: calc(100% - 24px); }
	.site-head .brand img.brand__logo { height: 22px; }
}

/* ==========================================================================
   Sector panel: a floating card under the bar, as wide as the bar, in the same glass.
   Left: title, filter and the ways out. Right: every sector as a row (icon, name, number of sites).
   ========================================================================== */
.site-head {
	--is-panel: rgb(250 251 252 / .97);
	--is-side: rgb(14 17 22 / .025);
	--is-line: rgb(14 17 22 / .08);
	--is-muted: #59616d;
	--is-field: #ffffff;
	--is-field-line: rgb(14 17 22 / .14);
	--is-accent-soft: rgb(0 94 251 / .09);
	--is-accent-text: #005efb;
}
.home .site-head {
	--is-panel: rgb(25 27 33 / .97);
	--is-side: rgb(255 255 255 / .025);
	--is-line: rgb(255 255 255 / .08);
	--is-muted: rgb(255 255 255 / .62);
	--is-field: rgb(255 255 255 / .05);
	--is-field-line: rgb(255 255 255 / .14);
	--is-accent-soft: rgb(91 140 255 / .16);
	--is-accent-text: #9db8ff;
}

/* the old full-width sheet becomes a transparent carrier for the card */
.site-head .mega,
.is-light .site-head .mega {
	inset: calc(var(--head) + 6px) 0 auto;
	background: none; border: 0; box-shadow: none; animation: none;
	color: var(--is-text); pointer-events: none;
}
.mega__panel {
	pointer-events: auto;
	display: grid; grid-template-columns: 15.5rem minmax(0, 1fr);
	width: calc(100% - var(--gut) * 2);
	max-width: calc(var(--wrap) - var(--gut) * 2 + 36px);
	max-height: calc(100dvh - var(--head) - 24px);
	margin-inline: auto; overflow: hidden;
	border-radius: 18px; background: var(--is-panel); border: 1px solid var(--is-border-stuck);
	box-shadow: var(--is-glint), var(--is-shadow);
	-webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
	transform-origin: top center;
}
@media (prefers-reduced-motion: no-preference) {
	.mega:not([hidden]) .mega__panel { animation: mx-drop .45s cubic-bezier(.16, 1, .3, 1); }
	.mega:not([hidden]) .mx-tile { animation: mx-in .45s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(min(var(--i, 0), 24) * 10ms); }
}
@keyframes mx-drop { from { opacity: 0; transform: translateY(-6px) scale(.99); } }
@keyframes mx-in { from { opacity: 0; transform: translateY(4px); } }

/* left column */
.mx-side { display: flex; flex-direction: column; gap: 14px; padding: 22px 20px; background: var(--is-side); border-right: 1px solid var(--is-line); }
.mx-title { margin: 0; font-size: 1.05rem; font-weight: 650; letter-spacing: -.015em; color: var(--is-text); }
.mx-meta { margin: -10px 0 0; font-size: .8rem; color: var(--is-muted); font-variant-numeric: tabular-nums; }
.mx-find { position: relative; display: block; }
.mx-find .icon { position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; color: var(--is-muted); pointer-events: none; }
.mx-find input {
	width: 100%; height: 40px; padding: 0 12px 0 36px; border-radius: 10px;
	border: 1px solid var(--is-field-line); background: var(--is-field); color: var(--is-text); font-size: .86rem;
	transition: border-color .2s, box-shadow .2s;
}
.mx-find input::placeholder { color: var(--is-muted); }
.mx-find input:focus { outline: 0; border-color: var(--is-accent); box-shadow: 0 0 0 3px var(--is-accent-soft); }
.mx-all {
	display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px;
	background: var(--is-tray); color: var(--is-text); font-size: .86rem; font-weight: 600; text-decoration: none;
	transition: background-color .2s, color .2s;
}
.mx-all .icon { width: 15px; height: 15px; transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.mx-all:hover { background: var(--is-accent-soft); color: var(--is-accent-text); }
.mx-all:hover .icon { transform: translateX(3px); }
.mx-ask {
	margin-top: auto; display: grid; gap: 4px; padding: 14px; border-radius: 12px; border: 1px dashed var(--is-field-line);
	text-decoration: none; transition: border-color .2s, background-color .2s;
}
.mx-ask strong { font-size: .84rem; font-weight: 600; color: var(--is-text); }
.mx-ask span { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 550; color: var(--is-accent-text); }
.mx-ask .icon { width: 14px; height: 14px; transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.mx-ask:hover { border-style: solid; border-color: var(--is-accent); background: var(--is-accent-soft); }
.mx-ask:hover .icon { transform: translateX(3px); }

/* right column: sectors */
.mx-main { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 16px; }
.site-head .mx-grid,
.site-head .mx-grid.is-filtered {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: none; grid-auto-flow: row; gap: 2px 8px;
}
.mx-grid li[hidden] { display: none; }
.mx-tile {
	position: relative; display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 7px 12px; border-radius: 10px;
	color: var(--is-text-2); text-decoration: none; -webkit-tap-highlight-color: transparent;
	transition: background-color .2s, color .2s;
}
.mx-tile__name { flex: 1; min-width: 0; font-size: .88rem; font-weight: 500; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-tile__name .sx__sep { color: var(--is-muted); font-weight: 400; }
.mx-tile__count {
	flex: none; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center;
	background: var(--is-tray); color: var(--is-muted); font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums;
	transition: background-color .2s, color .2s;
}
.mx-tile:hover, .mx-tile:focus-visible { background: var(--is-tray); color: var(--is-text); }
.mx-tile:hover .mx-tile__count, .mx-tile:focus-visible .mx-tile__count { background: var(--is-accent); color: #fff; }
.mx-tile:focus-visible { outline: 2px solid var(--is-accent); outline-offset: -2px; }
.mx-tile.is-current { background: var(--is-accent-soft); color: var(--is-text); }
.mx-tile.is-current .mx-tile__name { font-weight: 650; }

.mx-empty { margin: 8px 10px; font-size: .88rem; color: var(--is-muted); }
.mx-empty a { color: var(--is-accent-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.site-head .mx-soon { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 12px 4px 0; padding-top: 14px; border-top: 1px solid var(--is-line); }
.site-head .mx-soon[hidden] { display: none; }
.mx-soon__label { margin: 0 4px 0 6px; font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--is-muted); }
.site-head .mx-soon ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-head .mx-soon li[hidden] { display: none; }
.site-head .mx-soon a {
	display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--is-line);
	font-size: .8rem; color: var(--is-muted); text-decoration: none; transition: color .2s, border-color .2s;
}
.site-head .mx-soon a:hover { color: var(--is-text); border-color: var(--is-field-line); }


/* ==========================================================================
   Mobile menu (drawer): the page names only, compact; sectors live in the catalog.
   ========================================================================== */
.drawer .drawer__panel { width: min(320px, 84vw); padding: 14px 18px 24px; }
.drawer .drawer__head { margin-bottom: 12px; }
.drawer .search-trigger--block { margin-bottom: 6px; }
.drawer .drawer__nav { margin-bottom: 0; }
.drawer .drawer__nav a { padding: 11px 2px; font-size: .95rem; font-weight: 500; }
.drawer .drawer__nav a:last-child { border-bottom: 0; }
