/* One menu shared by Frontier and both lesson templates. */
body:has(> .studio-header){overflow-x:clip}
.studio-header, .search-modal-backdrop { --radius: 12px; --font-head: Oswald,sans-serif; --font-body: Manrope,sans-serif; --font-text: Manrope,sans-serif; --surface: #fff; --surface-soft: #F4F8FA; --ink: #17181C; --ink-soft: #55575F; --ink-faint: #8E9199; --line: #E2E8F2; --line-strong: #CBD5E1; --aqua: #0096FF; --aqua-soft: rgba(0,150,255,.08); --aqua-text: #0075C7; --header-bg: rgba(250,251,251,.92); --logo-filter: none; --shadow-sm: 0 4px 12px rgba(20,40,60,.04); --shadow-hover: 0 22px 48px -16px rgba(0,100,200,.16); font-family: var(--font-text); line-height: 1.6; }
body.theme-evening .studio-header, body.theme-evening .search-modal-backdrop { --surface: #18202A; --surface-soft: #1E2835; --ink: #F3F6FA; --ink-soft: #A7B4C6; --ink-faint: #738296; --line: #283546; --line-strong: #36475D; --aqua-soft: rgba(0,150,255,.16); --aqua-text: #8FD1FF; --header-bg: rgba(24,32,42,.92); --logo-filter: brightness(0) invert(1); }
.studio-header .brand-link, .studio-header .nav-item { text-decoration: none; }
.studio-header button, .search-modal-backdrop button { cursor: pointer; }
.studio-header [hidden], .search-modal-backdrop[hidden] { display: none !important; }
.studio-header { position: sticky; top: 0px; z-index: 100; background: var(--header-bg); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); transition: background 0.35s, border-color 0.35s; }
.header-inner { max-width: 1400px; margin: 0px auto; padding: 16px 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-logo { display: block; width: 146px; height: auto; filter: var(--logo-filter); transition: opacity 0.2s, filter 0.35s; }
.brand-logo:hover { opacity: 0.85; }
.studio-nav { position: relative; isolation: isolate; display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); padding: 5px; border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: background 0.35s, border-color 0.35s, box-shadow 0.35s; scrollbar-width: none; }
.studio-nav::-webkit-scrollbar { display: none; }
.studio-nav::before { content: ""; position: absolute; z-index: 0; top: 0px; left: 0px; width: var(--mw, 0px); height: var(--mh, 0px); transform: translate(var(--mx, 0px), var(--my, 0px)); background: rgb(234, 246, 255); border-radius: calc(var(--radius) - 3px); box-shadow: rgba(0, 150, 255, 0.16) 0px 0px 0px 1px inset; pointer-events: none; opacity: var(--mo, 0); transition: transform 0.48s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.48s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.35s, opacity 0.25s; }
body.theme-evening .studio-nav::before { background: rgba(0, 150, 255, 0.22); box-shadow: rgba(0, 150, 255, 0.35) 0px 0px 0px 1px inset, rgba(0, 150, 255, 0.15) 0px 2px 10px; }
.nav-item { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; flex: 1 1 auto; min-width: 0px; padding: 9px 12px; border: 0px; border-radius: calc(var(--radius) - 3px); background: transparent; color: var(--ink-soft); user-select: none; cursor: pointer; transition: flex 0.48s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.25s; }
.nav-label { display: block; font-family: var(--font-head); font-size: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.25s; }
.nav-item:hover { color: var(--ink); background: transparent; }
.nav-item.is-expanded { flex: 1.25 1 auto; color: var(--ink); }
.nav-item.is-expanded .nav-label { transform: translateY(-1px); }
.nav-item.is-active { color: var(--aqua); background: transparent; box-shadow: none; }
.nav-item.is-active .nav-label { font-weight: 700; color: var(--aqua); }
body.theme-evening .nav-item.is-active, body.theme-evening .nav-item.is-active .nav-label { color: var(--aqua-text); }
.nav-item:focus-visible { outline: 2px solid var(--aqua); outline-offset: 2px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.theme-toggle { width: 44px; height: 44px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); display: flex; align-items: center; justify-content: center; transition: 0.25s; }
.theme-toggle:hover { color: var(--aqua); border-color: var(--aqua); background: var(--aqua-soft); transform: translateY(-1px); }
body:not(.theme-evening) .theme-toggle .icon-sun { display: none; }
body.theme-evening .theme-toggle .icon-moon { display: none; }
.btn-logout { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; height: 44px; padding: 0px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); font-family: var(--font-head); font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink-soft); transition: 0.25s; }
.btn-logout:hover { background: var(--ink); color: var(--surface); border-color: var(--ink); transform: translateY(-1px); }
@media (max-width: 992px) {.header-inner { flex-wrap: wrap; padding: 14px 20px; }
.studio-nav { order: 3; width: 100%; overflow-x: auto; justify-content: flex-start; }
.nav-item { flex: 0 0 auto; padding: 8px 14px; }
.nav-item.is-expanded { flex: 0 0 auto; }
.nav-label { font-size: 14.5px; }}
@media (max-width: 680px) {.header-inner { padding: 12px 16px; gap: 12px; }
.brand-logo { width: 118px; }
.header-right { gap: 6px; }
.studio-nav { width: 100%; max-width: 100%; overflow-x: auto; }}
.header-inner { gap: 16px; }
.header-right { gap: 8px; flex-shrink: 0; }
.header-socials { display: flex; align-items: center; gap: 6px; margin-right: 4px; }
.header-socials a { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: rgb(255, 147, 0); transition: transform 0.2s, border-color 0.2s, background 0.2s; flex-shrink: 0; }
.header-socials a:hover { transform: translateY(-1px); border-color: var(--aqua); background: var(--aqua-soft); }
.header-socials a:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; }
.header-socials img { display: block; width: 22px; height: 22px; object-fit: contain; }
.header-socials .menu-whatsapp { border-radius: 50%; }
.header-socials svg { display: block; width: 20px; height: 20px; }
.theme-toggle { flex-shrink: 0; }
.btn-logout { flex-shrink: 0; }
@media (max-width: 1300px) {.header-inner { flex-wrap: wrap; }
.studio-nav { order: 3; width: 100%; max-width: 100%; overflow-x: auto; justify-content: flex-start; }
.header-right { margin-left: auto; }}
@media (max-width: 680px) {.header-inner { display: grid; grid-template-columns: 1fr 44px 44px; gap: 10px 8px; }
.header-left { grid-area: 1 / 1; }
.header-right { display: contents; }
.btn-logout { grid-area: 1 / 2 / auto / 4; justify-self: end; }
.header-socials { grid-area: 2 / 1; margin: 0px; gap: 6px; }
.header-socials a { width: 38px; height: 38px; }
.header-socials img { width: 20px; height: 20px; }
.studio-nav { grid-area: 3 / 1 / auto / -1; min-width: 0px; }}
@media (prefers-reduced-motion: reduce) {.header-socials a { transition: none; }
.header-socials a:hover { transform: none; }}
.studio-nav { gap: 10px; padding: 0px; border: 0px; background: transparent; box-shadow: none; }
.nav-item, .nav-item.is-expanded { flex: 0 0 auto; padding: 11px 16px; }
@media (max-width: 680px) {.studio-nav { gap: 8px; padding: 3px 0px; }
.nav-item, .nav-item.is-expanded { padding: 10px 13px; }}
.nav-item:not(:last-child)::after { content: ""; position: absolute; right: -6px; top: 50%; width: 1px; height: 14px; transform: translateY(-50%); background: rgba(15, 23, 42, 0.12); pointer-events: none; }
body.theme-evening .nav-item:not(:last-child)::after { background: rgba(148, 163, 184, 0.18); }
@media (max-width: 680px) {.nav-item:not(:last-child)::after { right: -5px; height: 12px; }}
.nav-item.is-active, .nav-item.is-active .nav-label, body.theme-evening .nav-item.is-active, body.theme-evening .nav-item.is-active .nav-label { color: var(--ink-soft); }
.nav-item.is-active .nav-label { font-weight: 600; }
.nav-item.is-expanded, .nav-item.is-expanded .nav-label, body.theme-evening .nav-item.is-expanded, body.theme-evening .nav-item.is-expanded .nav-label { color: var(--aqua-text,var(--aqua)); }
.header-socials a, .theme-toggle, .search-btn { width: 36px; height: 36px; min-width: 36px; }
.header-socials img, .header-socials svg, .theme-toggle svg, .search-btn svg { width: 18px; height: 18px; }
.gateway-menu { overflow: visible; }
.gateway-menu .theme-toggle { padding: 0; }
.gateway-menu .theme-toggle svg { flex-shrink: 0; }
@media (max-width: 680px) {.header-socials { gap: 0px; }
.header-socials a, .theme-toggle, .search-btn { position: relative; isolation: isolate; width: 44px; height: 44px; min-width: 44px; border: 0px; background: transparent; }
.header-socials a::before, .theme-toggle::before, .search-btn::before { content: ""; position: absolute; z-index: -1; inset: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: background 0.2s, border-color 0.2s; }
.header-socials a:hover, .theme-toggle:hover, .search-btn:hover { background: transparent; }
.header-socials a:hover::before, .theme-toggle:hover::before, .search-btn:hover::before { background: var(--aqua-soft); border-color: var(--aqua); }}
@media (max-width: 680px) {
  .gateway-menu .header-inner { grid-template-columns: minmax(0,1fr) 44px auto; }
  .gateway-menu .theme-toggle { grid-area: 1 / 2; }
  .gateway-menu .gateway-logout { grid-area: 1 / 3; justify-self: end; }
  /* Menu w pełnym wierszu, ikony kanałów pod nim: obok ikon nie mieści się ani spis lekcji, ani kilka pozycji menu. */
  .gateway-menu .studio-nav { grid-area: 2 / 1 / 3 / -1; }
  .gateway-menu .header-socials { grid-area: 3 / 1 / 4 / -1; justify-self: start; }
  .gateway-menu .brand-logo { max-width: 100%; }
  /* Pozycje menu łamią się do kolejnego wiersza. */
  .gateway-menu .studio-nav { flex-wrap: wrap; }
}
.btn-login, .btn-login:hover { background: rgb(22, 163, 74); border-color: rgb(22, 163, 74); color: rgb(255, 255, 255); }
.btn-login:hover { box-shadow: rgba(22, 163, 74, 0.22) 0px 4px 12px; }
.btn-login:focus-visible { outline: rgb(22, 163, 74) solid 2px; outline-offset: 3px; }
.nav-label { font-size: 17px; }
@media (max-width: 992px) {.nav-label { font-size: 15.5px; }}

