/* ==========================================================================
   Veřejný web: úvodní stránka, registrace a formuláře pro členy
   ========================================================================== */

.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }

/* ---------- Horní lišta ---------- */
.pub-head {
  position: sticky; top: 0; z-index: 100; height: var(--topbar-h); display: flex; align-items: center;
  background: rgba(244, 247, 251, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.pub-head.scrolled { border-bottom-color: var(--z-200); }
.pub-head .wrap { display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; color: var(--ink); text-decoration: none; }
.brand img { display: block; height: 40px; width: auto; max-width: 62vw; object-fit: contain; object-position: left center; }
@media (max-width: 640px) { .brand img { height: 32px; } }
.pub-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.pub-nav a:not(.btn) { color: var(--z-600); font-size: 0.9rem; font-weight: 500; text-decoration: none; }
.pub-nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 640px) { .pub-nav a.hide-sm { display: none; } }

/* Úvodní stránka: logo ve dvojnásobné velikosti; na mobilu vedle něj zbyde jen tlačítko nabídky */
.pub-head-home { height: auto; min-height: calc(var(--topbar-h) + 48px); padding: 12px 0; }
.pub-head-home .brand img { height: 80px; max-width: min(400px, 62vw); }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .pub-head-home { min-height: 0; padding: 10px 0; }
  .pub-head-home .wrap { position: relative; gap: 8px; }
  .pub-head-home .brand { flex: 1 1 auto; min-width: 0; }
  .pub-head-home .brand img { height: 54px; max-width: 100%; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px;
    border: 1px solid var(--z-200); border-radius: var(--r-md, 10px); background: #fff; color: var(--ink); cursor: pointer;
  }
  .nav-toggle .ti { width: 22px; height: 22px; }
  .pub-head-home .pub-nav {
    position: absolute; top: calc(100% + 10px); right: 0; left: 0; display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px; background: #fff; border: 1px solid var(--z-200); border-radius: var(--r-lg, 14px); box-shadow: var(--shadow-pop, 0 12px 32px rgba(1, 0, 102, .14));
  }
  .pub-head-home .pub-nav.open { display: flex; }
  .pub-head-home .pub-nav a:not(.btn) { display: block; padding: 14px 12px; font-size: 1rem; color: var(--ink); }
  .pub-head-home .pub-nav .btn { margin-top: 6px; justify-content: center; }
}

/* ---------- Úvod: hlavní část s kruhem ---------- */
.hero { padding: clamp(32px, 7vw, 88px) 0 clamp(48px, 8vw, 96px); overflow-x: clip; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: center; }
.hero h1 {
  max-width: 11ch; font-size: clamp(2.75rem, 6.4vw, 5rem); line-height: 1.04; font-weight: 800;
  letter-spacing: -0.028em; color: var(--ink);
}
.hero .lead { max-width: 44ch; margin-top: 22px; font-size: 1.1875rem; line-height: 1.55; color: var(--z-600); }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 34px; }
.hero .note { max-width: 46ch; margin-top: 18px; font-size: 0.875rem; color: var(--z-600); }
.link-quiet { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--sky); }
.link-quiet:hover { text-decoration-color: var(--ink); }

/* Čtyři postavy z ikony (kvadranty 2×2): tři nastoupí hned, čtvrtá se objeví po kliknutí na „Přidat se“.
   Ikona se bere z nastavení (administrace → Vzhled → Ikona), takže animace následuje nahraný soubor. */
