/* ══════════════════════════════════════
   POLÍFKOFEST – sdílený stylesheet
   polifkofest_official
   ══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Bebas+Neue&family=Nunito:wght@300;400;600;700&display=swap');

:root {
  --cream:   #fdf6ec;
  --warm:    #f5e8d0;
  --border:  #e8d5b4;
  --gold:    #c8860a;
  --gold-lt: #e8a820;
  --red:     #c0392b;
  --dark:    #2b1d0e;
  --text:    #3d2b14;
  --muted:   #8a6e4a;
  --white:   #ffffff;
  --green:   #2e7d32;

  --shadow-sm: 0 2px 8px rgba(43,29,14,0.08);
  --shadow-md: 0 6px 24px rgba(43,29,14,0.12);
  --shadow-lg: 0 16px 48px rgba(43,29,14,0.16);

  --radius: 12px;
  --radius-sm: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--text);
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}
.topbar-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 22px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { color: var(--gold); }
.logo .flame { font-size: 20px; }

nav { display: flex; align-items: center; gap: 4px; }
nav a {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}
nav a:hover { color: var(--text); background: var(--warm); }
nav a.active { color: var(--gold); background: rgba(200,134,10,0.1); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 12px 24px 20px;
  gap: 4px;
}
.mobile-nav a {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--gold); background: rgba(200,134,10,0.08); }
.mobile-nav.open { display: flex; }

/* ── PAGE HEADER ── */
.page-header {
  background: linear-gradient(135deg, var(--warm) 0%, #fdefd9 60%, #fdf6ec 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(200,134,10,0.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 30%, rgba(192,57,43,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.page-header-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 11px;
  letter-spacing: 0.45em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}
.page-header h1 em { color: var(--gold); font-style: italic; }
.page-header p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* ── CONTAINER / SECTION ── */
.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--border); }

.section-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 32px;
}

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, transform 0.25s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-grid { display: grid; gap: 20px; }
.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* ── STAT BOX ── */
.stat-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-box .stat-val {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-box .stat-lbl {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* ── BADGE ── */
.badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.badge-gold   { background: rgba(200,134,10,0.12); color: var(--gold); }
.badge-red    { background: rgba(192,57,43,0.12);  color: var(--red); }
.badge-grey   { background: var(--warm); color: var(--muted); }
.badge-green  { background: rgba(46,125,50,0.12);  color: var(--green); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 4px 14px rgba(200,134,10,0.35);
}
.btn-primary:hover { background: var(--gold-lt); box-shadow: 0 6px 20px rgba(200,134,10,0.45); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}
.btn-outline:hover { background: rgba(200,134,10,0.08); }
.btn-red    { background: var(--red);  color: white; }
.btn-red:hover    { background: #a93226; }
.btn-gray   { background: var(--warm); color: var(--text); border: 1px solid var(--border); }
.btn-gray:hover   { background: var(--border); }

/* ── VEŘEJNÁ PŘIHLÁŠKA TÝMU ── */
.public-modal { position:fixed; inset:0; z-index:500; display:none; align-items:center; justify-content:center; padding:18px; background:rgba(43,29,14,.68); }
.public-modal.active { display:flex; }
.public-modal-dialog { width:100%; max-width:620px; max-height:92vh; overflow-y:auto; background:var(--cream); border-radius:16px; box-shadow:var(--shadow-lg); }
.public-modal-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:24px 26px 18px; border-bottom:1px solid var(--border); }
.public-modal-header .section-label { margin-bottom:5px; }
.public-modal-header h2 { font-family:'Playfair Display',serif; font-size:27px; line-height:1.2; }
.public-modal-header p { color:var(--gold); font-weight:700; font-size:13px; margin-top:5px; }
.public-modal-close { border:0; background:none; color:var(--muted); font-size:30px; line-height:1; cursor:pointer; padding:0 4px; }
.public-modal-body { padding:22px 26px 8px; }
.public-modal-footer { display:flex; justify-content:flex-end; gap:10px; padding:12px 26px 24px; }
.public-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.public-form-row { margin-bottom:15px; }
.public-form-row label { display:block; color:var(--gold); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; margin-bottom:5px; }
.public-form-row input,.public-form-row textarea { width:100%; border:2px solid var(--border); border-radius:9px; padding:10px 12px; color:var(--text); background:white; font:inherit; outline:none; resize:vertical; }
.public-form-row input:focus,.public-form-row textarea:focus { border-color:var(--gold); }
.public-form-message { min-height:24px; font-size:14px; font-weight:700; }
.public-form-message.success { color:var(--green); background:rgba(46,125,50,.1); border-radius:8px; padding:10px 12px; }
.public-form-message.error { color:var(--red); }
.public-honeypot { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.rocnik-register-action { margin-top:12px; }

/* ── ROČNÍK HERO ── */
.rocnik-hero {
  background: linear-gradient(160deg, #fff8ef 0%, var(--warm) 100%);
  border-bottom: 1px solid var(--border);
  padding: 60px 24px 52px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.rocnik-hero::after {
  content: attr(data-year);
  position: absolute;
  right: -20px;
  bottom: -40px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 260px;
  color: rgba(200,134,10,0.06);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.rocnik-hero .rnumber {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 13px;
  letter-spacing: 0.42em;
  color: var(--gold);
  margin-bottom: 12px;
}
.rocnik-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(42px, 8vw, 88px);
  font-weight: 900;
  color: var(--text);
  line-height: 0.95;
  margin-bottom: 20px;
}
.rocnik-hero h1 em { color: var(--gold); font-style: italic; }
.rocnik-hero .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: center;
  color: var(--muted);
  font-size: 15px;
  margin-top: 24px;
}
.rocnik-hero .meta strong { color: var(--text); }

/* ── VÝSLEDKY TABULKA ── */
.results-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.results-table th {
  text-align: left; padding: 10px 16px;
  font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 2px solid var(--border); font-weight: 700;
}
.results-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.results-table tr:last-child td { border-bottom: none; }
.results-table tr:hover td { background: var(--warm); }
.rank { font-family: 'Bebas Neue', sans-serif; font-size: 24px; color: var(--muted); line-height: 1; }
.rank.gold   { color: #d4a017; }
.rank.silver { color: #8a9ba8; }
.rank.bronze { color: #c07840; }
.team-name { font-weight: 700; color: var(--text); }
.soup-name { color: var(--muted); font-size: 14px; }

/* ── TÝMY GRID ── */
.teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.team-number { font-family: 'Bebas Neue', sans-serif; font-size: 32px; color: var(--border); line-height: 1; min-width: 36px; }
.team-info .team-name-t { font-weight: 700; color: var(--text); font-size: 15px; }
.team-info .team-soup-t { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ── ROČNÍKY PŘEHLED ── */
.rocniky-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.rocnik-card-wrap { display:flex; flex-direction:column; }
.rocnik-card-wrap .rocnik-card { flex:1; }
.rocnik-card-register { justify-content:center; width:calc(100% - 28px); margin:-20px auto 14px; position:relative; z-index:2; }
.rocnik-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none;
  color: inherit; display: block; transition: box-shadow 0.25s, transform 0.25s;
}
.rocnik-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.rocnik-card-head {
  background: linear-gradient(135deg, var(--warm) 0%, #fdecd8 100%);
  padding: 32px 28px 24px; position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.rocnik-card-head::after {
  content: attr(data-year); position: absolute; right: -8px; bottom: -20px;
  font-family: 'Bebas Neue', sans-serif; font-size: 100px;
  color: rgba(200,134,10,0.1); line-height: 1; pointer-events: none;
}
.rocnik-card-year { font-family: 'Bebas Neue', sans-serif; font-size: 52px; color: var(--text); line-height: 1; margin-bottom: 4px; }
.rocnik-card-rnumber { font-size: 12px; letter-spacing: 0.25em; color: var(--gold); font-weight: 700; text-transform: uppercase; }
.rocnik-card-body { padding: 20px 28px 24px; }
.rocnik-card-meta { font-size: 14px; color: var(--muted); margin-bottom: 16px; display: flex; flex-direction: column; gap: 5px; }
.rocnik-card-meta span { display: flex; align-items: center; gap: 8px; }

/* ── SPONZOŘI ── */
.sponzori-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.sponzor-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 20px; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 12px; box-shadow: var(--shadow-sm); text-decoration: none;
  color: inherit; transition: box-shadow 0.2s, transform 0.2s;
}
.sponzor-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.sponzor-name { font-weight: 700; font-size: 15px; color: var(--text); }
.sponzor-note { font-size: 13px; color: var(--muted); }
.sponzori-rocnik { margin-bottom: 52px; }
.sponzori-rocnik-header {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px;
  padding-bottom: 10px; border-bottom: 2px solid var(--border);
}
.sponzori-rocnik-header .sr-year { font-family: 'Bebas Neue', sans-serif; font-size: 44px; color: var(--text); line-height: 1; }
.sponzori-rocnik-header .sr-rnumber { font-size: 13px; color: var(--gold); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* ── KONTAKT ── */
.contact-block { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.contact-item {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); display: flex; gap: 18px; align-items: flex-start;
}
.contact-icon { font-size: 28px; flex-shrink: 0; margin-top: 2px; }
.contact-label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.contact-val { font-size: 18px; font-weight: 700; color: var(--text); }
.contact-val a { color: var(--gold); text-decoration: none; }
.contact-val a:hover { text-decoration: underline; }
.contact-desc { font-size: 14px; color: var(--muted); margin-top: 4px; }
.map-embed { width: 100%; height: 380px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm); }
.map-embed iframe { width: 100%; height: 100%; border: none; display: block; }

/* ── GALERIE ── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gallery-item { aspect-ratio: 4/3; border-radius: var(--radius-sm); overflow: hidden; background: var(--warm); border: 1px solid var(--border); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; display: block; }
.gallery-item:hover img { transform: scale(1.05); }

/* ── FOOTER ── */
footer {
  background: var(--dark); color: rgba(253,246,236,0.65);
  text-align: center; padding: 40px 24px; font-size: 14px; letter-spacing: 0.04em;
}
footer .footer-logo { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 900; color: var(--cream); margin-bottom: 8px; }
footer .footer-logo span { color: var(--gold); }
footer .footer-brand-row { display:flex; justify-content:center; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:8px; }
footer .footer-brand-row .footer-logo { margin-bottom:0; }
footer .footer-credit { color:rgba(253,246,236,.65); font-size:13px; }
footer .footer-credit::before { content:'·'; margin-right:14px; color:rgba(253,246,236,.35); }
footer .footer-credit a { color:var(--gold); font-weight:700; }
footer a { color: rgba(200,134,10,0.8); text-decoration: none; }
footer a:hover { color: var(--gold-lt); }
footer .footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; margin: 16px 0; }
footer .footer-admin-row { margin: -2px 0 18px; }
footer .footer-admin-login {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 30px; padding: 5px 12px; border: 1px solid rgba(253,246,236,.22);
  border-radius: 999px; color: rgba(253,246,236,.62); font-size: 11px;
  font-weight: 700; letter-spacing: .04em; transition: color .2s, border-color .2s, background .2s;
}
footer .footer-admin-login:hover {
  color: var(--cream); border-color: rgba(200,134,10,.75); background: rgba(200,134,10,.12);
}

/* ── PROSE ── */
.prose { color: var(--text); }
.prose p { margin-bottom: 16px; font-size: 16px; line-height: 1.8; }
.prose p:last-child { margin-bottom: 0; }
.rocnik-text-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:54px; align-items:start; }
.rocnik-text-grid.single { grid-template-columns:minmax(0,680px); }
.rocnik-text-column { min-width:0; }
.rocnik-comment-column { border-left:1px solid var(--border); padding-left:54px; }
.rocnik-text-grid.single .rocnik-comment-column { border-left:0; padding-left:0; }

/* ── DIVIDER ── */
.divider { height: 1px; background: linear-gradient(to right, transparent, var(--border), transparent); margin: 48px 0; }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up   { animation: fadeUp 0.55s ease both; }
.fade-up-1 { animation-delay: 0.08s; }
.fade-up-2 { animation-delay: 0.18s; }
.fade-up-3 { animation-delay: 0.28s; }
.fade-up-4 { animation-delay: 0.38s; }

/* ── MINI HISTORY STRIP ── */
.history-strip { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.hs-item {
  flex-shrink: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; text-decoration: none; color: inherit; min-width: 140px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.hs-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hs-item .hs-year { font-family: 'Bebas Neue', sans-serif; font-size: 40px; color: var(--text); line-height: 1; }
.hs-item .hs-rocnik { font-size: 12px; color: var(--gold); font-weight: 700; letter-spacing: 0.1em; }
.hs-item .hs-status { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  nav { display: none; }
  .hamburger { display: flex; }
  .topbar-inner { height: 56px; }
  .section { padding: 44px 0; }
  .page-header { padding: 40px 20px 36px; }
  .rocnik-hero { padding: 44px 20px 40px; }
  footer .footer-brand-row { flex-direction:column; gap:3px; }
  footer .footer-credit::before { content:none; margin:0; }
  .public-form-grid { grid-template-columns:1fr; gap:0; }
  .public-modal-header,.public-modal-body { padding-left:18px; padding-right:18px; }
  .public-modal-footer { padding-left:18px; padding-right:18px; }
  .rocnik-text-grid,.rocnik-text-grid.single { grid-template-columns:1fr; gap:34px; }
  .rocnik-comment-column { border-left:0; border-top:1px solid var(--border); padding-left:0; padding-top:34px; }
  .rocnik-text-grid.single .rocnik-comment-column { border-top:0; padding-top:0; }
}
