/* ══════════════════════════════════════════════════════════════════
   AČMK – Asociace českomoravského kroketu
   Design systém · verze 2026
   ══════════════════════════════════════════════════════════════════ */

/* ── Proměnné ─────────────────────────────────────────────────── */
:root {
  --green-dark:  #1a3a2a;
  --green-mid:   #2d6a4f;
  --green-lawn:  #4a8c65;
  --green-light: #a8d5b5;
  --cream:       #f5f0e8;
  --cream-dark:  #e8e0d0;
  --gold:        #c8a84b;
  --gold-light:  #e8c878;
  --text:        #1a2a1f;
  --text-muted:  #5a7060;
  --white:       #ffffff;
  --border:      #d4cfc4;
  --shadow:      0 2px 12px rgba(26,58,42,0.10);
  --radius:      8px;
  --nav-height:  60px;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--cream);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}

a { color: var(--green-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════
   NAVIGACE
   ══════════════════════════════════════════════════════════════════ */

nav.site-nav {
  background: var(--white);
  border-bottom: 3px solid var(--green-mid);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: var(--nav-height);
  padding: 0 24px;
  gap: 8px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--green-dark);
  font-weight: bold;
  font-size: 17px;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo span {
  color: var(--green-mid);
  font-family: 'Arial', sans-serif;
  font-size: 12px;
  font-weight: normal;
  display: block;
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  flex: 1;
  gap: 2px;
  list-style: none;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  display: block;
  padding: 8px 13px;
  text-decoration: none;
  color: var(--text-muted);
  font-family: 'Arial', sans-serif;
  font-size: 13.5px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--green-light);
  color: var(--green-dark);
  text-decoration: none;
}
.nav-links .nav-primary a { color: var(--green-dark); font-weight: 600; }

.nav-dropdown { position: relative; }
.nav-dropdown > a::after { content: ' ▾'; font-size: 10px; }
.dropdown-menu {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 180px;
  padding: 6px 0;
  z-index: 200;
  transition: opacity 0.15s, visibility 0s 0.5s;
}
.dropdown-menu.dropdown-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.15s, visibility 0s 0s;
}
.dropdown-menu a { display: block; padding: 8px 16px; color: var(--text-muted) !important; font-size: 13px; border-radius: 0; }
.dropdown-menu a:hover { background: var(--cream); color: var(--green-dark) !important; text-decoration: none; }

.btn-login {
  background: var(--green-mid);
  color: var(--white) !important;
  border-radius: 3px;
  padding: 2px 8px !important;
  margin-left: 8px;
  font-family: 'Arial', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
}
.btn-login:hover { background: var(--green-dark) !important; color: var(--white) !important; }

/* ══════════════════════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════════════════════ */

.content-wrap {
  max-width: 1200px;
  margin: 24px auto 48px;
  padding: 0 24px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}
.main-content { min-width: 0; }

/* index.php – desktop: explicitní umístění v gridu */
.two-col-index { align-items: start; }
.two-col-index .idx-header  { grid-column: 1; grid-row: 1;    align-self: start; margin-bottom: 0; min-width: 0; }
.two-col-index .idx-novinky  { grid-column: 1; grid-row: 2/4;  align-self: stretch; min-width: 0; }
.two-col-index .idx-turnaje  { grid-column: 2; grid-row: 1; }
.two-col-index .idx-zebricek { grid-column: 2; grid-row: 2; }
.two-col-index .idx-wcf      { grid-column: 2; grid-row: 3; }
.wcf-iframe { display: block; width: 100%; height: 565px; border: none; }