.ring-box { position: relative; justify-self: center; width: min(100%, 400px); }
.seats {
  display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 1; width: 100%;
  mix-blend-mode: multiply;   /* bílé pozadí nahraného obrázku splyne s pozadím stránky */
}
.seat { background-image: var(--icon); background-repeat: no-repeat; background-size: 200% 200%; transform-origin: 50% 65%; }
.seat:nth-child(1) { background-position: 0 0; }
.seat:nth-child(2) { background-position: 100% 0; }
.seat:nth-child(3) { background-position: 0 100%; }
.seat:nth-child(4) { background-position: 100% 100%; }
.seat.free { opacity: 0; }
.ring-box.play .seat:not(.free) { animation: seat-in .6s var(--ease) both; animation-delay: calc(var(--i) * 180ms + 150ms); }
.ring-box.joined .seat.free { animation: seat-in .6s var(--ease) both; }
@keyframes seat-in { from { opacity: 0; transform: translateY(16px) scale(.6); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .ring-box { width: min(100%, 300px); }
  .hero h1 { max-width: 14ch; }
}

/* ---------- Úvod: sekce ---------- */
.band { padding: clamp(48px, 7vw, 88px) 0; }
.band.white { background: #fff; border-block: 1px solid var(--z-200); }
.band h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.band .sub { max-width: 56ch; margin-top: 10px; color: var(--z-600); }

.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 48px; margin-top: 36px; }
.reasons > div { padding: 22px 0 26px; border-top: 1px solid var(--z-300); }
.reasons h3 { display: flex; align-items: center; gap: 10px; font-size: 1.0625rem; font-weight: 700; color: var(--ink); }
.reasons h3 .ti { width: 22px; height: 22px; color: var(--sky-text); }
.reasons p { max-width: 36ch; margin-top: 8px; color: var(--z-600); }
@media (max-width: 900px) { .reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; } }
@media (max-width: 600px) { .reasons { grid-template-columns: 1fr; } }

.history { padding: clamp(56px, 8vw, 104px) 0; background: var(--ink); color: #fff; }
.history h2 { max-width: 20ch; font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; }
.history .sub { max-width: 52ch; margin-top: 12px; color: #c9d3ff; }
.hist-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: end; margin-top: clamp(32px, 5vw, 56px); }
.since b { display: block; font-size: clamp(5rem, 13vw, 9.5rem); line-height: .9; font-weight: 800; letter-spacing: -0.04em; color: var(--sky); font-variant-numeric: tabular-nums; }
.since span { display: block; margin-top: 14px; font-size: 1.125rem; }
.figures { display: grid; }
.figures > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 20px; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .22); }
.figures > div:last-child { border-bottom: 1px solid rgba(255, 255, 255, .22); }
.figures b { min-width: 5ch; font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.figures > div > span { font-size: 1.0625rem; color: #c9d3ff; }
@media (max-width: 800px) { .hist-grid { grid-template-columns: 1fr; align-items: start; } }

.cable { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 44px; list-style: none; }
.cable::before { content: ''; position: absolute; left: 14px; right: 14px; top: 14px; height: 3px; background: var(--z-200); }
.cable li { position: relative; padding-top: 44px; }
.cable .node {
  position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--c); color: #fff; font-size: 0.82rem; font-weight: 700; box-shadow: 0 0 0 5px #fff;
}
.cable h3 { font-size: 1.0625rem; font-weight: 600; }
.cable p { max-width: 30ch; margin-top: 4px; color: var(--z-600); font-size: 0.9rem; }
@media (max-width: 760px) {
  .cable { grid-template-columns: 1fr; gap: 28px; }
  .cable::before { left: 14px; right: auto; top: 14px; bottom: 14px; width: 3px; height: auto; }
  .cable li { padding: 3px 0 0 52px; }
}

.prep { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; max-width: 760px; margin-top: 28px; list-style: none; }
.prep li { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--z-200); }
.prep li .ti { width: 16px; height: 16px; color: var(--sky-text); }
.prep small { display: block; color: var(--z-500); }
@media (max-width: 640px) { .prep { grid-template-columns: 1fr; } }

.closing { padding: clamp(48px, 7vw, 80px) 0; }
.closing .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; padding-top: clamp(28px, 4vw, 44px); border-top: 3px solid var(--ink); }
.closing h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.closing p { margin-top: 6px; color: var(--z-600); font-size: 1.0625rem; }
.hero-slogan-dynamic { display: inline-block; transition: opacity .5s ease; }
.hero-slogan-dynamic.fading { opacity: 0; }

.pub-foot { padding: 32px 0 40px; color: var(--z-600); font-size: 0.875rem; border-top: 1px solid var(--z-200); }
.pub-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 28px; }

