:root {
  --bg-body: #F3F4F6;
  --bg-card: #FFFFFF;
  --sidebar: #111827;
  --sidebar-text: #9CA3AF;
  --sidebar-hover: #FFFFFF;
  --accent: #E5383B;
  --accent-hover: #BA1826;
  --primary: #2563EB;
  --text-main: #1F2937;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  
  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- TYPOGRAFIE --- */
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; text-transform: uppercase; }
h2 { font-size: 2rem; color: var(--sidebar); margin-bottom: 1.5rem; letter-spacing: -0.02em; font-weight: 800; }
p { line-height: 1.7; margin-bottom: 1rem; color: var(--text-muted); }
a { text-decoration: none; color: inherit; }

/* --- SIDEBAR --- */
.sidebar {
  width: 280px;
  background: var(--sidebar);
  color: var(--sidebar-text);
  position: fixed;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2rem;
  z-index: 100;
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 4rem;
}
.brand-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  line-height: 1.1;
}
.brand-subtitle { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 600; }

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.nav-link {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--sidebar-hover);
  transform: translateX(5px);
}

.sidebar-cta {
  background: var(--accent);
  color: #fff;
  padding: 1rem;
  text-align: center;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.2s;
}
.sidebar-cta:hover { background: var(--accent-hover); }

/* --- MAIN CONTENT --- */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 3rem;
}

/* --- HERO BANNER --- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a8a 100%);
  border-radius: var(--radius-lg);
  padding: 4rem 3rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}
.hero::after {
  content: '';
  position: absolute;
  right: -5%;
  bottom: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  border-radius: 50%;
}
.hero-rocnik {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}
.hero h1 { font-size: clamp(2.5rem, 4vw, 4rem); line-height: 1; margin-bottom: 2rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.2); }

.hero-pills { display: flex; gap: 1rem; flex-wrap: wrap; }
.pill {
  background: #fff;
  color: var(--sidebar);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}
.pill span { color: var(--accent); }

/* --- BENTO GRID --- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.bento-item {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}
.bento-item:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.bento-item.accent-top { border-top: 4px solid var(--accent); }

.bento-intro { grid-column: span 8; }
.intro-list {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.intro-list.single-col { grid-template-columns: 1fr; }

.intro-list-item {
  background: var(--bg-body);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
}
.intro-list-item.accent-border { border-left-color: var(--accent); }
.intro-list-item strong { display: block; color: var(--text-main); margin-bottom: 0.25rem; }
.intro-list-item span { font-size: 0.9rem; }

.bento-terminy { grid-column: span 4; background: var(--sidebar); color: #fff; }
.bento-terminy h2 { color: #fff; }
.termin-timeline { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 1.5rem; position: relative; }
.termin-timeline::before {
  content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; background: rgba(255,255,255,0.1);
}
.t-item { position: relative; padding-left: 2rem; }
.t-item::before {
  content: ''; position: absolute; left: 0; top: 6px; width: 14px; height: 14px;
  background: var(--accent); border-radius: 50%; border: 3px solid var(--sidebar);
}
.t-date { font-family: 'Montserrat'; font-weight: 700; color: var(--accent); font-size: 1.1rem; }
.t-title { font-weight: 600; margin: 0.25rem 0; color: #fff; }
.t-desc { font-size: 0.85rem; color: var(--sidebar-text); line-height: 1.5; margin: 0; }

/* --- PROGRAM --- */
.program-section { margin-bottom: 4rem; }
.program-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.p-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
}
.p-card h3 { color: var(--sidebar); font-size: 1.2rem; margin-bottom: 0.25rem; }
.p-card .age { font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-bottom: 1.5rem; display: block; }
.p-card ul { list-style: none; }
.p-card li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.p-card li::before { content: '→'; color: var(--primary); font-weight: bold; }
.p-card li:last-child { border-bottom: none; }

