/* ==========================================================================
   Spálené Traily a Okruhy - redesign
   Vlastní CSS bez závislosti na Bootstrapu/jQuery/Font Awesome.
   ========================================================================== */

:root {
  --bg: #faf8f3;
  --ink: #1c231b;
  --ink-soft: #4a5246;
  --paper: #ffffff;
  --brand: #2f5233;
  --brand-dark: #203a24;
  --accent: #c1442d;
  --accent-dark: #9c3521;
  --line: #e4ddcf;
  --dark-bg: #1b241a;
  --dark-ink: #ece7db;
  --dark-line: #34402f;

  --difficulty-easy: #4c9a52;
  --difficulty-medium: #d98c2b;
  --difficulty-medium-hard: #c96a1f;
  --difficulty-hard: #c1362b;
  --difficulty-ultra: #1c1c1c;

  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --nav-height: 68px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
}

section, aside {
  scroll-margin-top: var(--nav-height);
}

/* ---------- Navigace ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(250, 248, 243, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--brand-dark);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  display: block;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

@media (max-width: 780px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .nav-links.open {
    max-height: 400px;
  }

  .nav-links li {
    border-top: 1px solid var(--line);
  }

  .nav-links a {
    display: block;
    padding: 14px 24px;
  }
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 40px) 24px 60px;
  background:
    linear-gradient(rgba(15, 22, 12, 0.55), rgba(15, 22, 12, 0.55)),
    url("../img/header.jpg") center/cover no-repeat;
  color: #fff;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin-bottom: 12px;
}

.hero p {
  font-size: 1.05rem;
  opacity: 0.9;
  margin: 0 0 28px;
  letter-spacing: 0.04em;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Tlačítka ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 4px;
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-dark);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-brand {
  background: var(--brand);
  color: #fff;
}

.btn-brand:hover {
  background: var(--brand-dark);
}

/* ---------- Obecné sekce ---------- */

.section {
  padding: 90px 0;
}

.section-alt {
  background: #f1ede2;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  color: var(--brand-dark);
}

.section-head .kicker {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-head p {
  color: var(--ink-soft);
  margin: 14px 0 0;
}

.section-head hr {
  width: 60px;
  height: 3px;
  border: none;
  background: var(--accent);
  margin: 16px auto 0;
}

/* ---------- Legenda obtížnosti ---------- */

.legend {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.dot-red { background: var(--difficulty-hard); }
.dot-black { background: var(--difficulty-ultra); }

/* ---------- Traily grid ---------- */

.trail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.trail-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.trail-card:hover {
  box-shadow: 0 10px 24px rgba(28, 35, 27, 0.08);
  transform: translateY(-3px);
}

.trail-card .icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  color: var(--brand);
}

.trail-card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--ink);
}

.trail-card .length {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0 0 10px;
}

/* ---------- Mapa ---------- */

.map-frame {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 24px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.map-cta {
  text-align: center;
}

/* ---------- Proč jezdit (feature grid) ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.feature {
  text-align: center;
}

.feature .icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  color: var(--accent);
}

.feature h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--ink);
}

.feature p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Okruhy galerie ---------- */

.circuit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.circuit-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  cursor: pointer;
}

.circuit-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.circuit-card:hover img {
  transform: scale(1.05);
}

.circuit-body {
  padding: 18px 18px 20px;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.badge-easy { background: var(--difficulty-easy); }
.badge-medium { background: var(--difficulty-medium); }
.badge-medium-hard { background: var(--difficulty-medium-hard); }
.badge-hard { background: var(--difficulty-hard); }
.badge-ultra { background: var(--difficulty-ultra); }

.circuit-meta {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.circuit-body h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}

.circuit-body p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 9, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  z-index: 200;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-content {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.lightbox-content img {
  max-height: 70vh;
  margin: 0 auto 16px;
  border-radius: 8px;
}

.lightbox-caption {
  color: #ece7db;
}

.lightbox-caption h3 {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.lightbox-caption p {
  color: #c8c2b2;
  font-size: 0.9rem;
  max-width: 640px;
  margin: 0 auto;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Provozní řád ---------- */

.rules {
  background: var(--dark-bg);
  color: var(--dark-ink);
  padding: 90px 0;
}

.rules .section-head h2 {
  color: #fff;
}

.rules-content {
  max-width: 760px;
  margin: 0 auto;
  font-size: 0.95rem;
}

.rules-content p {
  margin: 0 0 16px;
  color: #cfcabb;
}

.rules-content b {
  color: #fff;
}

.rules-content .warning {
  background: rgba(193, 68, 45, 0.15);
  border: 1px solid rgba(193, 68, 45, 0.4);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.rules-content .warning p {
  color: #f0d9d2;
  margin: 0;
}

.rules-content ol {
  color: #cfcabb;
  padding-left: 20px;
}

.rules-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 36px;
}

/* ---------- Kontakt / footer ---------- */

.contact {
  padding: 80px 0 40px;
  text-align: center;
}

.contact p.lead {
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 auto 8px;
}

footer.site-footer {
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

/* ---------- Utility ---------- */

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
