/* ===== CZ Roads – Main Stylesheet ===== */
:root {
  --primary: #5c3d8f;
  --secondary: #f4f0fb;
  --accent: #7c5bbf;
  --text: #1a1a1a;
  --text-muted: #555;
  --border: #e0e0e0;
  --card-bg: #ffffff;
  --body-bg: #f4f0fb;
  --nav-bg: #5c3d8f;
  --nav-text: #ffffff;
  --footer-bg: #1a1a1a;
  --footer-text: #cccccc;
  --link: #5c3d8f;
  --link-hover: #7c5bbf;
  --btn-bg: #5c3d8f;
  --btn-text: #ffffff;
  --info-box-bg: #f4f0fb;
  --info-box-border: #5c3d8f;
  --disclaimer-bg: #fff8e1;
  --disclaimer-border: #f0b429;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8e8e8;
    --text-muted: #aaa;
    --border: #333;
    --card-bg: #2e1848;
    --body-bg: #1e1030;
    --nav-bg: #1e1030;
    --footer-bg: #0a0a0a;
    --footer-text: #aaaaaa;
    --link: #7dc8f0;
    --link-hover: #a0d8f8;
    --info-box-bg: #2e1848;
    --info-box-border: #7c5bbf;
    --disclaimer-bg: #2a2000;
    --disclaimer-border: #8a6000;
  }
}
.dark-mode {
  --text: #e8e8e8;
  --text-muted: #aaa;
  --border: #333;
  --card-bg: #2e1848;
  --body-bg: #1e1030;
  --nav-bg: #1e1030;
  --footer-bg: #0a0a0a;
  --footer-text: #aaaaaa;
  --link: #7dc8f0;
  --link-hover: #a0d8f8;
  --info-box-bg: #2e1848;
  --info-box-border: #7c5bbf;
  --disclaimer-bg: #2a2000;
  --disclaimer-border: #8a6000;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── Navigation ── */
.site-header {
  background: var(--nav-bg);
  color: var(--nav-text);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1.5rem;
}
.site-logo { font-size: 1.5rem; font-weight: 800; color: #fff; text-decoration: none; }
.site-logo span { opacity: .7; font-weight: 400; font-size: 1rem; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { color: rgba(255,255,255,.85); font-size: .95rem; transition: color .2s; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: #fff; margin: 5px 0; transition: .3s;
}
.theme-btn {
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
  color: #fff; padding: .35rem .75rem; border-radius: 20px;
  cursor: pointer; font-size: .85rem; transition: background .2s;
}
.theme-btn:hover { background: rgba(255,255,255,.25); }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #5c3d8f 0%, #7c5bbf 100%);
  color: #fff; padding: 5rem 1.5rem 4rem; text-align: center;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; margin-bottom: 1rem; }
.hero p { font-size: 1.15rem; opacity: .9; max-width: 600px; margin: 0 auto 1.5rem; }
.hero-disclaimer {
  display: inline-block; background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.3); border-radius: 8px;
  padding: .6rem 1.2rem; font-size: .85rem; margin-bottom: 2rem;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: .75rem 1.75rem; border-radius: 8px;
  font-weight: 600; font-size: 1rem; cursor: pointer; transition: transform .15s, box-shadow .15s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.2); text-decoration: none; }
.btn-primary { background: #fff; color: #5c3d8f; }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 3rem 0; }
.section-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 2rem; color: var(--text); }
.section-title::after {
  content: ''; display: block; width: 60px; height: 4px;
  background: var(--primary); margin-top: .5rem; border-radius: 2px;
}

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem; transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.1); transform: translateY(-3px); }
.card h3 { font-size: 1.1rem; margin-bottom: .75rem; color: var(--text); }
.card p { color: var(--text-muted); font-size: .95rem; margin-bottom: 1rem; }
.card-link { color: var(--primary); font-weight: 600; font-size: .9rem; }