.rule-block {
  display: block;
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* --- REKORDY --- */
.rekordy-section { margin-bottom: 4rem; }
.rekordy-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
}
.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.rekordy-content {
  display: none;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.3s ease;
}
.rekordy-content.active { display: block; }
.records-table-wrapper { overflow-x: auto; }
.records-table { width: 100%; border-collapse: collapse; text-align: left; }
.records-table th, .records-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.records-table th {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--sidebar-text);
  background: #F9FAFB;
  letter-spacing: 0.05em;
}
.records-table tr:last-child td { border-bottom: none; }
.record-holder { font-weight: 600; color: var(--text-main); }
.record-val {
  display: inline-block;
  background: #FEF3C7;
  color: #92400E;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-left: 0.4rem;
}
.record-year { color: var(--text-muted); font-size: 0.8rem; margin-left: 0.3rem; }

/* --- GALERIE --- */
.galerie-section { margin-bottom: 4rem; }
.gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.gal-item {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gal-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}
.gal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
.gal-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.gal-content span {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.5rem;
  text-shadow: none;
}
.gal-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.gal-item:hover .gal-bg { transform: scale(1.08); }
.gal-item:hover .gal-overlay {
  background: rgba(37, 99, 235, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* --- LIGHTBOX MODAL --- */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.lightbox-modal.active { display: flex; }
.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.2s;
  user-select: none;
}
.lightbox-close:hover { color: var(--accent); }
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
  user-select: none;
}
.lightbox-btn:hover { background: var(--accent); }
.lightbox-prev { left: -70px; }
.lightbox-next { right: -70px; }
.lightbox-caption {
  color: #fff;
  margin-top: 1.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

/* --- FORMULÁŘ --- */
.prihlaska-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 4rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group.full { grid-column: 1 / -1; }

label { font-weight: 600; font-size: 0.9rem; color: var(--sidebar); }
input {
  padding: 1rem;
  border: 1px solid #D1D5DB;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  background: #F9FAFB;
  transition: border 0.2s, background 0.2s;
}
input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }

/* Opravený checkbox v CSS kaskádě bez inline zápisu */
.form-group.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  background: #F9FAFB;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}
.checkbox-group label {
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  cursor: pointer;
}

.hp-field { display: none !important; }

.btn-submit {
  grid-column: 1 / -1;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 1.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  transition: background 0.2s;
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.btn-submit:hover { background: var(--accent-hover); }

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-status {
  display: none;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  align-items: center;
  gap: 0.75rem;
  line-height: 1.4;
}
.form-status.success { display: flex; background-color: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.form-status.error { display: flex; background-color: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.form-status-icon { font-size: 1.25rem; flex-shrink: 0; }

.gdpr-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 1.5rem; line-height: 1.6; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* --- FOOTER --- */
footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  margin-bottom: 2rem;
}
.footer-col h4 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--sidebar); }
.footer-col p { font-size: 0.9rem; margin-bottom: 0.5rem; }
.copyright { font-size: 0.8rem; color: #9CA3AF; text-align: right; }

/* --- ANIMACE --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- RESPONSIVITA --- */
.mobile-header { display: none; }
.mobile-cta {
  background: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
}

@media (max-width: 1024px) {
  .bento-intro, .bento-terminy { grid-column: span 12; }
}

@media (max-width: 768px) {
  body { flex-direction: column; }
  .sidebar { display: none; }
  
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: var(--sidebar);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .mobile-brand { font-family: 'Montserrat'; font-weight: 800; font-size: 1.2rem; line-height: 1; }
  .mobile-brand span { display: block; font-family: 'Inter'; font-size: 0.6rem; color: var(--accent); text-transform: uppercase;}
  
  .main-content { margin-left: 0; padding: 2rem 1rem; }
  .hero { padding: 3rem 1.5rem; }
  .form-grid, .intro-list { grid-template-columns: 1fr; }
  footer { flex-direction: column; align-items: flex-start; gap: 2rem; }
  .copyright { text-align: left; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}