/* Judo Zbraslav — světlý sportovní design
   Akcent: červená z klubového loga; judo pásek jako dekorativní linka. */

:root {
  --red: #c60000;
  --red-dark: #a30000;
  --ink: #191919;
  --muted: #5f6368;
  --line: #e6e3de;
  --bg: #ffffff;
  --bg-soft: #f6f5f2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 15, 10, .05), 0 8px 24px rgba(20, 15, 10, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 780px; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 10px; padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 44px; width: auto; }
.brand-name { font-weight: 800; letter-spacing: .02em; font-size: 1.05rem; color: var(--red); }
.brand-name span { color: var(--ink); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--ink); font-weight: 600; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { background: var(--bg-soft); text-decoration: none; }
.nav a.active { color: var(--red); }

/* Hamburger (mobil) */
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 10px; margin: -10px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2.5px; border-radius: 2px;
  background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s;
}
@media (max-width: 639px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); padding: 8px 12px 14px;
  }
  .nav a { padding: 13px 12px; font-size: 1.05rem; }
  body.nav-open .nav { display: flex; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* Judo belt — bílá → žlutá → oranžová → zelená → modrá → hnědá → černá */
.belt-stripe {
  height: 4px;
  background: linear-gradient(to right,
    #ffffff 0 14.28%, #f2c300 0 28.57%, #e87e04 0 42.85%,
    #1e8a3c 0 57.14%, #1f5fbf 0 71.42%, #6d4423 0 85.71%, #191919 0 100%);
  border-top: 1px solid var(--line);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding: 72px 0 64px; background:
  radial-gradient(1200px 400px at 80% -10%, #fdf0ee 0%, transparent 60%), var(--bg); }
.kicker {
  text-transform: uppercase; letter-spacing: .14em; font-size: .8rem;
  font-weight: 700; color: var(--red); margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(1.9rem, 5.4vw, 3.1rem);
  line-height: 1.12; letter-spacing: -.02em;
  font-weight: 800; margin: 0 0 18px;
}
.hero-sub { max-width: 560px; color: var(--muted); font-size: 1.08rem; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  font-weight: 700; font-size: 1rem; border: 1.5px solid transparent;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-big { padding: 16px 22px; font-size: 1.1rem; }
.btn-sm { padding: 7px 14px; font-size: .9rem; }

/* ── Sections ───────────────────────────────────────────── */
.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 28px;
}
.section-head h2 {
  display: flex; flex-direction: column; gap: 4px;
  font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800;
  letter-spacing: -.01em; margin: 0;
}
.label {
  text-transform: uppercase; letter-spacing: .14em;
  font-size: .75rem; font-weight: 700; color: var(--red);
}
.more { font-weight: 600; white-space: nowrap; }
.muted { color: var(--muted); }

.cols { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 760px) { .cols { grid-template-columns: 1.2fr 1fr; } }

/* ── News ───────────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 760px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-list { display: flex; flex-direction: column; gap: 20px; }

.news-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.news-card time {
  font-size: .8rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em;
}
.news-card h3 { margin: 6px 0 10px; font-size: 1.15rem; letter-spacing: -.01em; }
.news-body { color: #333; font-size: .98rem; overflow-wrap: anywhere; }
.news-photo { border-radius: 8px; margin-top: 14px; display: block; }

.legacy-tables table { border-collapse: collapse; margin: 10px 0; max-width: 100%; }
.legacy-tables td { border: 1px solid var(--line); padding: 4px 8px; font-size: .9rem; }

/* ── Fakta / mapa ───────────────────────────────────────── */
.fact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.fact-row {
  display: grid; grid-template-columns: 88px 1fr; gap: 12px;
  padding: 16px 20px; border-top: 1px solid var(--line);
}
.fact-row:first-child { border-top: 0; }
.fact-key {
  text-transform: uppercase; letter-spacing: .1em; font-size: .75rem;
  font-weight: 700; color: var(--red); padding-top: 4px;
}
.map-link {
  display: block; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  position: relative; color: #fff;
}
.map-link img { display: block; width: 100%; }
.map-link span {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(25, 25, 25, .82); padding: 6px 12px;
  border-radius: 8px; font-size: .85rem; font-weight: 600;
}
.map-link:hover { text-decoration: none; }

.quote-card {
  background: var(--ink); color: #f5f5f2; border-radius: var(--radius);
  padding: 26px; font-size: 1.12rem; line-height: 1.5; font-weight: 500;
}
.quote-card p { margin: 0; }

.video-embed {
  position: relative; aspect-ratio: 16 / 9; margin-top: 20px;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: #000;
}
.video-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.video-caption { color: var(--muted); font-size: .85rem; margin-top: 8px; }

/* ── Trenéři ────────────────────────────────────────────── */
.coach-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 760px) { .coach-grid { grid-template-columns: repeat(3, 1fr); } }
.coach-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.coach-card img { width: 64px; height: 96px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.coach-card h3 { margin: 0 0 2px; font-size: 1.05rem; }
.coach-role { color: var(--muted); font-size: .85rem; margin: 0 0 8px; }
.coach-card p { margin: 0; font-size: .95rem; }

/* ── Prose ──────────────────────────────────────────────── */
.prose p { margin: 0 0 1em; }
.prose ul { padding-left: 1.2em; }
.prose-img { border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 8px; }
.prose-img-right { float: right; margin: 0 0 12px 16px; max-width: 160px; }
@media (max-width: 480px) { .prose-img-right { max-width: 130px; } }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 24px; }
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 28px; padding: 40px 20px 24px;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer-support { max-width: 170px; border-radius: 6px; }
.footer-label {
  text-transform: uppercase; letter-spacing: .12em; font-size: .75rem;
  font-weight: 700; color: var(--muted); margin-bottom: 10px;
}
.footer-grid a { display: block; color: var(--ink); font-size: .92rem; padding: 3px 0; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 12px;
  padding-top: 14px; padding-bottom: 22px;
  border-top: 1px solid var(--line);
  font-size: .85rem; color: var(--muted);
}
.footer-version { opacity: .6; }

/* ── Admin ──────────────────────────────────────────────── */
.admin-wrap { max-width: 560px; margin: 0 auto; padding: 20px; }
.admin-login { text-align: center; padding-top: 8vh; }
.admin-logo { height: 80px; margin-bottom: 12px; }
.admin-login h1 { font-size: 1.3rem; margin: 0 0 20px; }
.admin-login input {
  width: 100%; padding: 14px; font-size: 1.1rem; margin-bottom: 12px;
  border: 1.5px solid var(--line); border-radius: 10px;
}
.admin-error {
  background: #fdecec; color: var(--red-dark); border: 1px solid #f5c2c2;
  border-radius: 10px; padding: 12px 16px;
}
.admin-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.admin-bar-actions { display: flex; gap: 8px; align-items: center; }
.admin-bar form { display: inline; }
.admin-list { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.admin-item {
  display: flex; align-items: baseline; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; color: var(--ink);
}
.admin-item:hover { border-color: var(--ink); text-decoration: none; }
.admin-item time { font-size: .8rem; color: var(--muted); white-space: nowrap; font-weight: 700; }
.admin-item-title { font-weight: 600; flex: 1; }
.admin-form { display: flex; flex-direction: column; gap: 16px; }
.admin-form label { font-weight: 700; font-size: .9rem; display: flex; flex-direction: column; gap: 6px; }
.admin-form label .muted { font-weight: 400; }
.admin-form input[type="text"],
.admin-form input[type="date"],
.admin-form textarea {
  width: 100%; padding: 13px; font-size: 1.05rem; font-family: inherit;
  border: 1.5px solid var(--line); border-radius: 10px;
}
.admin-form input:focus, .admin-form textarea:focus, .admin-login input:focus {
  outline: 2px solid var(--red); outline-offset: 0; border-color: var(--red);
}
.admin-form input[type="file"] { font-size: 1rem; }
.admin-current-photo img { max-height: 180px; border-radius: 10px; display: block; margin-bottom: 8px; }
.admin-delete { margin-top: 28px; }

/* ── Editor ─────────────────────────────────────────────── */
.ed-field { display: flex; flex-direction: column; gap: 6px; }
.ed-label { font-weight: 700; font-size: .9rem; }
.ed-toolbar {
  display: flex; gap: 4px; align-items: center; flex-wrap: wrap;
  border: 1.5px solid var(--line); border-bottom: 0;
  border-radius: 10px 10px 0 0; padding: 6px; background: var(--bg-soft);
}
.ed-toolbar button {
  min-width: 38px; padding: 8px 10px; font-size: .95rem;
  border: 1px solid transparent; border-radius: 8px;
  background: none; cursor: pointer; color: var(--ink);
}
.ed-toolbar button:hover { background: #fff; border-color: var(--line); }
.ed-toolbar button:disabled { opacity: .35; cursor: default; }
.ed-toolbar button.active { background: var(--ink); color: #fff; }
.ed-spacer { flex: 1; }
.ed-mark-ico { background: #ffe86b; padding: 0 3px; border-radius: 3px; font-style: italic; }
.ed-rich, .ed-html {
  min-height: 220px; padding: 13px; font-size: 1.05rem; line-height: 1.55;
  border: 1.5px solid var(--line); border-radius: 0 0 10px 10px;
  background: #fff; overflow-wrap: anywhere;
}
.ed-rich:focus, .ed-html:focus { outline: 2px solid var(--red); border-color: var(--red); }
.ed-rich a { color: var(--red); text-decoration: underline; }
.ed-html { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; width: 100%; resize: vertical; }

/* ── Modal (nezavírá se klikem mimo) ────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 15, 10, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal[hidden] { display: none; }
.modal-box {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; width: 100%; max-width: 380px;
}
.modal-box h3 { margin: 0 0 10px; }
.modal-box input {
  width: 100%; padding: 12px; font-size: 1.05rem;
  border: 1.5px solid var(--line); border-radius: 10px; margin: 6px 0 4px;
}
.modal-box input:focus { outline: 2px solid var(--red); border-color: var(--red); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
