*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Overpass', system-ui, sans-serif; color: #1e0a00; background: #fff; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid #ffd700; outline-offset: 3px; border-radius: 3px; }
::selection { background: #ffd700; color: #1e0a00; }

:root {
  --gold: #ffd700; --red: #e11e0f; --red-dark: #b81609;
  --dark: #1e0a00; --gray: #717171; --cream: #fafaf9;
  --border: #f0ece8;
}

.skip-link {
  position: fixed; top: 0; left: 0; z-index: 9999;
  padding: 10px 18px; font-size: 17px; font-weight: 700;
  background: var(--gold); color: var(--dark);
  border-bottom-right-radius: 8px;
  transform: translateY(-100%); transition: transform .2s;
}
.skip-link:focus { transform: translateY(0); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
.section-pad { padding: 56px 0; }
@media (min-width: 768px) { .section-pad { padding: 72px 0; } }

/* Hero */
.subpage-hero {
  padding-top: 60px;
  padding-bottom: 56px;
  background: var(--accent-light, #fafaf9);
  border-bottom: 1px solid var(--border);
}
.subpage-hero-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; margin-bottom: 16px;
}
.subpage-tag {
  font-size: 15px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; color: var(--red); margin-bottom: 10px;
}
.subpage-h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900; letter-spacing: -.03em;
  color: var(--dark); line-height: 1.05; margin-bottom: 16px;
}
.subpage-perex {
  font-size: 20px; line-height: 1.75; color: var(--gray); max-width: 1080px;
  margin-bottom: 16px;
}
.subpage-perex:last-child { margin-bottom: 0; }

/* Steps grid */
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-bottom: 40px;
}
@media (max-width: 700px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card {
  background: #fff; border: 0.5px solid var(--border);
  border-radius: 20px; padding: 20px;
}
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 900; margin-bottom: 12px;
}
.step-card h2 { font-size: 19px; font-weight: 800; margin-bottom: 8px; letter-spacing: -.01em; }
.step-card p { font-size: 17px; line-height: 1.65; color: var(--gray); }

/* Content blocks */
.content-block { margin-bottom: 40px; }
.content-block h2 {
  font-size: 24px; font-weight: 900; letter-spacing: -.02em;
  margin-bottom: 12px;
}
.content-block p { font-size: 18px; line-height: 1.75; color: var(--gray); margin-bottom: 10px; }
.section-sub-h2 {
  font-size: 18px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(30,10,0,.4); margin-bottom: 12px;
}

