/* Yalhem Sites header for every yalhem-* theme: sticky wrapper, info top bar that folds on scroll, refined nav,
   mobile menu + call button. Uses the shared --ys-* tokens, with fallbacks for themes that don't define them. */

/* Sticky on the template-part wrapper: .ys-hdr alone can't stick, its parent is exactly its height. */
header.wp-block-template-part:has(.ys-hdr) { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 40; }
.ys-hdr { position: relative !important; top: auto !important; transition: box-shadow .2s; }
.is-scrolled-page .ys-hdr { box-shadow: 0 6px 20px rgba(0, 0, 0, .08); }

/* top bar */
.ys-topbar { background: var(--ys-ink, #141414); color: rgba(255, 255, 255, .88); font-size: 13px; overflow: hidden; max-height: 40px; transition: max-height .25s ease; }
.is-scrolled-page .ys-topbar { max-height: 0; }
.ys-topbar__in { max-width: var(--ys-wrap, 1180px); margin-inline: auto; padding-inline: 20px; height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ys-topbar__start { display: flex; align-items: center; gap: 22px; min-width: 0; }
.ys-topbar__item { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; white-space: nowrap; }
.ys-topbar__item i { font-size: 16px; opacity: .85; }
a.ys-topbar__item:hover { color: #fff; }
.ys-topbar__social { display: flex; gap: 4px; }
.ys-topbar__social a { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: inherit; text-decoration: none; font-size: 17px; }
.ys-topbar__social a:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* main bar layout (RTL): logo at the start, menu centered, a compact action button at the end.
   !important because WordPress's flex layout resets child margins (.is-layout-flex > * { margin: 0 }). */
.ys-hdr__in { justify-content: flex-start !important; }
.ys-hdr__in > .ys-nav { margin-inline: auto !important; }
.ys-hdr__in > .ys-hdr__cta, .ys-hdr__in > .ys-order-btn { margin: 0 !important; flex: none; }
.ys-hdr__cta .wp-block-button__link, .ys-hdr .ys-order-btn { padding: 9px 16px !important; font-size: 14px !important; gap: 6px; }
.ys-hdr__cta .wp-block-button__link::before, .ys-hdr .ys-order-btn i { font-size: 17px !important; }
.ys-brand__logo { max-height: 44px; width: auto; display: block; }

/* main bar: nav links with a soft hover surface and an underline for the current page */
.ys-nav .wp-block-navigation__container { gap: 4px !important; }
.ys-nav a { position: relative; display: inline-block; padding: 8px 12px !important; border-radius: var(--ys-btn-r, 8px); transition: background .15s, color .15s; }
.ys-nav a:hover { background: var(--ys-soft, rgba(0, 0, 0, .05)); }
.ys-nav a::after { content: ""; position: absolute; inset-inline: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--ys-accent, currentColor); transform: scaleX(0); transition: transform .2s; }
.ys-nav a[aria-current="page"] { color: var(--ys-accent, inherit); font-weight: 700; }
.ys-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* mobile: call + menu buttons, menu panel */
.ys-burger, .ys-call { display: none; flex: none; width: 42px; height: 42px; border: 1.5px solid var(--ys-line, rgba(0, 0, 0, .15)); border-radius: var(--ys-btn-r, 10px);
	background: var(--ys-surface, #fff); color: var(--ys-ink, #111); font-size: 21px; cursor: pointer; place-items: center; text-decoration: none; }
.ys-mnav { border-top: 1px solid var(--ys-line, rgba(0, 0, 0, .1)); background: var(--ys-bg, #fff); padding: 6px 20px 16px; display: grid; box-shadow: 0 16px 24px rgba(0, 0, 0, .08); }
.ys-mnav[hidden] { display: none; }
.ys-mnav a { padding: 14px 4px; border-bottom: 1px solid var(--ys-line, rgba(0, 0, 0, .08)); font-size: 18px; font-weight: 700; text-decoration: none; color: var(--ys-ink, inherit); display: flex; justify-content: space-between; align-items: center; }
.ys-mnav a::after { content: "\ea60"; font-family: 'tabler-icons'; font-weight: 400; opacity: .4; } /* chevron-left */
.ys-mnav a:last-child { border-bottom: 0; }
.ys-mnav a[aria-current="page"] { color: var(--ys-accent, inherit); }

@media (max-width: 860px) {
	.ys-hdr__in > .ys-hdr__cta, .ys-hdr__in > .ys-order-btn { margin-inline-start: auto !important; } /* menu hidden: push actions to the end */
	.ys-topbar { display: none; }
	.ys-burger, .ys-call { display: grid; }
	.ys-nav { display: none !important; }
}
/* small phones: brand gets the room; the header CTA moves into the menu panel (header.js copies it there) */
.ys-hdr .ys-brand { white-space: nowrap; min-width: 0; }
.ys-hdr .ys-brand__name { overflow: hidden; text-overflow: ellipsis; }
.ys-mnav__cta { margin-top: 12px; justify-content: center !important; border: 0 !important; border-radius: var(--ys-btn-r, 10px); background: var(--ys-accent, #111); color: var(--ys-on-accent, #fff) !important; }
.ys-mnav__cta::after { content: none !important; }
@media (min-width: 481px) { .ys-mnav__cta { display: none !important; } }
@media (max-width: 480px) {
	.ys-hdr__in { gap: 8px !important; }
	.ys-hdr .ys-brand { flex: 1 1 auto; }
	.ys-hdr__cta, .ys-hdr .ys-order-btn { display: none !important; }
	.ys-burger, .ys-call { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .ys-nav a::after, .ys-hdr, .ys-topbar { transition: none; } }