/* ---------- Registrace a formuláře pro členy ---------- */
.register-container { min-height: calc(100vh - var(--topbar-h)); padding: 20px 16px 120px; }
.register-layout { display: grid; grid-template-columns: minmax(0, 720px) 280px; justify-content: center; align-items: start; gap: 48px; width: min(1100px, 100%); margin-inline: auto; }
.register-card { display: flex; flex-direction: column; width: 100%; max-width: 760px; margin-inline: auto; }
.register-layout .register-card { margin-inline: 0; max-width: none; }
.register-header { order: 0; padding: 24px 0 4px; }
.register-header h2, .register-header h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.register-header h2 .ti, .register-header h1 .ti { display: none; }
.register-header p { margin-top: 6px; color: var(--z-600); }
.register-body { order: 0; padding: 8px 0 0; }
.form-panel { display: none; }
.form-panel.active { display: block; }
.form-panel > p:first-child { margin-bottom: 18px; color: var(--z-600); }

/* Postup: kroky jako vlákno s barevnými uzly */
.stepper { order: -1; display: flex; align-items: flex-start; padding: 8px 0 0; overflow-x: auto; }
.step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; min-width: 64px; white-space: nowrap; --c: var(--fiber-1); }
.step:nth-child(3) { --c: var(--fiber-2); } .step:nth-child(5) { --c: var(--fiber-3); }
.step:nth-child(7) { --c: var(--fiber-4); } .step:nth-child(9) { --c: var(--fiber-5); }
.step-num {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--paper); border: 3px solid var(--z-200); color: var(--z-500); font-size: 0.8rem; font-weight: 700;
}
.step-label { font-size: 0.8125rem; color: var(--z-500); }
.step.active .step-num { background: #fff; border-color: var(--c); color: var(--c); box-shadow: 0 0 0 4px rgba(1, 0, 102, .08); }
.step.active .step-label { color: var(--z-900); font-weight: 600; }
.step.done .step-num { background: var(--c); border-color: var(--c); color: #fff; }
.step.done .step-label { color: var(--z-600); }
.step-line { flex: 1 1 auto; height: 3px; min-width: 16px; margin-top: 15px; background: var(--z-200); transition: background .3s; }
.step-line.done { background: var(--ink); }
@media (max-width: 640px) {
  .step { min-width: 0; }
  .step-label { display: none; }
  .step.active .step-label { display: block; position: absolute; transform: translateY(40px); }
  .stepper { padding-bottom: 28px; position: relative; }
}

/* Výběr firmy: velké volitelné řádky */
.company-grid { display: grid; gap: 10px; }
.company-card {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 18px; cursor: pointer;
  background: #fff; border: 1px solid var(--z-300); border-radius: var(--r-lg);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.company-card:hover { border-color: var(--z-500); }
.company-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.company-card.selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.company-card .mono { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 32px; flex-shrink: 0; border-radius: var(--r); background: var(--z-100); color: var(--ink); font-size: 1.125rem; font-weight: 800; }
.company-card img { width: 120px; height: 56px; flex-shrink: 0; object-fit: contain; object-position: center; }
@media (max-width: 520px) { .company-card img { width: 88px; height: 44px; } .company-card .mono { margin: 0 16px; } }
.company-card .company-main { min-width: 0; }
.company-card .company-name { font-size: 1.0625rem; font-weight: 600; }
.company-card .company-ico { color: var(--z-600); font-size: 0.8125rem; }
.company-card .tick { display: grid; place-items: center; width: 24px; height: 24px; margin-left: auto; flex-shrink: 0; border: 2px solid var(--z-300); border-radius: 50%; color: transparent; }
.company-card .tick .ti { width: 14px; height: 14px; }
.company-card.selected .tick { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Výběr organizace */
.area-tabs { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 18px; background: var(--z-200); border-radius: 9px; }
.area-tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 14px; background: transparent; border: 0; border-radius: var(--r); font-size: 0.875rem; font-weight: 500; color: var(--z-600); white-space: nowrap; }
.area-tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
#map-cz { width: 100%; height: 380px; background: #f7f9fc; border: 1px solid var(--z-300); border-radius: var(--r-lg); overflow: hidden; }
#map-cz .leaflet-container { background: #f7f9fc; font-family: inherit; }
#map-selected-text { min-height: 22px; margin-top: 10px; font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.org-list-title { margin: 26px 0 12px; font-size: 1.0625rem; font-weight: 600; }
.org-list { list-style: none; background: #fff; border: 1px solid var(--z-200); border-radius: var(--r-lg); }
.org-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--z-200); }
.org-list li:last-child { border-bottom: 0; }
.org-list .org-main { flex: 1 1 220px; min-width: 0; font-weight: 600; }
.org-empty-box { padding: 22px 18px; background: #fff; border: 1px dashed var(--z-300); border-radius: var(--r-lg); color: var(--z-600); }

/* Dynamické řádky dětí */
.children-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.children-row .form-group { margin-bottom: 0; }
.children-row button { width: 40px; height: 40px; background: var(--danger-tint); color: var(--danger); border: 0; border-radius: var(--r); }
.children-row button:hover { background: #f9d7dd; }
@media (max-width: 600px) {
  .children-row { grid-template-columns: 1fr 1fr; }
  .children-row .form-group:nth-child(3) { grid-column: 1 / span 2; }
  .children-row button { grid-column: 2; justify-self: end; }
}

/* Navigace mezi kroky */
.register-nav { order: 3; display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; }
.btn-back, .btn-next {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--r); font-size: 0.95rem; font-weight: 500;
  transition: background-color .15s var(--ease);
}
.btn-back { background: #fff; border-color: var(--z-300); color: var(--z-900); }
.btn-back:hover { background: var(--z-100); }
.btn-next { background: var(--ink); color: #fff; }
.btn-next:hover { background: var(--ink-hover); }
.btn-next:disabled { opacity: .5; cursor: not-allowed; }
.btn-back .ti, .btn-next .ti { width: 1.1em; height: 1.1em; }

/* Souhrn volby */
.summary { position: sticky; top: calc(var(--topbar-h) + 20px); padding: 18px 20px; margin-top: 24px; background: #fff; border: 1px solid var(--z-200); border-radius: var(--r-lg); }
.summary h2 { font-size: 0.9rem; font-weight: 600; }
.summary dl { display: grid; gap: 12px; margin-top: 12px; }
.summary dt { font-size: 0.78rem; color: var(--z-500); }
.summary dd { font-weight: 500; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .register-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .summary { position: static; order: -1; padding: 12px 14px; margin: 12px 0 0; }
  .summary dl { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
  .register-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0; padding: 12px 16px;
    background: rgba(255, 255, 255, .96); border-top: 1px solid var(--z-200);
  }
  .register-nav .btn-back, .register-nav .btn-next { flex: 1; }
  #map-cz { height: 280px; }
}

/* ---------- Ověření e-mailu a jednoduché stavové stránky ---------- */
.verify-container { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--paper); }
.verify-card { width: 100%; max-width: 480px; padding: 44px 36px; text-align: center; background: #fff; border: 1px solid var(--z-200); border-radius: var(--r-lg); }
.verify-card .icon-wrap { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%; }
.verify-card .icon-wrap .ti { width: 34px; height: 34px; }
.verify-card h1, .verify-card h2 { margin-bottom: 12px; font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.verify-card p { color: var(--z-600); line-height: 1.7; }
.icon-loading { background: var(--info-bg); color: var(--info); }
.icon-loading .ti { animation: ti-spin 1.4s linear infinite; }
.icon-success { background: var(--ok-bg); color: var(--ok); }
.icon-error { background: var(--bad-bg); color: var(--bad); }

/* Hlavička jednotlivých kroků */
.panel-head { margin-bottom: 20px; }
.panel-head h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.panel-head p { margin-top: 6px; color: var(--z-600); }
.opt { font-weight: 400; color: var(--z-500); }
.btn-lg { height: 44px; padding: 0 22px; font-size: 0.95rem; }
.success-note { margin: 16px 0 24px; }
.success-screen h1 { margin-bottom: 12px; font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.loading-screen + .loading-screen { display: none; }
@media (max-width: 900px) { .register-container { padding-bottom: 140px; } }
.register-layout:has(.summary[hidden]) { grid-template-columns: minmax(0, 720px); }
.verify-actions { margin-top: 24px; }
.verify-actions .btn { text-decoration: none; }

/* Volba způsobu platby příspěvků (srážka ze mzdy / platba samotným členem) */
.pay-choice { margin: 0 0 8px; padding: 0; border: 0; }
.pay-choice legend { margin-bottom: 10px; padding: 0; }
.pay-choice .check-row { margin-bottom: 10px; align-items: flex-start; }
.pay-choice input[type=radio] { margin-top: 4px; flex-shrink: 0; }

.pub-head-home ~ main [id] { scroll-margin-top: 120px; }
@media (max-width: 760px) { .pub-head-home ~ main [id] { scroll-margin-top: 84px; } }