/* Okienko dla niezalogowanych (pozycja „Twoje studio” na stronie otwartej). */
.menu-notice{position:fixed;inset:0;margin:auto;width:min(480px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:40px 36px 32px;border:1px solid var(--line,#E2E8F2);border-radius:12px;background:var(--surface,#fff);color:var(--ink,#17181C);text-align:center;box-shadow:0 24px 64px rgba(15,23,42,.28)}
.menu-notice::backdrop{background:rgba(10,18,28,.48);backdrop-filter:blur(7px)}
.menu-notice p{margin:0 auto 28px;max-width:360px;font:500 18px/1.6 Manrope,sans-serif;text-wrap:balance}
.menu-notice-close{display:block;width:100%;height:52px;padding:0 24px;border:1px solid var(--line-strong,#CBD5E1);border-radius:12px;background:var(--surface,#fff);color:var(--ink,#17181C);font:600 17px/1.2 Oswald,sans-serif;letter-spacing:.055em;text-transform:uppercase;cursor:pointer;transition:background .3s,border-color .3s,color .3s}
.menu-notice-close:hover{background:#0096FF;border-color:#0096FF;color:#fff}
.menu-notice-close:focus-visible{outline:2px solid #0096FF;outline-offset:4px}
body:has(.menu-notice[open]){overflow:hidden}
body.theme-evening .menu-notice{--surface:#18202A;--ink:#F3F6FA;--line:#283546;--line-strong:#36475D}
@media(max-width:680px){.menu-notice{padding:32px 24px 24px}.menu-notice p{font-size:16px}}

/* Cztery pozycje nie mieszczą się w jednym rzędzie na telefonie: zawijamy zamiast chować ostatnią pod przewijaniem. */
@media (max-width: 680px) {
  .studio-header:not(.gateway-menu) .studio-nav { flex-wrap: wrap; overflow-x: visible; }
}

/* Na telefonie nazwy pozycji skracamy do jednego słowa, żeby menu mieściło się w jednym rzędzie. */
.nav-short { display: none; }
@media (max-width: 680px) {
  .nav-full { display: none; }
  .nav-short { display: inline; }
}
@media (max-width: 420px) {
  .studio-header .nav-label { font-size: 14px; letter-spacing: .02em; }
  .studio-header .studio-nav { gap: 2px; }
  .studio-header .nav-item { padding-left: 8px; padding-right: 8px; }
}

/* Telefon: logo, jedna ikona kontaktu (rozwija listę z opisami), tryb wieczorny i konto w jednym rzędzie; pod spodem menu. */
.social-label { display: none; }
.contact-toggle { display: none; }
@media (max-width: 680px) {
  .studio-header .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px 4px; flex-wrap: nowrap; }
  .studio-header .header-left { grid-area: 1 / 1; min-width: 0; }
  .studio-header .header-right { display: contents; }
  .studio-header .contact-toggle { display: flex; grid-area: 1 / 2; }
  .studio-header .theme-toggle:not(.contact-toggle) { grid-area: 1 / 3; }
  .studio-header .header-right > .btn-logout, .studio-header .gateway-logout { grid-area: 1 / 4; justify-self: end; margin-left: 4px; }
  .studio-header .studio-nav { grid-area: 2 / 1 / 3 / -1; }
  .studio-header .contact-toggle[aria-expanded="true"] { color: var(--aqua); }
  .studio-header .contact-toggle[aria-expanded="true"]::before { border-color: var(--aqua); background: var(--aqua-soft); }
  .studio-header .header-socials { display: none; position: absolute; z-index: 120; right: 12px; top: calc(100% + 6px); flex-direction: column; align-items: stretch; gap: 2px; width: min(250px, calc(100vw - 24px)); margin: 0; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 44px -16px rgba(15, 23, 42, .32); }
  .studio-header.contact-open .header-socials { display: flex; }
  .studio-header .header-socials a { width: auto; min-width: 0; height: auto; padding: 11px 12px; justify-content: flex-start; gap: 14px; border-radius: 10px; color: var(--ink); font: 500 15px/1.2 var(--font-body); text-decoration: none; }
  .studio-header .header-socials a::before { display: none; }
  .studio-header .header-socials a:hover { background: var(--aqua-soft); transform: none; }
  .studio-header .header-socials svg { color: rgb(255, 147, 0); }
  .studio-header .header-socials img, .studio-header .header-socials svg { flex: none; width: 22px; height: 22px; }
  .studio-header .social-label { display: inline; }
}

/* Aktywna pozycja menu: kolor akcentu, pogrubienie i podkreślenie. */
.studio-header .nav-item.is-active, .studio-header .nav-item.is-active .nav-label,
body.theme-evening .studio-header .nav-item.is-active, body.theme-evening .studio-header .nav-item.is-active .nav-label { color: var(--aqua-text, var(--aqua)); }
.studio-header .nav-item.is-active .nav-label { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }
