/* ==============================
   RESET & BASE
============================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --castle:   #34495e; /* Horská modř */
  --water:    #2980b9; /* Modrá */
  --water-lt: #6dd5fa; /* Světle modrá */
  --dark:     #0d1117; /* Temná */
  --dark2:    #161b22;
  --accent:   #ffd700; /* Zlatá */
  --cream:    #f0f6fc;
  --text:     #c9d1d9;
  --radius:   20px;
  --shadow:   0 10px 40px rgba(0,0,0,0.6);
}

html { scroll-behavior: smooth; }
body { font-family: 'Nunito', sans-serif; background: var(--dark); color: var(--text); overflow-x: hidden; }
h1,h2,h3 { font-family: 'Cinzel', serif; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ==============================
   HERO
============================== */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(41, 128, 185, 0.3) 0%, rgba(13, 17, 23, 0.9) 100%),
              url('https://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/Kl%C3%ADnovec_a_TV_v%C4%9B%C5%BE.jpg/1280px-Kl%C3%ADnovec_a_TV_v%C4%9B%C5%BE.jpg') center/cover no-repeat;
  text-align: center;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, var(--dark) 100%); pointer-events: none; }
.hero-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.particle { position: absolute; background: var(--water-lt); border-radius: 50%; opacity: 0; animation: floatUp linear infinite; }
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  20%  { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(-100vh) scale(1.2); }
}

.hero-content { position: relative; z-index: 2; padding: 40px; max-width: 900px; }
.hero-icons { font-size: 80px; margin-bottom: 20px; display: block; filter: drop-shadow(0 0 20px var(--water)); }
.hero-title {
  font-size: clamp(3rem, 10vw, 6rem); color: #fff;
  text-shadow: 0 0 30px rgba(41,128,185,0.5), 0 5px 15px rgba(0,0,0,0.8);
  letter-spacing: 2px; line-height: 1;
}
.hero-subtitle { font-size: 1.4rem; color: var(--water-lt); letter-spacing: 4px; text-transform: uppercase; margin: 15px 0 30px; }
.hero-desc { font-size: 1.25rem; color: var(--text); line-height: 1.6; max-width: 700px; margin: 0 auto 40px; }
.hero-steps { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 50px; }
.step-badge { background: rgba(41,128,185,0.2); border: 1px solid var(--water); color: #fff; padding: 12px 28px; border-radius: 50px; font-weight: 700; backdrop-filter: blur(5px); }
.step-arrow { color: var(--water-lt); font-size: 1.5rem; }

.scroll-indicator { position: absolute; bottom: 30px; color: var(--water-lt); font-size: 2rem; animation: bounce 2s infinite; cursor: pointer; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(15px); } }

/* ==============================
   BUTTONS
============================== */
.btn-primary {
  background: linear-gradient(135deg, var(--water), #1f618d);
  color: #fff; border: none; padding: 16px 45px; border-radius: 50px;
  font-size: 1.2rem; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 25px rgba(41,128,185,0.4); transition: transform 0.3s, box-shadow 0.3s;
}
.btn-primary:hover { transform: translateY(-5px); box-shadow: 0 8px 35px rgba(41,128,185,0.6); }
.btn-secondary { background: transparent; border: 2px solid var(--water); color: var(--water-lt); padding: 14px 40px; border-radius: 50px; font-weight: 700; cursor: pointer; }

/* ==============================
   SECTION STYLES
============================== */
.section-title { text-align: center; font-size: 3rem; color: #fff; margin-bottom: 15px; }
.section-sub { text-align: center; color: var(--water-lt); font-size: 1.2rem; margin-bottom: 60px; }

/* LEARN GRID */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; margin-bottom: 100px; }
.flip-card { height: 250px; perspective: 1000px; cursor: pointer; }
.flip-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.7s; transform-style: preserve-3d; }
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-front, .flip-back { position: absolute; inset: 0; border-radius: var(--radius); backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; box-shadow: var(--shadow); }
.flip-front { background: var(--dark2); border: 1px solid rgba(41,128,185,0.2); }
.flip-front .card-icon { font-size: 4rem; margin-bottom: 15px; }
.flip-front .card-title { font-family: 'Cinzel', serif; font-size: 1.2rem; color: var(--water-lt); }
.flip-back { background: linear-gradient(135deg, var(--water), #1f618d); color: #fff; transform: rotateY(180deg); }
.flip-back p { font-size: 1.1rem; line-height: 1.5; }

/* TIMELINE */
.timeline-wrap { margin-bottom: 100px; }
.timeline-title { text-align: center; font-size: 2rem; color: var(--water-lt); margin-bottom: 50px; }
.timeline { position: relative; max-width: 900px; margin: 0 auto; padding-left: 50px; border-left: 4px solid var(--water); }
.tl-item { position: relative; margin-bottom: 40px; opacity: 0; transform: translateX(-30px); transition: 0.6s; }
.tl-item.visible { opacity: 1; transform: translateX(0); }
.tl-dot { position: absolute; left: -61px; top: 5px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 20px var(--accent); }
.tl-year { font-weight: 800; font-size: 1.1rem; color: var(--water-lt); }
.tl-text { font-size: 1.15rem; line-height: 1.6; margin-top: 5px; color: #fff; }

/* MAP + FACTS */
.map-fact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 100px; }
@media (max-width: 900px) { .map-fact { grid-template-columns: 1fr; } }
.fun-facts-box { background: var(--dark2); border-radius: var(--radius); padding: 40px; border: 1px solid rgba(41,128,185,0.2); }
.fun-facts-box h3 { font-size: 1.6rem; color: var(--accent); margin-bottom: 25px; }
.fun-list li { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 18px; font-size: 1.1rem; opacity: 0; transform: translateX(20px); transition: 0.5s; }
.fun-list li.visible { opacity: 1; transform: translateX(0); }

/* ==============================
   QUIZ
============================== */
.quiz-section { padding: 100px 0; background: #080b0f; }
.quiz-card { max-width: 850px; margin: 0 auto; background: var(--dark2); padding: 60px; border-radius: 30px; box-shadow: var(--shadow); border: 1px solid rgba(41,128,185,0.1); }
.quiz-progress-bar { width: 100%; height: 10px; background: #1a202c; border-radius: 5px; margin-bottom: 30px; overflow: hidden; }
#quizProgressFill { height: 100%; background: var(--water-lt); width: 0; transition: width 0.4s; }
.quiz-opt { width: 100%; background: #1a202c; border: 2px solid transparent; padding: 18px; text-align: left; border-radius: 15px; font-size: 1.1rem; color: #fff; cursor: pointer; margin-bottom: 12px; transition: 0.2s; }
.quiz-opt:hover { background: #2d3748; border-color: var(--water); }
.quiz-opt.correct { background: rgba(72, 187, 120, 0.2); border-color: #48bb78; }
.quiz-opt.wrong { background: rgba(245, 101, 101, 0.2); border-color: #f56565; }

/* ==============================
   DIPLOMA
============================== */
.diploma-section { padding: 100px 0; text-align: center; }
.diploma-input { padding: 15px 30px; font-size: 1.1rem; border-radius: 50px; border: 2px solid var(--water); background: #1a202c; color: #fff; width: 350px; max-width: 100%; outline: none; margin-bottom: 20px; }
#diplomaCanvas { max-width: 100%; height: auto; border-radius: 15px; box-shadow: var(--shadow); margin-top: 30px; }

/* ==============================
   FOOTER
============================== */
.site-footer { padding: 50px 0; border-top: 1px solid #1a202c; text-align: center; }
.footer-small { font-size: 0.9rem; opacity: 0.6; margin-top: 10px; }
