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

:root {
  --granite: #708090; /* Slate Gray */
  --river:   #4682b4; /* Steel Blue */
  --forest:  #2f4f4f; /* Dark Slate Gray */
  --dark:    #1a1a1a;
  --dark2:   #252525;
  --accent:  #5f9ea0; /* Cadet Blue */
  --cream:   #e0e0e0;
  --text:    #f5f5f5;
  --gold:    #ffd700;
  --radius:  18px;
  --shadow:  0 8px 32px rgba(0,0,0,0.5);
}

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: 1100px; 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(70, 130, 180, 0.2) 0%, rgba(26, 26, 26, 0.95) 100%),
              url('https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Svato%C5%A1sk%C3%A9_sk%C3%A1ly_v_poledne.jpg/1280px-Svato%C5%A1sk%C3%A9_sk%C3%A1ly_v_poledne.jpg') center/cover no-repeat;
  text-align: center; overflow: hidden;
}
.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; }
.particle { position: absolute; background: var(--river); border-radius: 50%; opacity: 0; animation: floatUp linear infinite; }
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  20%  { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-100vh) scale(1.2); }
}

.hero-content { position: relative; z-index: 2; padding: 40px; max-width: 850px; }
.rock-icon { font-size: 80px; margin-bottom: 20px; display: block; filter: drop-shadow(0 0 20px var(--river)); }
.hero-title {
  font-size: clamp(2.8rem, 8vw, 5.5rem); color: #fff;
  text-shadow: 0 0 30px rgba(70,130,180,0.5), 0 5px 15px rgba(0,0,0,0.8);
  letter-spacing: 2px; line-height: 1.1;
}
.hero-subtitle { font-size: 1.3rem; color: var(--river); letter-spacing: 4px; text-transform: uppercase; margin: 15px 0 30px; }
.hero-desc { font-size: 1.2rem; color: var(--cream); line-height: 1.7; max-width: 650px; margin: 0 auto 35px; }
.hero-steps { display: flex; align-items: center; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 40px; }
.step-badge { background: rgba(70,130,180,0.15); border: 1px solid var(--river); color: var(--cream); padding: 10px 22px; border-radius: 50px; font-weight: 700; backdrop-filter: blur(5px); }
.step-arrow { color: var(--river); font-size: 1.4rem; }

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

/* ==============================
   BUTTONS
============================== */
.btn-primary {
  background: linear-gradient(135deg, var(--river), var(--forest));
  color: #fff; border: none; padding: 15px 38px; border-radius: 50px;
  font-size: 1.1rem; font-weight: 800; cursor: pointer; transition: 0.3s;
  box-shadow: 0 5px 20px rgba(70,130,180,0.4);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(70,130,180,0.6); }
.btn-secondary { background: transparent; border: 2px solid var(--granite); color: var(--river); padding: 13px 32px; border-radius: 50px; font-weight: 700; cursor: pointer; }

/* ==============================
   SECTION STYLES
============================== */
.learn-section { padding: 100px 0; background: var(--dark2); }
.section-title { text-align: center; font-size: 3rem; color: #fff; margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--river); font-size: 1.15rem; margin-bottom: 60px; }

/* CARDS */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; margin-bottom: 90px; }
.flip-card { height: 230px; perspective: 1000px; cursor: pointer; }
.flip-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s; 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: 25px; text-align: center; box-shadow: var(--shadow); border: 1px solid rgba(70,130,180,0.2); }
.flip-front { background: #1e1e1e; }
.flip-front .card-icon { font-size: 3.5rem; margin-bottom: 10px; }
.flip-front .card-title { color: var(--river); font-size: 1.1rem; font-weight: 800; }
.flip-back { background: var(--forest); transform: rotateY(180deg); }
.flip-back p { font-size: 1.05rem; line-height: 1.5; color: #fff; }

/* TIMELINE */
.timeline-wrap { margin-bottom: 90px; }
.timeline-title { text-align: center; font-size: 2rem; color: var(--river); margin-bottom: 50px; }
.timeline { position: relative; max-width: 850px; margin: 0 auto; padding-left: 50px; border-left: 3px solid var(--river); }
.tl-item { position: relative; margin-bottom: 40px; opacity: 0; transform: translateX(-20px); transition: 0.6s; }
.tl-item.visible { opacity: 1; transform: translateX(0); }
.tl-dot { position: absolute; left: -61px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 15px var(--gold); }
.tl-year { font-weight: 800; color: var(--river); font-size: 1.1rem; }
.tl-text { font-size: 1.1rem; margin-top: 5px; color: var(--cream); line-height: 1.6; }

/* MAP + FACTS */
.map-fact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 850px) { .map-fact { grid-template-columns: 1fr; } }
.fun-facts-box { background: #1e1e1e; border-radius: var(--radius); padding: 35px; border: 1px solid rgba(70,130,180,0.2); }
.fun-list li { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 15px; font-size: 1.05rem; color: var(--cream); opacity: 0; transform: translateX(20px); transition: 0.5s; }
.fun-list li.visible { opacity: 1; transform: translateX(0); }

/* QUIZ */
.quiz-section { padding: 100px 0; background: var(--dark); }
.quiz-card { max-width: 800px; margin: 0 auto; background: var(--dark2); padding: 50px; border-radius: 25px; box-shadow: var(--shadow); }
.quiz-progress-bar { width: 100%; height: 8px; background: #333; border-radius: 4px; margin-bottom: 25px; overflow: hidden; }
#quizProgressFill { height: 100%; background: var(--river); width: 0; transition: width 0.4s; }
.quiz-opt { width: 100%; background: #2a2a2a; border: 1px solid #444; padding: 15px; text-align: left; border-radius: 12px; color: #fff; cursor: pointer; margin-bottom: 10px; transition: 0.2s; font-size: 1.05rem; }
.quiz-opt:hover { background: #3a3a3a; border-color: var(--river); }
.quiz-opt.correct { background: rgba(46, 204, 113, 0.2); border-color: #2ecc71; }
.quiz-opt.wrong { background: rgba(231, 76, 60, 0.2); border-color: #e74c3c; }

/* DIPLOMA */
.diploma-section { padding: 100px 0; text-align: center; background: var(--dark2); }
.diploma-input { padding: 14px 28px; border-radius: 50px; border: 2px solid var(--river); background: #222; color: #fff; width: 320px; outline: none; margin-bottom: 20px; }
#diplomaCanvas { max-width: 100%; height: auto; border-radius: 15px; box-shadow: var(--shadow); }

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