/* List */
.list-steps { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.list-steps li {
  font-size: 18px; line-height: 1.65; color: var(--gray);
  padding-left: 20px; position: relative;
}
.list-steps li::before {
  content: "→"; position: absolute; left: 0;
  color: var(--red); font-weight: 700;
}
.list-steps li strong { color: var(--dark); }

/* Tip box */
.tip-box {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fffbf2; border: 1px solid #f5e066;
  border-radius: 14px; padding: 16px; margin-bottom: 40px;
}
.tip-box i { font-size: 26px; color: #c9a800; flex-shrink: 0; margin-top: 2px; }
.tip-box strong { display: block; font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.tip-box p { font-size: 17px; line-height: 1.6; color: var(--gray); }
.tip-box a { color: var(--red); font-weight: 700; }

/* Quote card */
.quote-card {
  border: 2px solid; border-radius: 20px;
  padding: 24px; margin-bottom: 40px;
}
.quote-mark { font-size: 44px; font-weight: 900; line-height: 1; color: rgba(30,10,0,.12); margin-bottom: 6px; }
.quote-text { font-size: 19px; line-height: 1.7; font-weight: 600; color: var(--dark); margin-bottom: 10px; }
.quote-author { font-size: 16px; color: var(--gray); font-weight: 600; }

/* Downloads */
.dl-grid-sub {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
@media (max-width: 600px) { .dl-grid-sub { grid-template-columns: repeat(2, 1fr); } }
.template-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 480px; }
.dl-card { background: #fff; border: 0.5px solid var(--border); border-radius: 14px; overflow: hidden; }
.dl-thumb { aspect-ratio: 354/280; background: var(--cream); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.dl-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.dl-info { padding: 10px; }
.dl-info strong { display: block; font-size: 16px; font-weight: 700; color: var(--dark); }
.dl-info span { font-size: 15px; color: var(--gray); display: block; margin-bottom: 8px; }
.btn-dl {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 7px; font-size: 15px; font-weight: 700;
  border: 0.5px solid var(--border); border-radius: 8px;
  background: var(--cream); color: var(--dark); text-decoration: none;
  transition: background .15s, color .15s;
}
.btn-dl:hover { background: var(--dark); color: #fff; border-color: var(--dark); }

/* CTA button */
.btn-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 800; padding: 12px 22px;
  border-radius: 999px; text-decoration: none;
  transition: transform .2s, filter .15s; margin-top: 12px;
}
.btn-cta:hover { transform: scale(1.04); filter: brightness(.95); }

/* Footer */
.subpage-footer {
  background: var(--gold); border-top: 2px solid rgba(30,10,0,.1); padding: 20px 0;
}
.footer-row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px;
}
.footer-home {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 17px; font-weight: 700; color: var(--dark);
  text-decoration: none; transition: opacity .15s;
}
.footer-home:hover { opacity: .7; }
.other-pages { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.other-pages span { font-size: 16px; color: rgba(30,10,0,.45); font-weight: 600; }
.other-pages a { font-size: 16px; font-weight: 700; color: var(--dark); text-decoration: none; }
.other-pages a:hover { text-decoration: underline; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 80ms; }
.reveal-d2 { transition-delay: 160ms; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ── Video sekce (studenti) ── */
.video-sekce { margin-bottom: 40px; }
.video-sekce h2 { font-size: 24px; font-weight: 900; letter-spacing: -.02em; margin-bottom: 8px; }
.video-perex { font-size: 18px; line-height: 1.75; color: #717171; margin-bottom: 16px; }
.video-wrap { border-radius: 16px; overflow: hidden; background: #0f0f0f; }
.video-wrap iframe { width: 100%; aspect-ratio: 16/9; border: none; display: block; }
.video-placeholder {
  aspect-ratio: 16/9; background: #1a1a2e;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px; border: 2px dashed #bdc8ff;
}
.video-ph-inner { text-align: center; padding: 24px; }
.video-ph-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(189,200,255,.2); border: 2px solid #bdc8ff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #bdc8ff; margin: 0 auto 12px;
}
.video-ph-title { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.video-ph-sub { font-size: 16px; color: rgba(255,255,255,.45); line-height: 1.6; }
.video-ph-sub code { background: rgba(255,255,255,.1); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 15px; }
.video-note {
  display: flex; align-items: center; gap: 6px;
  font-size: 16px; color: #717171; margin-top: 10px;
}
.video-note i { font-size: 18px; flex-shrink: 0; }
.video-note a { color: #e11e0f; font-weight: 700; }

/* ── Pohádka ilustrace (deti) ── */
.pohadka-ilustrace { margin: 0 0 24px; }

/* ── Tlačítko stažení pohádky ── */
.btn-dl-pohadka {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 14px;
  font-size: 18px; font-weight: 800; color: #fff;
  background: #e11e0f; padding: 12px 22px; border-radius: 999px;
  text-decoration: none; transition: background .15s, transform .15s;
  border: none;
}
.btn-dl-pohadka:hover { background: #b81609; transform: scale(1.04); }
.btn-dl-pohadka i { font-size: 22px; }

/* ── Footer (stejný jako homepage) ── */
.container-sub { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
footer { background: var(--gold); border-top: 2px solid rgba(30,10,0,.1); }
.footer-main { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 28px 0; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 42px; height: 42px; object-fit: contain; }
.footer-brand-name { font-size: 17px; font-weight: 900; color: var(--dark); display: block; }
.footer-brand-link { font-size: 15px; font-weight: 700; color: rgba(30,10,0,.5); text-decoration: none; }
.footer-brand-link:hover { color: var(--dark); }
.footer-social { display: flex; align-items: center; gap: 8px; }
.footer-social span { font-size: 15px; font-weight: 700; color: rgba(30,10,0,.45); margin-right: 4px; }
.social-btn { width: 32px; height: 32px; border-radius: 50%; background: rgba(30,10,0,.1); color: var(--dark); display: flex; align-items: center; justify-content: center; font-size: 19px; text-decoration: none; transition: background .15s, color .15s; }
.social-btn:hover { background: var(--dark); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(30,10,0,.1); display: flex; justify-content: space-between; align-items: center; padding: 14px 0; flex-wrap: wrap; gap: 8px; }
.footer-bottom p, .footer-bottom a { font-size: 15px; color: rgba(30,10,0,.35); text-decoration: none; }
.footer-bottom a:hover { color: var(--dark); }
.footer-legal { display: flex; gap: 16px; }

/* ── Zpět tlačítko nahoře ── */
.back-bar { background: var(--gold); padding: 14px 0; border-bottom: 1px solid rgba(30,10,0,.1); }
.btn-back-home {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 17px; font-weight: 700; color: var(--dark);
  text-decoration: none; transition: opacity .15s;
}
.btn-back-home:hover { opacity: .7; }
.btn-back-home i { font-size: 19px; }

/* ── Audio přehrávač ── */
.audio-player-wrap {
  text-align: center;
}
.audio-label {
  font-size: 18px; font-weight: 700; color: #1e0a00;
  margin-bottom: 8px; display: flex; align-items: center;
  justify-content: center; gap: 6px;
}
.audio-player {
  width: 100%; max-width: 400px;
  border-radius: 999px; outline: none;
  accent-color: #e11e0f;
}
.audio-note {
  font-size: 16px; color: #717171; margin-top: 6px;
  font-style: italic;
}

/* ── Social gallery (firmy, socialni-site) ── */
.social-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.social-slot {
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
  border: 2px dashed #ffd700;
  background: #fffef5;
}
.social-slot img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  border-radius: 10px;
}
.social-slot-inner {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; color: #c8a020;
}
.social-slot-inner i { font-size: 30px; opacity: .6; }
.social-slot-inner p { font-size: 13px; font-weight: 700; color: #c8a020; opacity: .7; }

/* ── Kontakt grid ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 720px;
}

/* ── MOBILE OPRAVY podstránky (max 480px) ── */
@media (max-width: 480px) {
  .contact-grid { grid-template-columns: 1fr; max-width: 100%; }
  .container, .container-sub { padding: 0 16px; }

  /* Hero banner */
  .subpage-hero { padding-top: 36px; padding-bottom: 36px; }
  .subpage-h1 { font-size: clamp(1.4rem, 7vw, 2rem); }
  .subpage-perex { font-size: 17px; }

  /* Pracovní listy — 3 sloupce na mobilu jsou moc, dej 2 */
  .dl-grid-sub { grid-template-columns: repeat(2, 1fr) !important; }

  /* Galerie fotek */
  .social-gallery { grid-template-columns: repeat(2, 1fr); max-width: 100%; }

  /* Template skupiny */
  .template-variants { gap: 6px; }
  .template-variant { width: 80px; }
  .template-preview { flex-direction: column; }
  .template-preview img { width: 100%; max-width: 160px; margin: 0 auto; }

  /* Video */
  .video-wrap { max-width: 100% !important; }

  /* Šablony grid */
  .template-grid-wide { grid-template-columns: repeat(2, 1fr) !important; }

  /* Section padding */
  .section-pad { padding: 40px 0; }
  .content-block { margin-bottom: 24px; }

  /* Buttons */
  .btn-dl { font-size: 14px; padding: 6px 10px; }
  .btn-dl-pohadka { font-size: 16px; padding: 10px 18px; }

  /* Audio */
  .audio-player { max-width: 100%; }
}