/* ── Article ── */
.article-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; padding: 2rem 0; }
@media (max-width: 900px) { .article-wrap { grid-template-columns: 1fr; } }
.article-content { background: var(--card-bg); border-radius: 12px; padding: 2rem; }
.article-header { margin-bottom: 2rem; }
.article-content h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: .75rem; }
.article-meta { color: var(--text-muted); font-size: .9rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.article-intro { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 2px solid var(--border); }
.article-content h2 { font-size: 1.5rem; margin: 2rem 0 1rem; color: var(--text); }
.article-content h3 { font-size: 1.2rem; margin: 1.5rem 0 .75rem; color: var(--text); }
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { margin: 1rem 0 1rem 1.5rem; }
.article-content li { margin-bottom: .5rem; }
.toc { background: var(--secondary); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; margin-bottom: 2rem; }
.toc h2 { font-size: 1rem; margin-bottom: .75rem; }
.toc ol { margin-left: 1.25rem; }
.toc li { margin-bottom: .4rem; font-size: .95rem; }
.info-box {
  background: var(--info-box-bg); border-left: 4px solid var(--info-box-border);
  border-radius: 0 8px 8px 0; padding: 1rem 1.25rem; margin: 1.5rem 0;
  font-style: normal;
}
.article-disclaimer {
  background: var(--disclaimer-bg); border: 1px solid var(--disclaimer-border);
  border-radius: 8px; padding: 1rem 1.25rem; margin-top: 2rem; font-size: .9rem;
}
.article-links { margin-top: 2rem; padding-top: 1.5rem; border-top: 2px solid var(--border); }
.article-links h3 { margin-bottom: .75rem; }
.article-links ul { list-style: none; }
.article-links li { margin-bottom: .5rem; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
caption { font-weight: 600; margin-bottom: .5rem; text-align: left; color: var(--text-muted); }
th { background: var(--primary); color: #fff; padding: .75rem 1rem; text-align: left; }
td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); }
tr:nth-child(even) td { background: var(--secondary); }

/* ── Breadcrumb ── */
.breadcrumb { font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; }
.breadcrumb li:not(:last-child)::after { content: ' /'; margin-left: .25rem; }

/* ── Sidebar ── */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-widget { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.sidebar-widget h3 { font-size: 1rem; margin-bottom: 1rem; color: var(--primary); }
.sidebar-widget ul { list-style: none; }
.sidebar-widget li { margin-bottom: .6rem; font-size: .9rem; }
.important-notice {
  background: var(--disclaimer-bg); border: 2px solid var(--disclaimer-border);
  border-radius: 12px; padding: 1.25rem;
}
.important-notice h3 { color: #8a5000; margin-bottom: .75rem; }

/* ── Hub pages ── */
.hub-intro { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 700px; }
.article-list { list-style: none; }
.article-list li { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.article-list li:last-child { border-bottom: none; }
.article-list a { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.article-list a:hover { color: var(--primary); }
.article-list .meta { font-size: .85rem; color: var(--text-muted); margin-top: .25rem; }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .95rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: .65rem 1rem; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card-bg); color: var(--text);
  font-size: 1rem; font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-submit {
  background: var(--primary); color: #fff; border: none;
  padding: .75rem 2rem; border-radius: 8px; font-size: 1rem;
  font-weight: 600; cursor: pointer; transition: background .2s;
}
.form-submit:hover { background: var(--accent); }

/* ── Cookie banner ── */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  background: #1a1a1a; color: #eee; padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  box-shadow: 0 -2px 12px rgba(0,0,0,.4);
}
#cookie-banner p { font-size: .9rem; flex: 1; min-width: 200px; }
#cookie-banner a { color: #7dc8f0; }
.cookie-btns { display: flex; gap: .75rem; flex-wrap: wrap; }
.cookie-btn {
  padding: .5rem 1.25rem; border-radius: 6px; font-size: .9rem;
  cursor: pointer; border: none; font-weight: 600;
}
.cookie-accept { background: var(--primary); color: #fff; }
.cookie-reject { background: #444; color: #eee; }

/* ── Footer ── */
.site-footer {
  background: var(--footer-bg); color: var(--footer-text);
  padding: 3rem 0 1.5rem; margin-top: 4rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: #fff; margin-bottom: 1rem; font-size: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .5rem; font-size: .9rem; }
.footer-col a { color: var(--footer-text); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #333; padding-top: 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: .85rem;
}
.footer-disclaimer { font-size: .8rem; color: #888; margin-top: .5rem; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--nav-bg); padding: 1rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  table { font-size: .85rem; }
  th, td { padding: .5rem .6rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