/* Žebříček ČR – záložky */
.zebricek-tabs { display: flex; gap: 4px; padding: 8px 8px 0; background: #eef6f0; border-bottom: 2px solid var(--green-mid); }
.ztab { flex: 1; padding: 7px 10px; font-size: 13px; font-weight: 600; background: #c8e6cc; border: 1px solid var(--green-mid); border-bottom: none; border-radius: 5px 5px 0 0; cursor: pointer; color: var(--text-muted); margin-bottom: -2px; transition: background .15s, color .15s; }
.ztab.active { background: var(--white); color: var(--green-dark); border-bottom: 2px solid var(--white); }
.ztab:not(.active):hover { background: #b0dbb6; color: var(--green-dark); }
.zebricek-footer { display: flex; gap: 12px; }

/* ══════════════════════════════════════════════════════════════════
   SEKCE – HEADER A FILTRY
   ══════════════════════════════════════════════════════════════════ */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.section-header h1 { font-size: 22px; color: var(--green-dark); }
.section-header p { font-size: 13px; color: var(--text-muted); font-family: 'Arial', sans-serif; margin-top: 3px; }

.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.filter-label { font-family: 'Arial', sans-serif; font-size: 12px; color: var(--text-muted); }
.filter-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: 'Arial', sans-serif;
  font-size: 12px;
  cursor: pointer;
  background: var(--white);
  color: var(--text-muted);
  transition: all 0.12s;
  text-decoration: none;
  display: inline-block;
}
.filter-btn:hover, .filter-btn.active { background: var(--green-mid); color: var(--white); border-color: var(--green-mid); text-decoration: none; }

.year-filter { display: flex; gap: 4px; flex-wrap: wrap; }
.year-btn {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'Arial', sans-serif;
  font-size: 12px;
  cursor: pointer;
  background: var(--white);
  color: var(--text-muted);
  transition: all 0.12s;
  text-decoration: none;
  display: inline-block;
}
.year-btn:hover, .year-btn.active { background: var(--green-mid); color: var(--white); border-color: var(--green-mid); text-decoration: none; }

/* ══════════════════════════════════════════════════════════════════
   CARD – ZÁKLADNÍ KONTEJNER
   ══════════════════════════════════════════════════════════════════ */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-header h2 { font-size: 16px; color: var(--green-dark); }
.see-all { font-size: 12px; color: var(--green-mid); text-decoration: none; font-family: 'Arial', sans-serif; }
.see-all:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════
   NOVINKY
   ══════════════════════════════════════════════════════════════════ */

.news-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
  text-decoration: none;
  color: inherit;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: var(--cream); text-decoration: none; }
.news-date {
  padding: 16px 14px;
  font-family: 'Arial', sans-serif;
  font-size: 11px;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding-top: 18px;
}
.news-date .day { font-size: 22px; font-weight: bold; color: var(--green-mid); line-height: 1; }
.news-date .month { text-transform: uppercase; letter-spacing: 0.06em; font-size: 10px; }
.news-body { padding: 14px 16px; }
.news-body p { font-size: 14px; color: var(--text); line-height: 1.5; }
.news-tag {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: 'Arial', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}
.news-tag.international { background: #fde8b0; color: #7a5a0a; }

/* ══════════════════════════════════════════════════════════════════
   TURNAJE – SEZNAM
   ══════════════════════════════════════════════════════════════════ */

.tournament-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  border-bottom: 1px solid var(--border);
  align-items: center;
  transition: background 0.12s;
  text-decoration: none;
  color: inherit;
}
.tournament-row:hover { background: var(--cream); text-decoration: none; }
.tournament-row:last-child { border-bottom: none; }
.t-date-col {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  font-family: 'Arial', sans-serif;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.t-date-col .t-day { font-size: 19px; font-weight: bold; color: var(--green-mid); }
.t-date-col .t-month { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.t-date-col .t-dur { font-size: 10px; color: var(--gold); margin-top: 2px; }
.t-info { padding: 14px 18px; }
.t-title { font-size: 15px; font-weight: bold; color: var(--green-dark); }
.t-detail { font-size: 12px; color: var(--text-muted); font-family: 'Arial', sans-serif; margin-top: 3px; }
.t-actions { padding: 0 16px; }

.btn-small {
  padding: 6px 14px;
  border: 1px solid var(--green-mid);
  border-radius: 5px;
  color: var(--green-mid);
  font-family: 'Arial', sans-serif;
  font-size: 12px;
  cursor: pointer;
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
  transition: all 0.12s;
}
.btn-small:hover { background: var(--green-mid); color: var(--white); text-decoration: none; }

/* ══════════════════════════════════════════════════════════════════
   ŽEBŘÍČEK
   ══════════════════════════════════════════════════════════════════ */

.ranking-tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--cream); }
.ranking-tab {
  padding: 9px 18px;
  font-family: 'Arial', sans-serif;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  transition: all 0.12s;
  margin-bottom: -1px;
  text-decoration: none;
  display: inline-block;
}
.ranking-tab:hover { color: var(--green-dark); text-decoration: none; }
.ranking-tab.active { border-bottom-color: var(--green-mid); color: var(--green-dark); font-weight: 600; background: var(--white); }

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Arial', sans-serif;
  font-size: 13px;
}
.ranking-table thead th {
  background: var(--cream);
  padding: 9px 12px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.ranking-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
.ranking-table tbody tr:hover { background: var(--cream); }
.ranking-table tbody tr:last-child { border-bottom: none; }
.ranking-table td { padding: 10px 12px; }
.rank-num { font-weight: bold; color: var(--text-muted); width: 32px; text-align: center; }
.rank-1 .rank-num { color: #c8a84b; }
.rank-2 .rank-num { color: #8a8a8a; }
.rank-3 .rank-num { color: #a05030; }
.player-name { font-weight: 600; color: var(--green-dark); }
.player-club { font-size: 11px; color: var(--text-muted); }
.points-bar-wrap { display: flex; align-items: center; gap: 8px; }
.points-val { font-weight: bold; min-width: 45px; text-align: right; }
.points-bar { height: 6px; background: var(--green-light); border-radius: 3px; flex: 1; overflow: hidden; min-width: 60px; }
.points-fill { height: 100%; background: var(--green-mid); border-radius: 3px; }

/* ══════════════════════════════════════════════════════════════════
   SIDEBAR – WIDGETY
   ══════════════════════════════════════════════════════════════════ */

.sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.widget-header {
  background: var(--green-dark);
  color: var(--white);
  padding: 10px 16px;
  font-size: 13px;
  font-family: 'Arial', sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.widget-footer { padding: 10px 16px; text-align: right; border-top: 1px solid var(--border); background: var(--cream); }

/* Sidebar navigace – seznam odkazů uvnitř widgetu */
.sidebar-nav a {
  display: block;
  padding: 9px 16px;
  font-family: 'Arial', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  text-decoration: none;
}
.sidebar-nav a:last-child { border-bottom: none; }
.sidebar-nav a:hover { background: var(--cream); color: var(--green-dark); text-decoration: none; }
.sidebar-nav a.active { color: var(--green-dark); background: #edf5f0; }
.sidebar-nav a.sidebar-nav-sub {
  padding-left: 28px;
  font-size: 10.5px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
}

/* Sekční nadpisy uvnitř sidebar-nav (položky bez URL) */
.sidebar-label {
    display: block;
    padding: 7px 16px;
    font-family: 'Arial', sans-serif;
    font-size: 10.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    margin-top: 2px;
}
.sidebar-label.sub {
    padding-left: 28px;
    font-size: 10px;
    font-weight: 600;
    background: transparent;
    margin-top: 0;
}

/* Turnajový widget */
.tour-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.tour-item:last-child { border-bottom: none; }
.tour-item:hover { background: var(--cream); }
.tour-name { font-size: 13.5px; font-weight: bold; color: var(--green-dark); }
.tour-meta { font-size: 11.5px; color: var(--text-muted); font-family: 'Arial', sans-serif; margin-top: 2px; }
.tour-badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Arial', sans-serif;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge-gc   { background: #dff0ea; color: #1a6040; }
.badge-ac   { background: #fde8b0; color: #7a5a0a; }
.badge-intl { background: #e0eaff; color: #2040a0; }

/* ══════════════════════════════════════════════════════════════════
   STATS BOXY
   ══════════════════════════════════════════════════════════════════ */

.quick-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
}
.stat-num { font-size: 26px; font-weight: bold; color: var(--green-mid); }
.stat-label { font-size: 11px; color: var(--text-muted); font-family: 'Arial', sans-serif; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

/* ══════════════════════════════════════════════════════════════════
   VYHLEDÁVÁNÍ
   ══════════════════════════════════════════════════════════════════ */

.search-wrap { position: relative; flex: 1; max-width: 240px; }
.search-wrap input {
  width: 100%;
  padding: 6px 12px 6px 30px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: 'Arial', sans-serif;
  font-size: 13px;
  outline: none;
  background: var(--white);
  color: var(--text);
}
.search-wrap input:focus { border-color: var(--green-mid); }
.search-wrap::before { content: '🔍'; position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-size: 11px; }

/* ══════════════════════════════════════════════════════════════════
   DEKORATIVNÍ PRVKY
   ══════════════════════════════════════════════════════════════════ */

.lawn-stripe {
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--green-mid) 0px, var(--green-mid) 24px, var(--green-lawn) 24px, var(--green-lawn) 48px);
  opacity: 0.5;
}

/* ══════════════════════════════════════════════════════════════════
   OBRÁZKY A TABULKY – ZÁKLADNÍ MOBILE SAFETY
   ══════════════════════════════════════════════════════════════════ */

img { max-width: 100%; height: auto; }

/* Tabulky s datovým obsahem (ne layout) */
.card table, .main-content table {
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

/* ══════════════════════════════════════════════════════════════════
   PATIČKA
   ══════════════════════════════════════════════════════════════════ */

.site-footer {
  background: var(--green-dark);
  color: var(--green-light);
  padding: 18px 24px;
  margin-top: 48px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Arial', sans-serif;
  font-size: 13px;
}
.site-footer a { color: var(--green-light); }
.site-footer a:hover { color: var(--white); }

/* ══════════════════════════════════════════════════════════════════
   OBECNÉ TYPOGRAFICKÉ UTILITY
   ══════════════════════════════════════════════════════════════════ */

h1, h2, h3 { color: var(--green-dark); line-height: 1.3; }
h1 { font-size: 22px; margin-bottom: 12px; }
h2 { font-size: 18px; margin-bottom: 10px; }
h3 { font-size: 15px; margin-bottom: 8px; }
p  { margin-bottom: 10px; }

/* Dělící čára */
.divider {
  border: none;
  border-bottom: 1px solid var(--border);
  margin: 16px 0;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE – 900 px
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .two-col {
    display: flex;
    flex-direction: column;
  }
  .main-content { order: 1; width: 100%; }
  /* Sidebar přechází do blokového layoutu a dostane oddělení nahoře */
  .sidebar { display: flex; flex-direction: column; gap: 16px; width: 100%; margin-top: 24px; }

  /* turnaje.php: obsah před sidebarem */
  .two-col-content-first .main-content { order: 0; }
  .two-col-content-first .sidebar { order: 1; margin-top: 0; }

  /* index.php: explicitní order přepíše globální .main-content { order:1 } */
  .two-col-index { display: flex; flex-direction: column; gap: 16px; }
  .two-col-index .idx-turnaje { order: 0; width: 100%; }
  .two-col-index .idx-header  { order: 1; width: 100%; }
  .two-col-index .idx-novinky  { order: 2; width: 100%; }
  .two-col-index .idx-zebricek { order: 3; width: 100%; }
  .two-col-index .idx-wcf      { order: 4; width: 100%; }
  .novinky-rok-suffix { display: none; }
  .idx-novinky .news-item:nth-child(n+5) { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE – 768 px
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .nav-inner {
    padding: 8px 12px;
    height: auto;
    flex-wrap: wrap;
    align-items: center;
  }
  .logo { font-size: 15px; flex: 1; order: 0; justify-content: flex-start; margin-bottom: 0; }
  .btn-login { order: 1; flex-shrink: 0; padding: 2px 8px !important; font-size: 12px; margin-left: 0; }
  .nav-links { order: 2; flex: none; flex-wrap: wrap; justify-content: center; gap: 4px; width: 100%; margin-top: 6px; }
  .nav-links li { flex-shrink: 0; }
  .nav-links a { padding: 6px 10px; font-size: 12px; }
  .nav-dropdown > a::after { content: ''; }
  .dropdown-menu { position: fixed; left: 0; right: 0; top: auto; margin-top: 4px; border-radius: 0; max-width: 100vw; }

  .content-wrap { padding: 0 12px; margin: 16px auto 32px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .two-col-index .idx-header { margin-bottom: 0; padding-bottom: 12px; }
  .section-header h1 { font-size: 20px; }

  /* Year filter: na mobilu horizontální scroll místo zalomených řad */
  .year-filter {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .year-btn { flex-shrink: 0; }

  .news-item { grid-template-columns: 65px 1fr; }
  .news-date { padding: 12px 8px; padding-top: 14px; }
  .news-date .day { font-size: 18px; }
  .news-date .month { font-size: 9px; }
  .news-body { padding: 12px; }
  .news-body p { font-size: 13px; }

  .quick-stats { gap: 8px; }
  .stat-box { padding: 12px 8px; }
  .stat-num { font-size: 22px; }
  .stat-label { font-size: 10px; }

  .filter-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-wrap { max-width: 100%; margin-left: 0 !important; }

  .tournament-row { grid-template-columns: 1fr; }
  .t-date-col { border-right: none; border-bottom: 1px solid var(--border); padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; text-align: left; }
  .t-date-col .t-day { font-size: 16px; display: inline; }
  .t-date-col .t-month { font-size: 11px; display: inline; margin-left: 4px; }
  .t-date-col .t-dur { margin-top: 0; }
  .t-info { padding: 12px; }
  .t-title { font-size: 14px; }
  .t-detail { font-size: 11px; }
  .t-actions { padding: 0 12px 12px; }

  .ranking-table { font-size: 12px; }
  .ranking-table thead th { padding: 8px; font-size: 10px; }
  .ranking-table tbody td { padding: 8px; }
  .rank-num { width: 28px; }
  .main-content .ranking-table thead th:last-child, .main-content .ranking-table tbody td:last-child { display: none; }
  .ranking-tab { flex: 1; text-align: center; font-size: 12px; padding: 10px 8px; }
  .widget-header { font-size: 12px; padding: 9px 12px; }
  .tour-item { padding: 10px 12px; }
  .card-header { padding: 12px 14px; }
  .card-header h2 { font-size: 15px; }
}


/* ── Žebříček – navigace prev/next ─────────────────────────────── */
.rank-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.rank-nav-btn {
  display: inline-block;
  padding: 5px 14px;
  background: var(--green-mid);
  color: var(--white);
  border-radius: 4px;
  font-size: 13px;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.4;
}
.rank-nav-btn:hover { background: var(--green-dark); color: var(--white); text-decoration: none; }
.rank-title { font-size: 20px; font-family: Georgia, serif; color: var(--green-dark); flex: 1; }
.ranking-table td.mensi { font-size: 11px; color: var(--text-muted); text-align: right; }
a.hrac { color: var(--green-mid); text-decoration: none; }
a.hrac:hover { text-decoration: underline; }

.chart-wrap { max-width: 100%; overflow-x: auto; margin-bottom: 16px; }
canvas#zebricek { display: block; max-width: 100%; height: auto; }

table.stat { display: table; width: 100%; border: 0; border-collapse: collapse; }
table.stat td { border: 0; padding: 2px 8px 2px 0; line-height: 1.4; font-size: 13px; vertical-align: top; }
table.stat td:first-child { white-space: nowrap; width: 1%; }
table.stat td:last-child { white-space: nowrap; width: 1%; }
table.stat tr.odtop td { padding-top: 10px; border-top: 1px solid green; white-space: normal; width: auto; }
table.stat tr.odbottom td { font-size: 1px; line-height: 1px; padding-bottom: 7px; }


/* ── Legacy class aliases (zachování výstupu z původního PHP) ───── */

hr.greenLine {
  border: none;
  border-top: 2px solid var(--green-mid);
  margin: 20px 0;
}

a.green, a.small-link {
  color: var(--green-mid);
  text-decoration: none;
  margin-left: 0.4em;
}
a.green:hover, a.small-link:hover { text-decoration: underline; }
a.small-link { font-size: 13px; font-weight: normal; margin-left: 12px; }

.tucne { font-weight: bold; }
.sikmo  { font-style: italic; }

p.gPojemMain {
  margin: 16px 0 2px;
  font-family: Georgia, serif;
  font-size: 15px;
}
p.gPojem {
  margin: 0 0 4px 16px;
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.55;
}

p.odsadit { margin-left: 24px; }

.main-content h1 {
  font-size: 26px;
  font-family: Georgia, serif;
  color: var(--green-dark);
  margin-bottom: 4px;
}
.main-content h2 {
  font-size: 18px;
  font-family: Georgia, serif;
  color: var(--green-dark);
  margin: 24px 0 8px;
}
.main-content h3 {
  font-size: 15px;
  font-family: Georgia, serif;
  color: var(--green-dark);
  margin: 16px 0 6px;
}
.main-content p {
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 10px;
  color: var(--text-body);
}
.main-content table {
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 12px;
}
.main-content table td, .main-content table th {
  padding: 4px 8px;
  vertical-align: top;
}

/* Orgány AČMK – přehled kontaktů */
.info-table { border-collapse: collapse; font-size: 14px; margin-bottom: 8px; }
.info-table td { padding: 3px 8px 3px 0; vertical-align: top; }

/* Kluby – logo obrázek */
.klub-logo { float: left; padding-right: 14px; padding-bottom: 10px; max-width: 140px; height: auto; }
.klub-clear { clear: both; }

/* ══════════════════════════════════════════════════════════════════
   TURNAJE – turnajový kalendář a detail turnaje
   ══════════════════════════════════════════════════════════════════ */

/* Turnajový kalendář */
table.kalendar { border-collapse: collapse; width: 100%; font-size: 13px; }
table.kalendar tr.hlavicka td { background: var(--green-dark); color: var(--white); font-weight: bold; padding: 4px 6px; }
table.kalendar tr td { padding: 3px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.kalendar tr td:first-child { white-space: nowrap; }
td.ikona { text-align: center; padding: 2px 2px; }
td.ikona2 { text-align: center; padding: 2px 2px; }
table.kalendar td.ikona { text-align: center; }
table.kalendar td.ikona2 { text-align: center; width: 48px; }
table.kalendar tr td.ikona img  { display: block; height: 18px; width: auto; margin: 0 auto; }
table.kalendar tr td.ikona2 img { display: block; height: 18px; width: auto; margin: 0 auto; }
img.ikona  { display: block; margin: auto; }
img.ikona2 { display: block; margin: auto; }

@media (max-width: 768px) {
  .hide-mob { display: none; }
}

/* Detail turnaje */
table.ttab { border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
table.ttab td { padding: 3px 10px 3px 0; vertical-align: top; }
table.ttab td.hlavicka { background: var(--green-mid); color: var(--white); font-weight: bold; padding: 4px 8px; }
table.ttab td.frst { color: var(--text-dark); font-size: 12px; font-weight: bold; white-space: nowrap; padding-right: 6px; background: none; }
table.tvHeader { width: 100%; border-collapse: collapse; margin-bottom: 4px; }
table.tvHeader td { vertical-align: middle; padding: 4px 0; }
table.tvHeader td.tvRight { text-align: right; white-space: nowrap; }
table.tvHeader2 { width: 100%; border-collapse: collapse; margin: 8px 0; }
table.tvHeader2 td.tento { background: var(--green-mid); color: var(--white); font-weight: bold; padding: 5px 12px; border-radius: 4px; }
span.turnajFaze { font-weight: bold; color: var(--green-mid); font-size: 13px; }
span.Vkomentar { font-style: italic; color: var(--text-muted); font-size: 12px; }
span.tmisto { font-size: 15px; font-weight: normal; color: var(--text-muted); }
/* Rok/prev/next navigation in tournament detail */
.tur-nav { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.tur-nav-btn { display: inline-block; padding: 4px 12px; background: var(--green-mid); color: var(--white); border-radius: 4px; font-size: 13px; text-decoration: none; font-weight: 600; cursor: pointer; border: none; }
.tur-nav-btn:hover { background: var(--green-dark); color: var(--white); text-decoration: none; }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE – 480 px
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  body { font-size: 14px; }
  .nav-inner { padding: 6px 8px; }
  .logo { font-size: 14px; flex: 1; }
  .logo svg { width: 28px; height: 28px; }
  .nav-links a { font-size: 11px; padding: 5px 8px; }
  .section-header h1 { font-size: 18px; }
  .news-item { grid-template-columns: 55px 1fr; }
  .news-date { padding: 10px 6px; padding-top: 12px; }
  .news-date .day { font-size: 16px; }
  .news-body { padding: 10px; }
  .quick-stats { grid-template-columns: 1fr; }
  .stat-box { display: flex; justify-content: space-between; align-items: center; text-align: left; }
  .stat-num { font-size: 24px; }
  .year-btn, .filter-btn { font-size: 11px; padding: 4px 8px; }
  .t-title { font-size: 13px; }
  .tour-badge { font-size: 9px; padding: 2px 5px; }

  /* Patička pod sebou na úzkých displejích */
  .footer-inner { flex-direction: column; gap: 6px; text-align: center; }
}

/* ══════════════════════════════════════════════════════════════════
   APP – Administrační formuláře a tabulky
   ══════════════════════════════════════════════════════════════════ */

/* Formulářové prvky */
input.inp, textarea.inp, textarea.inpt, select.inp {
  background-color: #e6f7e5;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 4px;
  font-family: Arial, sans-serif;
  font-size: 13px;
}
input.inp:focus, textarea.inp:focus, textarea.inpt:focus, select.inp:focus {
  background-color: #beecbe;
  outline: none;
  border-color: var(--green-mid);
}
input.justShow, input.justShow2, input.justShow3 {
  border: 0;
  background: #beecbe;
  font-weight: bold;
  font-family: Arial, sans-serif;
  text-align: center;
}
input.justShow2 { background: #e6f7e5; }
input.justShow3 { background: #fff; }

/* Login tabulka */
table.login td { padding: 3px 4px; }

/* Formulářové tlačítko (z forms.php tvFormButton1) */
input[type="submit"], input[type="button"], button.frmBtn {
  background: var(--green-mid);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
}
input[type="submit"]:hover, input[type="button"]:hover, button.frmBtn:hover { background: var(--green-dark); }

/* Obecné tabulky aplikace */
table.ttab { border-collapse: collapse; font-size: 13px; }
table.ttab td { padding: 2px 6px; }
table.ttab td.hlavicka  { background: #e6f7e5; text-align: center; color: var(--green-dark); }
table.ttab td.hlavicka2 { background: #beecbe; text-align: center; font-weight: bold; }
table.ttab td.nrml { text-align: left; }

table.htab { border-collapse: collapse; font-size: 13px; padding-left: 10px; }
table.htab td { background: #e6f7e5; padding: 2px 6px 2px 4px; }
table.htab td.hlavicka  { background: #beecbe; text-align: center; font-weight: bold; }
table.htab td.hlavicka2 { background: #beecbe; text-align: center; font-weight: bold; border: 4px solid #beecbe; }
table.htab td.hlavicka3 { background: #fff; text-align: center; font-weight: bold; border: 4px solid #fff; }
table.htab td.ffrst     { background: #beecbe; font-weight: bold; }

table.rtab { border-collapse: collapse; width: 100%; font-size: 13px; }
table.rtab td { background: #e6f7e5; padding: 2px 6px; text-align: center; }
table.rtab td.hlavicka  { background: #beecbe; font-weight: bold; }
table.rtab td.hlavicka3 { background: #fff; font-weight: bold; border: 4px solid #fff; }
table.rtab td.rght      { background: #fff; text-align: right; }
table.rtab td.cislo     { font-size: 16px; font-weight: bold; }
table.rtab tr.lichy1 td, table.rtab tr.lichy2 td { background: #e6f7e5; }
table.rtab tr.sudy1 td,  table.rtab tr.sudy2  td { background: #beecbe; }
table.rtab tr.lichy1 td, table.rtab tr.sudy1 td { padding-top: 5px; padding-bottom: 2px; }
table.rtab tr.lichy2 td, table.rtab tr.sudy2 td { padding-top: 2px; padding-bottom: 5px; }

table.ftab { border-collapse: collapse; font-size: 13px; }
table.ftab td { padding: 2px 6px; }

table.hraci { border-collapse: collapse; font-size: 13px; }
table.hraci tr.hlavicka td { text-align: center; background: #beecbe; }
table.hraci td { padding: 2px 6px; }

table.kalTurHeader td { padding: 2px 4px; }
table.upmenu td { padding: 2px 4px; text-align: center; font-size: 12px; }
table.upmenu tr.upmenuhead td { font-weight: bold; padding: 0; }

/* Sdílené buňky */
td.frst   { background: #e6f7e5; padding: 2px 6px 2px 2px; }
td.frstvp { background: #beecbe; padding: 2px 6px 2px 2px; font-weight: bold; }
td.vedle  { vertical-align: top; }
td.cislo  { font-size: 16px; font-weight: bold; }

span.turnajFaze { background: #e6f7e5; font-weight: bold; padding: 5px 10px; display: inline-block; margin-bottom: 6px; }

/* Login chybová zpráva */
.login-msg { color: var(--green-dark); background: #e6f7e5; border: 1px solid var(--green-mid); border-radius: 4px; padding: 6px 12px; margin-bottom: 10px; font-weight: bold; }
