/* PumpyDumpy AI — hlavička webu: navigace, přepínač jazyka a hledání.
   Načítá se na všech stránkách jako poslední styl. Nezávisí na stylech
   stránky a selektory začínají .nav, aby přebily i starší pravidla
   průvodců (třeba .nav-inner nav a nebo .nav { padding }). */

/* ===== Bez vodorovného přetékání =====
   Skryté bubliny vysvětlivek (scene-bg.js) u pravého okraje rozšiřovaly
   stránku na mobilu. clip na rozdíl od hidden nevytváří posuvník
   a neruší lepicí hlavičku. */
html, body { overflow-x: clip; }

/* ===== Hlavička ===== */
.nav {
  position: sticky; top: 0; z-index: 100; padding: 0; margin: 0;
  background: rgba(8, 8, 12, .75);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid rgba(30, 40, 70, .55);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.65;
}
/* Stránka s vlastním lepicím panelem nástrojů (průvodce Cursorem): hlavička odroluje. */
.nav.nav-static { position: relative; }
.nav .nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center;
  height: 64px; gap: 16px;
}
.nav a { text-decoration: none; }
.nav .nav-logo { display: flex; align-items: center; gap: 10px; color: #eaf0ff; font-weight: 700; font-size: 1rem; }
.nav .nav-logo:hover { color: #eaf0ff; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: conic-gradient(from 210deg, #00d4ff, #8b5cf6, #ff2d8a, #00d4ff);
  box-shadow: 0 6px 22px rgba(0, 212, 255, .35), 0 0 0 1px rgba(255, 255, 255, .05) inset;
  position: relative; flex-shrink: 0; display: inline-block;
}
.logo-mark::after {
  content: ""; position: absolute; inset: 4px; border-radius: 6px;
  background: #06070d;
  background-image: radial-gradient(circle at 40% 40%, rgba(0, 212, 255, .3), transparent 60%);
}
.logo-mark::before {
  content: "AI"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .5px;
  z-index: 2; text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}
.nav .logo-text { letter-spacing: -.3px; font-weight: 700; }
.nav .logo-text .accent {
  background: linear-gradient(90deg, #00d4ff, #8b5cf6, #ff2d8a);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-weight: 800;
}
.nav .nav-spacer { flex: 1; }
.nav .nav-links { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; margin: 0; width: auto; }
.nav .nav-links a {
  padding: 8px 14px; font-size: .88rem; font-weight: 400; color: #94a3c8;
  border-radius: 8px; transition: all .3s cubic-bezier(.4, 0, .2, 1);
}
.nav .nav-links a:hover, .nav .nav-links a.active { color: #eaf0ff; background: #101828; }
.nav .nav-links a.nav-yt { color: #ff4d4d; font-weight: 600; }
.nav .lang-switch {
  display: inline-flex; border: 1px solid #243354; border-radius: 8px;
  overflow: hidden; font-size: .74rem; font-weight: 700; letter-spacing: .4px; line-height: 1.65;
}
.nav .lang-switch > * { padding: 5px 9px; color: #94a3c8; }
.nav .lang-switch .on { background: rgba(0, 212, 255, .14); color: #00d4ff; }
.nav .lang-switch .off { color: #7888ad; opacity: .55; cursor: not-allowed; }
.nav .nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; font-size: .85rem; font-weight: 600;
  color: #fff; border-radius: 10px; white-space: nowrap;
  background: linear-gradient(90deg, #00d4ff, #8b5cf6, #ff2d8a); background-size: 200% 100%;
  box-shadow: 0 4px 22px rgba(0, 212, 255, .25), 0 4px 22px rgba(255, 45, 138, .2);
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
}
.nav .nav-cta:hover { background-position: 100% 0; color: #fff; transform: translateY(-1px); }
.nav .nav-cta img { width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0; display: block; }

/* ===== Hledání (Pagefind) — tmavé pole na tmavém webu ===== */
.search-wrapper {
  background: rgba(8, 8, 12, .95); border-bottom: 1px solid rgba(30, 40, 70, .55); padding: 12px 24px;
  position: relative; z-index: 2;
  --pagefind-ui-scale: 0.85;
  --pagefind-ui-primary: #00d4ff;
  --pagefind-ui-text: #eaf0ff;
  --pagefind-ui-background: #0c1220;
  --pagefind-ui-border: #243354;
  --pagefind-ui-tag: #101828;
  --pagefind-ui-border-width: 1px;
  --pagefind-ui-border-radius: 8px;
  --pagefind-ui-image-border-radius: 8px;
  --pagefind-ui-image-box-ratio: 3 / 2;
  --pagefind-ui-font: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
.search-wrapper > div { max-width: 1200px; margin: 0 auto; display: flex; justify-content: center; }
.search-wrapper .search-container { width: 100%; max-width: 600px; margin: 0; }
.search-wrapper .pagefind-ui__search-input {
  background-color: #0c1220 !important; color: #eaf0ff !important;
  border: 1px solid #243354 !important; font-weight: normal !important;
}
.search-wrapper .pagefind-ui__search-input::placeholder { color: #7888ad !important; opacity: 1 !important; }
.search-wrapper .pagefind-ui__search-input:focus { border-color: #00d4ff !important; outline: none; }
.search-wrapper .pagefind-ui__form::before { background-color: #7888ad !important; }
.search-wrapper .pagefind-ui__search-clear { background-color: transparent !important; color: #94a3c8 !important; }
.search-wrapper .pagefind-ui__drawer {
  position: absolute; z-index: 999; background: #0c1220; width: 400px; right: 20px; top: 60px;
  border: 1px solid #243354; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  padding: 10px; max-height: 70vh; overflow-y: auto;
}
.search-wrapper .pagefind-ui__result { border-bottom: 1px solid #243354 !important; padding: 10px 0 !important; }
.search-wrapper .pagefind-ui__result:last-child { border-bottom: none !important; }
.search-wrapper .pagefind-ui__result-title { font-weight: 600 !important; font-size: 1.1rem !important; }
.search-wrapper .pagefind-ui__result-link { color: #00d4ff !important; text-decoration: none !important; }
.search-wrapper .pagefind-ui__result-excerpt { color: #94a3c8 !important; font-size: .9rem !important; margin-top: 4px !important; }
.search-wrapper mark { background-color: rgba(0, 212, 255, .2) !important; color: #fff !important; }
.search-wrapper .pagefind-ui__button { background: #101828 !important; border: 1px solid #243354 !important; color: #eaf0ff !important; cursor: pointer; }
.search-wrapper .pagefind-ui__button:hover { border-color: #00d4ff !important; color: #00d4ff !important; }
.search-wrapper .pagefind-ui__message { color: #94a3c8 !important; }

/* ===== Mobil: hlavička neleží přes obsah, odkazy jsou vodorovný pruh ===== */
@media (max-width: 900px) {
  .search-wrapper .pagefind-ui__drawer { width: calc(100% - 40px); right: 20px; top: auto; }
}
@media (max-width: 640px) {
  .nav { position: relative; padding: 0; }
  .nav .nav-inner {
    height: auto; padding: 12px 20px; flex-direction: row; flex-wrap: wrap;
    align-items: center; justify-content: space-between; gap: 12px;
  }
  .nav .nav-links {
    order: 3; width: 100%; overflow-x: auto; gap: 2px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .nav .nav-links::-webkit-scrollbar { display: none; }
  .nav .nav-links a { white-space: nowrap; padding: 6px 10px; }
  .nav .nav-cta { padding: 7px 12px; font-size: .8rem; gap: 6px; }
  .nav .nav-cta img { width: 18px; height: 18px; }
  /* Angličtina zatím není: přepínač na mobilu schovaný, ať se logo a PD2V Web vejdou na jeden řádek. */
  .nav .lang-switch { display: none; }
}
