/* ──────────────────────────────────────────────────────────────────────────
   TAGRA — Shared navigation styles
   Used by: all top-level pages and subpages
   Last refactor: 2026-05-12 (extracted from inline page styles)
   ──────────────────────────────────────────────────────────────────────────
   Design tokens this file expects to inherit from the page <style>:
     --nav-h, --maxw, --border, --text, --text2, --bg-apple-solid,
     --blue-dark, --blue-mid, --blue-light, --green-cta, --green-brand
   ────────────────────────────────────────────────────────────────────────── */

/* ─── SCROLL PROGRESS ──────────────────────────────────────── */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--green-brand, #6E9B12), var(--blue-light, #1f5fa6));
  width: 0%; z-index: 9999; pointer-events: none;
  transition: width .1s ease-out;
}

/* ─── NAVIGATION ───────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h, 64px);
  /* Liquid glass (Apple Tahoe-style): layered translucent fill for depth */
  background: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.52) 100%);
  backdrop-filter: blur(28px) saturate(200%) brightness(1.04);
  -webkit-backdrop-filter: blur(28px) saturate(200%) brightness(1.04);
  border-bottom: 1px solid rgba(255,255,255,0.35);
  /* Specular top highlight + inner base sheen + soft lift shadow */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.75),
    inset 0 -1px 0 rgba(255,255,255,0.20),
    0 1px 1px rgba(16,42,74,0.04),
    0 8px 24px rgba(16,42,74,0.06);
}

/* Reserve room for the fixed nav site-wide; homepage opts out for full-bleed hero. */
body { padding-top: var(--nav-h, 64px); }
body.home-fullbleed { padding-top: 0; }
html { scroll-padding-top: var(--nav-h, 64px); }
/* Prevent horizontal page scroll caused by inner overflow (review rail, etc). */
html, body { overflow-x: hidden; max-width: 100vw; }
.nav-inner {
  /* nav-inner širší než content (1180px) — logo se odsadí ~110px doleva od krajů
     contentu, lépe vyniká a Control variant má víc dýchání od nav-links */
  max-width: var(--nav-maxw, 1400px);
  margin: 0 auto; padding: 0 24px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-logo {
  font-size: 22px; font-weight: 900; letter-spacing: -.02em;
  background: linear-gradient(90deg, var(--blue-dark, #0b2c4a), var(--blue-mid, #134a8e));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  text-decoration: none; flex-shrink: 0;
  /* explicit dimensions tak aby výška nav byla identická na všech stránkách
     bez ohledu na to jestli je uvnitř Control variant nebo ne */
  display: inline-flex; align-items: flex-end;
  height: 32px; line-height: 1;
  position: relative; /* anchor pro případné product variant lockup (např. Control) */
}

/* Product variant lockup — přidává " | Control" napravo od loga.
   Inline-flex (ne absolute) takže přirozeně zabírá místo v layoutu a flex
   space-between vytlačí nav-links napravo — nelepí se na první link. */
.nav-logo-variant {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6b7280;
  -webkit-text-fill-color: #6b7280;
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
  transform: translateY(-1px);
}
@media (max-width: 900px) {
  .nav-logo-variant { display: none; } /* na mobilu skryjeme abychom nepřekreslili hamburger */
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links li a {
  font-size: 15px; font-weight: 500; color: var(--text, #1d1d1f);
  padding: 8px 12px; border-radius: 8px;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.nav-links li a:hover { background: var(--bg-apple-solid, #eaf3f8); color: var(--blue-mid, #134a8e); }
.nav-links a.nav-cta,
.nav-links .nav-cta-li a {
  background: var(--green-cta, #5C820F) !important;
  color: #fff !important;
  border-radius: 99px !important;
  padding: 8px 18px !important;
  font-weight: 600;
  text-decoration: none;
}
.nav-links a.nav-cta:hover,
.nav-links .nav-cta-li a:hover {
  background: var(--green-brand, #6E9B12) !important;
}
.nav-lang {
  /* Apple-style language dropdown: compact trigger, native names in menu. */
  position: relative;
  font-size: 13px; font-weight: 500;
}
.nav-lang > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 8px;
  color: var(--text2, #515154);
  user-select: none;
  transition: background .15s, color .15s;
}
.nav-lang > summary::-webkit-details-marker { display: none; }
.nav-lang > summary::after {
  content: ''; width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 2px;
  transition: transform .2s;
}
.nav-lang[open] > summary::after { transform: rotate(180deg); }
.nav-lang > summary:hover {
  background: var(--bg-apple-solid, #eaf3f8);
  color: var(--blue-mid, #134a8e);
}

.nav-lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 180px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.04);
  padding: 6px;
  display: flex; flex-direction: column;
  /* Subtle fade-in. */
  animation: nav-lang-in .14s cubic-bezier(.16,1,.3,1);
}
@keyframes nav-lang-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-lang-menu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: 7px;
  color: var(--text, #1d1d1f);
  text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: background .12s;
}
.nav-lang-menu a:hover {
  background: var(--bg-apple-solid, #eaf3f8);
  color: var(--blue-mid, #134a8e);
}
.nav-lang-menu a.active::after {
  content: '✓'; color: var(--blue-mid, #134a8e);
  font-size: 14px; font-weight: 600;
}
/* Mobile-only CTA pill. Hidden on desktop; shown on mobile via media query. */
.nav-cta-mobile {
  display: none; /* default hidden — desktop shows in-list CTA instead */
  background: var(--green-cta, #5C820F); color: #fff !important;
  border-radius: 99px; padding: 8px 14px;
  font-size: 13px; font-weight: 600;
  text-decoration: none !important; white-space: nowrap;
  transition: background .15s, transform .15s;
}
.nav-cta-mobile:hover, .nav-cta-mobile:active {
  background: var(--green-brand, #6E9B12);
  transform: scale(1.03);
}
.nav-mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-mobile-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text, #1d1d1f); margin: 5px 0;
  border-radius: 2px; transition: .3s;
}

@media (max-width: 900px) {
  .nav-inner { padding: 0 16px 0 20px; gap: 12px; }
  .nav-links { display: none; }
  .nav-cta-mobile { display: inline-flex; align-items: center; }
  .nav-mobile-toggle { display: block; padding: 8px 0 8px 8px; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    position: absolute; top: var(--nav-h, 64px); left: 0; right: 0;
    background: rgba(255,255,255,0.97); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border, rgba(0,0,0,0.08)); padding: 12px 24px 20px;
  }
}

/* === Active page indicator ===
   The self-link gets aria-current="page" (see HTML). Style it with the
   brand mid-blue + heavier weight so users can see where they are
   without disturbing the uniform layout. */
.nav-links a[aria-current="page"] {
  color: var(--blue-mid, #134a8e);
  font-weight: 700;
}
.nav-links a[aria-current="page"]:hover {
  color: var(--blue-dark, #0b2c4a);
}

/* Logo lockup never gets an underline, even on hover/focus. */
.nav-logo,
.nav-logo:hover,
.nav-logo:focus,
.nav-logo:active {
  text-decoration: none;
}
