/* =========================================================================
   1. GLOBÁLNÍ PROMĚNNÉ A TÉMATA
   ========================================================================= */
:root {
  /* Barevný systém */
  --bg-color: #f7fafc;
  --container-bg: #ffffff;
  --text-color: #2d3748;
  --text-dark: #1a202c;
  --text-muted: #718096;

  --primary-color: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #f0f9ff;
  --brand-blue: #0284c7;

  --brand-dark: #43464a;

  --color-success: #28a745;
  --color-danger: #dc2626;
  --color-warning: #f59e0b;

  --border-color: #e2e8f0;
  --border-dark: #cbd5e1;
  --table-header-bg: #edf2f7;

  /* Layout & Rozměry */
  --site-max-width: 1240px;
  --site-padding: 20px;
  --site-border-radius: 6px;
  --card-border-radius: 12px;

  /* Stíny a ohraničení */
  --site-border: 1px solid var(--primary-color);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.06);
}

/* Tmavý režim */
body.dark-mode {
  --bg-color: #121212;
  --container-bg: #1a202c;
  --text-color: #e2e8f0;
  --text-dark: #f8fafc;
  --text-muted: #a0aec0;
  --border-color: #2d3748;
  --border-dark: #4a5568;
  --table-header-bg: #2d3748;
  --primary-light: rgba(56, 189, 248, 0.1);
}

/* =========================================================================
   2. RESET A ZÁKLADNÍ TYPOGRAFIE
   ========================================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}
input[type="text"] {
  padding: 10px;
  margin: 1px 0;
  box-sizing: border-box;
  border: 1px solid var(--brand-dark);
  border-radius: var(--site-border-radius);
}
select {
  padding: 10px;
  margin: 1px 0;
  box-sizing: border-box;
  border: 1px solid var(--brand-dark);
  border-radius: var(--site-border-radius);
}

.main-container {
  max-width: var(--site-max-width);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 10px;
  margin-top: 10px;
  background: var(--container-bg);
  padding: 25px;
}
.main-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 30px 25px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: var(--shadow-lg);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 15px 0;
  width: 100%;
}

figure img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

figure figcaption {
  text-align: center;
  margin-top: 8px;
  width: 100%;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-dark);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

h1 {
  font-size: 36px;
  margin-bottom: 20px;
}
h2 {
  font-size: 28px;
  margin-bottom: 15px;
}
h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  margin-top: 40px;
}

p {
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.7;
}

strong {
  color: var(--text-dark);
  font-weight: 600;
}

ul,
ol {
  margin-bottom: 20px;
  padding-left: 20px;
}

figcaption {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 10px;
  font-weight: 500;
  text-align: center;
}



.divider {
  border: 0;
  height: 1px;
  background-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0),
    var(--border-color),
    rgba(0, 0, 0, 0)
  );
  margin: 2.5rem 0;
}
hr.divider-main {
  border: 0;
  height: 2px;
  /* Plynulý přechod z průhledné do modré a zpět */
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-color, #0284c7),
    transparent
  );
  width: 80%;
  max-width: 800px;
  margin: 60px auto; /* Zajistí dostatek vzdušného prostoru mezi sekcemi */
  opacity: 0.6;
}
hr.divider-card {
  border: 0;
  height: 1px;
  /* Plynulý přechod z průhledné do modré a zpět */
  background: var(--primary-color);
  width: 80%;
  max-width: 800px;
  margin: 30px auto; /* Zajistí dostatek vzdušného prostoru mezi sekcemi */
}
hr.divider-list {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 20px 0;
  width: 100%;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

.subtitle {
  color: var(--text-muted);
  margin-bottom: 25px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}
.grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

/* --- SEZNAMY V PATIČCE (Odrážky ») --- */
.list-main {
  list-style: none;
  padding: 0;
  margin-top: 10px;
}

.list-main li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 30px;
}

/* Modrá dvojitá šipka podle vašeho nového screenu */
.list-main li::before {
  content: "\00BB\00A0";
  position: absolute;
  left: 8px;
  top: -2px;
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: bold;
}
.list-main a:hover {
  color: var(--primary-color);
}
.zdroj {
  text-align: right;
  font-style: italic;
  font-size: small;
  margin: 5px 5px 0 0;
}

/* Druhá úroveň (vnořený seznam pod "tuto výbavu nemusí mít:") */
.list-main ul > li::before {
  content: "–"; /* Jednoduchá pomlčka */
  color: #64748b; /* Vizuálně potlačená šedá */
  font-weight: normal;
}

/* =========================================================================
   3. TLAČÍTKA A FORMULÁŘOVÉ PRVKY
   ========================================================================= */
.btn-primary {
  background: var(--primary-color);
  color: #ffffff !important;
  border: none;
  padding: 12px 24px;
  border-radius: var(--site-border-radius);
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
}
.small-container {
  text-align: center;
  max-width: 800px;
  margin: 40px auto 0px auto;
}
.small-container p {
  font-size: 18px;
  color: #334155;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 25px;
  padding-bottom: 15px;
}
.next-btn {
  font-weight: 500;
  padding: 5px 10px 5px 10px;
  background-color: var(--primary-color);
  border: 2px solid var(--border-color);
  border-radius: var(--site-border-radius);
}
.next-btn:hover {
  font-weight: 500;
  padding: 5px 10px 5px 10px;
  background-color: var(--primary-hover);
  border: 2px solid var(--border-color);
  border-radius: var(--site-border-radius);
}

.btn-secondary {
  background: var(--brand-blue);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--site-border-radius);
  cursor: pointer;
}
.btn-secondary:hover {
  background: var(--primary-hover);
}

.btn-success {
  background: var(--color-success);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--site-border-radius);
  cursor: pointer;
}

.btn-large {
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 16px 36px;
  border-radius: var(--site-border-radius);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.3);
  transition: all 0.2s ease;
}

.btn-large:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-primary-full {
  width: 100%;
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: var(--site-border-radius);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-primary-full:hover {
  background: var(--primary-hover);
}

.btn-article-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 8px;
  padding: 12px 24px;
  background-color: var(--container-bg);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 5px rgba(0, 102, 255, 0.08);
}

.btn-article-more:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.25);
}

.btn-exit {
  background: #fee2e2;
  color: var(--color-danger);
  border: 1px solid #fca5a5;
  padding: 8px 16px;
  border-radius: var(--site-border-radius);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-exit:hover {
  background: var(--color-danger);
  color: #ffffff;
}

.btn-nav,
.nav-btn {
  padding: 8px 16px;
  border-radius: var(--site-border-radius);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-dark);
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: transparent; /* DOPLNĚNO: Vyřeší bílé pozadí v tmavém režimu */
}

.btn-nav:hover,
.nav-btn:hover {
  background: var(--bg-color);
  border-color: var(--text-muted);
}

/* Inputs, Vyhledávání & Table Controls */
.search-container {
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  max-width: 400px;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--site-border-radius);
  background-color: var(--container-bg);
  color: var(--text-color);
  outline: none;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary-color);
}

.table-controls {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--container-bg);
  border: 1px solid var(--border-dark);
  border-radius: var(--site-border-radius);
  color: var(--text-color);
  font-size: 0.95rem;
  outline: none;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

.table-controls select {
  background: var(--container-bg);
  border: 1px solid var(--border-dark);
  border-radius: var(--site-border-radius);
  color: var(--text-color);
  padding: 10px 14px;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

.search-box input:focus,
.table-controls select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* =========================================================================
   4. HLAVIČKA, NAVIGACE A LOGO
   ========================================================================= */
.landing-header {
  width: 100%;
  background: var(--container-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 10px 0;
}

/* Vnitřní kontejner hlavičky se sjednocenou šířkou s footerem a obsahem */
.header-container {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* CSS Vlastní Logo - Sjednocené barvy */
.custom-css-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-family: "Orbitron", "Rajdhani", sans-serif;
  user-select: none;
  padding: 2px 0;
  transition: transform 0.2s ease;
}

.custom-css-logo:hover {
  transform: scale(1.02);
}

.logo-main-text {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
}

/* Modrá barva loga sjednocená s primární barvou učebnice (#0066ff) */
.logo-main-text .part-blue {
  color: var(--primary-color);
}

.logo-main-text .part-dark {
  color: var(--brand-dark);
}

.logo-main-text .part-cz {
  color: var(--brand-dark);
  font-size: 16px;
  margin-left: 1px;
}

.logo-road {
  width: 100%;
  height: 10px;
  background-color: var(--brand-dark);
  margin: 4px 0 0 0;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.logo-road::after {
  content: "";
  position: absolute;
  left: 0; /* OPRAVA: Přilepí začátek čáry přesně na levý okraj silnice */
  width: 100%;
  height: 2px;
  background-image: linear-gradient(90deg, #ffffff 60%, transparent 40%);
  background-size: 12px 100%;
  background-repeat: repeat-x;
  top: 4px;
}

.custom-css-logo:hover .logo-road::after {
  animation: jedouciCara 0.4s linear infinite;
}

@keyframes jedouciCara {
  from {
    background-position-x: 0px;
  }
  to {
    background-position-x: -12px;
  }
}

/* Kontejner s odkazovými položkami v hlavičce */
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px; /* Vytvoří dostatečný prostor mezi jednotlivými odkazy */
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Styly pro samotné odkazové položky */
.nav-links a {
  text-decoration: none;
  color: var(--text-muted); /* Tmavší neutrální barva textu místo celomodré */
  font-size: 15px;
  font-weight: 600;
  padding: 8px 4px;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

/* Zmodrání odkazu při najetí myší */
.nav-links a:hover {
  color: var(--primary-color);
}

/* Aktivní stránka/záložka */
.nav-links a.active {
  color: var(--primary-color);
}

/* =========================================================================
   5. DROPDOWNY A MODÁLNÍ OKNA
   ========================================================================= */
.dropdown-wrapper {
  position: relative;
  display: inline-block;
}
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 25px;
}
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  background-color: var(--container-bg);
  min-width: 220px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  padding: 8px 0;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-info {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  font-size: 13px;
}

.dropdown-info .muted {
  color: var(--text-muted);
  margin-bottom: 2px;
}

.dropdown-menu hr {
  border-top: 1px solid var(--border-color);
  margin: 6px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-color);
  font-size: 14px;
  transition: background 0.15s ease;
}

.dropdown-item:hover {
  background-color: var(--bg-color);
}

/* Modální okna */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;

  justify-content: center;
  z-index: 9999;

  align-items: flex-start !important;
  padding-top: 40px !important;
}

.modal-overlay.hidden {
  display: none;
}
.modal-overlay.active {
  display: flex !important;
}

.modal-box {
  background: var(--container-bg);
  padding: 40px;
  border-radius: var(--card-border-radius);
  width: 100%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}
.quiz-modal-box {
  max-width: 760px;
  width: 100%;
  height: auto !important; /* Výška se odvíjí přesně od obsahu */
  max-height: calc(100vh - 80px) !important; /* Nepřeteče výšku obrazovky */
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-close,
.btn-close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.btn-close-modal:hover,
.modal-close:hover {
  color: var(--color-danger);
}

.modal-box h2 {
  margin-bottom: 25px;
  text-align: center;
}

.modal-box input,
.modal-box select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--border-dark);
  border-radius: var(--site-border-radius);
  font-size: 15px;
  background: var(--container-bg);
  color: var(--text-color);
}

#feedback-text {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  background: var(--container-bg);
  color: var(--text-color);
}

/* Modál detailu autoškoly */
#modal-detail-autoskola .modal-content {
  background: var(--container-bg);
  padding: 30px;
  border-radius: var(--card-border-radius);
  width: 100%;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.detail-as-info-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 5px;
  font-size: 14.5px;
  color: var(--text-color);
}

.detail-as-info-grid label {
  font-weight: 700;
  color: var(--text-muted);
  display: inline-block;
  width: 140px;
}
/* Oprava velikosti a řádkování textarea v modálu admin úkolu */
#modal-admin-ukol textarea,
#new-ukol-popis {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 6px !important;
  margin-bottom: 15px !important;
  box-sizing: border-box !important;
  resize: vertical !important;
}

/* =========================================================================
   6. TABULKY, STRÁNKOVÁNÍ A HVĚZDIČKY (STAR-BTN), STREAK-CARD
   ========================================================================= */
.table-wrapper,
.table-responsive,
.table-responsive-card {
  width: 100%;
  overflow-x: auto;
  margin-top: 10px;
}

table,
.questions-table,
.table-autoskola {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  margin-top: 10px;
}

th {
  background-color: var(--table-header-bg);
  color: var(--text-color);
  padding: 14px 16px;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  cursor: pointer;
  user-select: none;
}

th:hover {
  color: var(--primary-color);
}

th[onclick]::after {
  content: " ↕";
  font-size: 0.8rem;
  opacity: 0.3;
  margin-left: 5px;
}

th.sort-asc::after {
  content: " ↑";
  opacity: 1;
  color: var(--primary-color);
}
th.sort-desc::after {
  content: " ↓";
  opacity: 1;
  color: var(--primary-color);
}
th.no-sort {
  cursor: default;
}
th.no-sort::after {
  content: "";
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}

tr:hover td {
  background-color: rgba(0, 102, 255, 0.03);
}

.questions-table tbody tr[id^="row-main-"]:hover {
  background-color: var(--bg-color) !important;
}

/* Tlačítko Hvězdičky (Star Button) v tabulce i kvízu */
.star-btn,
.star-icon {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--border-dark);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition:
    color 0.15s ease,
    transform 0.15s ease;
  user-select: none;
}

.star-btn:hover,
.star-icon:hover {
  color: var(--color-warning);
  transform: scale(1.2);
}

.star-btn.active,
.star-icon.active {
  color: var(--color-warning);
  text-shadow: 0 0 2px rgba(245, 158, 11, 0.4);
}

/* Stránkování */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.pagination-btn {
  background-color: var(--container-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--site-border-radius);
  cursor: pointer;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.page-info {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-buttons button {
  background: var(--container-bg);
  border: 1px solid var(--border-dark);
  color: var(--text-color);
  padding: 6px 14px;
  border-radius: var(--site-border-radius);
  font-weight: 500;
  cursor: pointer;
}

/* Badges a detaily v tabulkách */
.questions-table-wrapper {
  background: var(--container-bg);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.status-badge {
  font-weight: 600;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 4px;
  text-align: center;
  display: inline-block;
}

.status-badge.unknown {
  color: var(--text-muted);
}
.status-badge.failed,
.status-bad {
  background: #fee2e2;
  color: var(--color-danger);
}
.status-badge.mastered,
.status-good {
  background: #dcfce7;
  color: #15803d;
}
.status-neutral {
  background: var(--table-header-bg);
  color: var(--text-muted);
}

.code-badge {
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: var(--bg-color);
  color: var(--text-color);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-dark);
}

.question-detail-row {
  background-color: var(--bg-color);
}

.dropdown-detail-content {
  padding: 16px 24px;
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-color);
}

.dropdown-answers-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dropdown-answer-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: var(--container-bg);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  font-size: 0.95rem;
}

.ans-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: var(--site-border-radius);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-right: 12px;
  transition: all 0.2s ease;
}

.dropdown-answer-item.correct-answer {
  background-color: #dcfce7 !important;
  border-color: #22c55e !important;
  color: #14532d !important;
  font-weight: 600;
}

.dropdown-answer-item.correct-answer .ans-badge {
  color: #15803d;
}
/* Základní styl karty Streaku (Světlý režim) */
.streak-card {
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: var(--container-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 15px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}
.streak-card-text {
  font-size: 1rem;
  font-weight: 800;
}
.streak-card-nadpis {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Úprava pro Tmavý režim (Dark Mode) */
body.dark-mode .streak-card {
  background-color: var(--container-bg, #1a202c) !important;
  border-color: var(--border-color, #2d3748) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  color: var(--text-color, #e2e8f0);
}

/* Zajištění tmavého textu/nadpisů uvnitř karty v dark mode */
body.dark-mode .streak-card h3,
body.dark-mode .streak-card h4,
body.dark-mode .streak-card div {
  color: var(--text-dark, #f8fafc);
}
/* =========================================================================
   7. DASHBOARD, POKROK A ÚKOLNÍK
   ========================================================================= */
.dashboard-content {
  max-width: var(--site-max-width);
  margin: 40px auto;
  padding: 0 24px;
}

.progress-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.progress-card-col {
  background: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-border-radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.progress-group {
  margin-bottom: 16px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.progress-label {
  font-size: 14px;
  font-weight: 500;
}

.progress-percent {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-color);
}

.progress-bar-bg,
.bar-bg {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill,
.bar-fill {
  height: 100%;
  width: 0%;
  background-color: var(--primary-color);
  border-radius: 10px;
  transition:
    width 0.6s ease-in-out,
    background-color 0.3s ease;
}

/* Odznaky a úkoly */
.badge-card {
  background: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-border-radius);
  padding: 20px;
  width: 100%;
  transition: all 0.3s ease;
}
.badge-card .locked {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 15px 20px;
  border-radius: 12px;
}

.badge-icon {
  font-size: 40px;
  filter: grayscale(100%);
  opacity: 0.3;
  transition: all 0.3s ease;
  font-size: 2.2rem;
  line-height: 1;
  margin: 0;
}

.badge-card.unlocked {
  border-color: var(--primary-color);
  box-shadow: 0 8px 16px rgba(0, 102, 255, 0.15);
}

.badge-card.unlocked .badge-icon {
  filter: grayscale(0%);
  opacity: 1;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--site-border-radius);
  margin-bottom: 8px;
}

/* =========================================================================
   8. ONLINE UČEBNICE, TEXT-ZAKON A CHAPTER-QUIZ-CARD
   ========================================================================= */
.ucebnice-section-reset {
  padding: 0 !important;
  overflow: hidden !important;
}

/* --- OPRAVA LAYOUTU UČEBNICE (Odstranění 3. hlavního scrollbaru) --- */
.ucebnice-layout {
  display: flex;
  height: auto; /* Zrušíme pevnou výšku, obsah diktuje délku stránky */
  min-height: calc(100vh - 120px);
  border: 1px solid var(--border-color);
  border-radius: var(--card-border-radius);
  margin-top: 10px;
  align-items: flex-start; /* Důležité: zabrání levému menu natahovat se s dlouhým textem */
}

/* Obal učebnice nesmí mít zbytečné okraje, které by stránku natahovaly do výšky */
#sec-ucebnice.content-section {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* --- VIZUÁLNÍ ZJEMNĚNÍ POSUVNÍKŮ (Scrollbarů) --- */
/* Aplikujeme tenký moderní scrollbar na menu i obsah */
.ucebnice-sidebar::-webkit-scrollbar,
.ucebnice-body::-webkit-scrollbar {
  width: 6px; /* Tenký pruh místo tlustého defaultního */
}

.ucebnice-sidebar::-webkit-scrollbar-track,
.ucebnice-body::-webkit-scrollbar-track {
  background: transparent; /* Průhledné pozadí stopy */
}

.ucebnice-sidebar::-webkit-scrollbar-thumb,
.ucebnice-body::-webkit-scrollbar-thumb {
  background-color: var(--border-dark, #cbd5e1);
  border-radius: 10px;
}

.ucebnice-sidebar::-webkit-scrollbar-thumb:hover,
.ucebnice-body::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-muted, #94a3b8);
}

/* Tmavý režim pro scrollbary */
body.dark-mode .ucebnice-sidebar::-webkit-scrollbar-thumb,
body.dark-mode .ucebnice-body::-webkit-scrollbar-thumb {
  background-color: #4a5568;
}
body.dark-mode .ucebnice-sidebar::-webkit-scrollbar-thumb:hover,
body.dark-mode .ucebnice-body::-webkit-scrollbar-thumb:hover {
  background-color: #718096;
}
/* --- 1. GLOBÁLNÍ ZJEMNĚNÍ POSUVNÍKU PRO CELÝ WEB --- */
/* Tento kód přebarví a ztenčí hlavní posuvník prohlížeče na všech stránkách */
::-webkit-scrollbar {
  width: 8px; /* O chloupek širší než ty vnitřní, aby se dobře chytal myší */
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background-color: var(--border-dark, #cbd5e1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-muted, #94a3b8);
}

body.dark-mode ::-webkit-scrollbar-track {
  background: var(--bg-color);
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background-color: #4a5568;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background-color: #718096;
}

/* --- 2. UZAMČENÍ HLAVNÍHO SCROLLU V UČEBNICI --- */
/* Zabrání posouvání celé stránky, pokud je na ní rozhraní .ucebnice-layout */
@media (min-width: 769px) {
  body:has(.ucebnice-layout) {
    overflow-y: hidden;
  }
}
.ucebnice-znacky-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0;
  width: 100%;
}
/* =========================================================================
   INFORMAČNÍ DROPDOWN / ACCORDION (.info-dropdown)
   ========================================================================= */

.info-dropdown {
  background-color: var(--container-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--site-border-radius, 8px);
  margin: 12px 0;
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.info-dropdown:hover {
  border-color: var(--border-dark, #cbd5e1);
}

.info-dropdown[open] {
  border-color: var(--primary-color, #0284c7);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.05));
}

/* Hlavička / Tlačítko pro rozbalení */
.info-dropdown summary {
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color, #0284c7);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background-color: var(--bg-color, #f7fafc);
  transition: background-color 0.2s ease;
}

.info-dropdown summary::-webkit-details-marker {
  display: none; /* Skryje výchozí šipku v Safari/Chrome */
}

.info-dropdown summary:hover {
  background-color: var(--primary-light, #f0f9ff);
}

/* Vlastní ikona šipky */
.info-dropdown summary::after {
  content: "▼";
  font-size: 0.75rem;
  color: var(--text-muted, #718096);
  transition: transform 0.2s ease;
}

.info-dropdown[open] summary::after {
  transform: rotate(180deg);
  color: var(--primary-color, #0284c7);
}

/* Rozbalený obsah */
.info-dropdown .dropdown-content,
.info-dropdown div:not(summary) {
  padding: 12px 14px;
  text-align: left;
  font-size: 0.88rem;
  color: var(--text-color, #2d3748);
  line-height: 1.5;

  background-color: var(--container-bg, #ffffff);
}

.info-dropdown p {
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.info-dropdown p:last-child {
  margin-bottom: 0;
}

/* Tmavý režim (Dark Mode) */
body.dark-mode .info-dropdown {
  background-color: var(--container-bg, #1a202c);
  border-color: var(--border-color, #2d3748);
}

body.dark-mode .info-dropdown summary {
  background-color: #2d3748;
  color: #38bdf8;
}

body.dark-mode .info-dropdown summary:hover {
  background-color: rgba(56, 189, 248, 0.15);
}

body.dark-mode .info-dropdown .dropdown-content,
body.dark-mode .info-dropdown div:not(summary) {
  background-color: var(--container-bg, #1a202c);
  border-top-color: var(--border-color, #2d3748);
  color: var(--text-color, #e2e8f0);
}
/* 2. Levé menu se přilepí pod hlavičku */
.ucebnice-sidebar {
  position: sticky; /* Zafixuje prvek při scrollování */
  height: fit-content;
  overflow-y: auto;
  width: 280px;
  border-right: 1px solid var(--border-color);
  padding: 15px;
  background: var(--container-bg);
}

.ucebnice-body {
  flex: 1;
  height: auto;
  overflow-y: visible; /* Už žádný vlastní scrollbar */
  padding: 15px;
  background: var(--container-bg);
}

.ucebnice-card figure {
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ucebnice-card figcaption {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 10px;
  font-weight: 500;
  text-align: center;
  max-width: 250px;
}

.kapitola-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px;
  font-weight: bold;
  font-size: 15px;
  color: var(--text-dark);
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
}

.podkapitola-item {
  padding: 8px 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
}

.podkapitola-item:hover,
.podkapitola-item.active {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

/* Výklad zákona v učebnici */
.text-zakon {
  background-color: var(--bg-color);
  padding: 16px;
  margin-bottom: 15px;
  margin-top: 40px;
  border-left: 4px solid var(--color-success);
  text-align: justify;
  border-radius: 0 6px 6px 0;
}

.law-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary-color);
  padding: 10px 14px;
  font-size: 0.85rem;
  border-radius: var(--site-border-radius);
  margin-bottom: 16px;
}

/* Kvízová karta kapitoly */
.chapter-quiz-card {
  background-color: var(--bg-color);
  border-left: 4px solid var(--primary-color);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.chapter-quiz-card h3 {
  color: var(--primary-color);
}

.quiz-start-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--site-border-radius);
  margin-bottom: 12px;
}

/* Kvízové karty v dashboardu */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin-bottom: 25px;
}

.quiz-category-card {
  background: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 85px;
}

.quiz-category-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quiz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

/* Kvízová tlačítka odpovídání */
.answer-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--container-bg);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-color);
  text-align: left;
  font-size: 0.95rem;
  cursor: pointer;
  transition:
    transform 0.1s ease,
    box-shadow 0.15s ease;
  margin-bottom: 8px;
}

.answer-btn:hover {
  border-color: var(--primary-color);
  background: var(--bg-color);
}

.answer-btn.selected {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.answer-btn.correct {
  background-color: #1e7e34;
  color: var(--bg-color);
  border-color: var(--brand-dark);
}

.answer-btn.wrong {
  background-color: var(--color-danger) !important;
  color: var(--bg-color);
  border-color: var(--brand-dark);
}

/* Sloupce obsahu v lekcích */
.sloupce-2,
.sloupce-3 {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0;
  width: 100%;
}

.sloupce-2 {
  grid-template-columns: repeat(2, 1fr);
}
.sloupce-3 {
  grid-template-columns: repeat(3, 1fr);
}

.sloupce-2 img,
.sloupce-3 img {
  cursor: zoom-in;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
  max-width: 250px;
  object-fit: contain;
}

.sloupce-2 img:hover,
.sloupce-3 img:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* YouTube Video Kontejner */
.youtube-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #000000;
  border: 1px solid var(--border-color);
}

.youtube-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Ukotvení modálního okna nahoře s pevnou/stabilní výškou */
.modal-overlay#quiz-modal {
  align-items: flex-start !important;
  padding-top: 40px !important;
}
/* Hlavička zůstává pevně nahoře okna */
.quiz-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  padding-bottom: 12px;
  flex-shrink: 0;
}
/* Tělo s rorolovatelným obsahem při delších otázkách */
.quiz-modal-body {
    overflow-y: auto !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE/Edge */
}
.quiz-progress-text {
  font-weight: 700;
  color: #1e293b;
  font-size: 0.95rem;
}

.quiz-modal-body::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Opera */
    width: 0 !important;
}
.quiz-modal-body::-webkit-scrollbar-thumb {
  background-color: var(--border-dark, #cbd5e1);
  border-radius: 4px;
}
/* 2. Zamezení scrollbaru na samotném boxu modálu */
#test-modal .quiz-modal-box {
    overflow: hidden !important;
}

/* 3. Mírné zmenšení médií v testu, aby se obsah neprotahoval */
#question-container img,
#question-container .q-media-element {
    max-height: 200px !important; /* Původně bylo 280px */
    width: auto !important;
    margin: 8px auto !important;
    object-fit: contain !important;
}

.quiz-modal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--site-border-radius, 6px);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-dark, #cbd5e1);
  background: var(--container-bg, #ffffff);
  color: var(--text-color, #334155);
  transition: all 0.15s ease-in-out;
  user-select: none;
}

.quiz-nav-btn:hover:not(:disabled) {
  background: var(--bg-color, #f8fafc);
  border-color: var(--primary-color, #0066ff);
  color: var(--primary-color, #0066ff);
}

.quiz-nav-btn.btn-primary {
  background: var(--primary-color, #0066ff);
  color: #ffffff !important;
  border-color: var(--primary-color, #0066ff);
}

.quiz-nav-btn.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover, #0052cc);
  border-color: var(--primary-hover, #0052cc);
}

/* Tmavý režim pro navigační tlačítka kvízu */
body.dark-mode .quiz-nav-btn {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-mode .quiz-nav-btn:hover:not(:disabled) {
  background: #334155;
  border-color: #38bdf8;
  color: #38bdf8;
}

body.dark-mode .quiz-nav-btn.btn-primary {
  background: #0066ff;
  border-color: #0066ff;
  color: #ffffff !important;
}
/* =========================================================================
   9. MŘÍŽKA DOPRAVNÍCH ZNAČEK
   ========================================================================= */
.znacky-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 15px;
  margin: 20px 0;
  width: 100%;
}

.sloupec-znacka {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.sloupec-znacka:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.sloupec-znacka .img-wrap {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.sloupec-znacka img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.info-dropdown summary {
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* =========================================================================
   10. ČLÁNKY, DETAIL A SPECIÁLNÍ PRVKY
   ========================================================================= */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.article-badge {
  display: inline-block;
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--site-border-radius);
  margin-bottom: 16px;
}

.meta-info,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 28px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-perex {
  font-size: 18px;
  text-align: justify;
  line-height: 1.65;
  color: var(--text-color);
  margin-bottom: 32px;
  padding: 8px;
  border-left: 4px solid var(--primary-color);
  background-color: var(--bg-color);
}

.article-box,
.priklad-box {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 12px;
  margin: 28px 0;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
}

.article-box.info-box,
.priklad-box.info-box {
  background: var(--primary-light);
  border-color: #bfdbfe;
}

.promo-box {
  background: linear-gradient(
    135deg,
    var(--bg-color) 0%,
    var(--primary-light) 100%
  );
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 36px 0;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.06);
}

.promo-box h4 {
  margin: 0 0 8px 0;
  color: var(--text-dark);
  font-size: 18px;
  font-weight: 700;
}

.next-article-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-top: 48px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.next-article-box:hover {
  border-color: var(--border-dark);
  transform: translateY(-2px);
}

.next-article-meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-color);
  font-weight: 800;
}

/* Timeline pro AETR */
.timeline-container {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0 32px 0;
}

.timeline-row {
  display: flex;
  width: 100%;
  min-height: 52px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.timeline-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  padding: 4px;
}

.timeline-segment.jizda {
  background: #2563eb;
}
.timeline-segment.pauza {
  background: #d97706;
}
.timeline-segment.odpocinek {
  background: #16a34a;
}
.timeline-segment.odpocinek.zkraceny {
  background: #0d9488;
}

.timeline-legend {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 500;
}

.hero-video-wrapper {
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
}

.video-mockup-window {
  background: var(--container-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.video-mockup-window:hover {
  transform: translateY(-4px);
}

.mockup-header {
  background: var(--table-header-bg, #edf2f7);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.mockup-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.mockup-header .dot.red {
  background: #ff5f56;
}
.mockup-header .dot.yellow {
  background: #ffbd2e;
}
.mockup-header .dot.green {
  background: #27c93f;
}

.mockup-title {
  font-size: 0.75rem;
  color: var(--text-muted, #718096);
  margin-left: 10px;
  font-weight: 600;
}

.hero-video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

body.dark-mode .video-mockup-window {
  border-color: #2d3748;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}
body.dark-mode .mockup-header {
  background: #2d3748;
}
.section-container {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 40px 20px;
}
/* =========================================================================
   VĚDOMOSTNÍ KARTIČKY (FLASHCARDS SLIDER)
   ========================================================================= */

/* Hlavní obal slideru se šipkami */
.flashcard-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 25px 0;
  width: 100%;
}

.flashcard-slider-track-container {
  overflow: hidden;
  width: 100%;
  border-radius: var(--card-border-radius, 12px);
  padding: 5px 0; /* Rezerva pro stín kartiček */
}

/* Posuvná lišta s kartičkami */
.flashcard-slider-track {
  display: flex;
  gap: 20px;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

/* Jednotlivá kartička */
.flashcard-item {
  flex: 0 0 calc(50% - 10px);
  max-width: calc(50% - 10px);
  background-color: var(--container-bg, #ffffff);
  border: 1px solid var(--primary-color);
  border-radius: var(--card-border-radius, 12px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Hlavička kartičky (Otázka) */
.flashcard-header {
  background: var(--primary-light, #f0f9ff);
  color: var(--primary-color, #0284c7);
  padding: 16px 20px;
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--brand-blue);
}

/* Tělo kartičky (Odpovědi / Odrážky) */
.flashcard-body {
  padding: 20px;
  background-color: var(--container-bg, #ffffff);
}
/* --- OPRAVA VĚDOMOSTNÍCH KARTIČEK PRO MOBILY --- */
@media (max-width: 768px) {
  .flashcard-item {
    /* Na mobilu zabere jedna kartička celou šířku místo 50 % */
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-right: 0; /* Zabrání zbytečné mezeře, pokud ji JS nepřepočítá */
  }

  /* Mírné zmenšení textu nadpisu, aby se na mobilu lépe četl */
  .flashcard-header {
    font-size: 1.1rem;
    padding: 15px;
  }

  .flashcard-body {
    padding: 15px;
  }
}

.flashcard-list {
  margin: 0;
  padding-left: 20px;
  list-style-type: disc;
}

.flashcard-list li {
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: var(--text-color, #2d3748);
  line-height: 1.5;
}

.flashcard-list li:last-child {
  margin-bottom: 0;
}

/* Navigační šipky slideru */
.slider-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--container-bg, #ffffff);
  border: 1px solid var(--border-dark, #cbd5e1);
  color: var(--text-dark, #1a202c);
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.05));
  user-select: none;
}

.slider-arrow:hover:not(:disabled) {
  background: var(--primary-color, #0284c7);
  color: #ffffff;
  border-color: var(--primary-color, #0284c7);
  transform: scale(1.05);
}

.slider-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Tmavý režim (Dark Mode) */
body.dark-mode .flashcard-item {
  background-color: var(--container-bg, #1a202c);
  border-color: var(--border-color, #2d3748);
}

body.dark-mode .flashcard-header {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-bottom-color: #2d3748;
}

body.dark-mode .flashcard-body {
  background-color: var(--container-bg, #1a202c);
}

body.dark-mode .flashcard-list li {
  color: var(--text-color, #e2e8f0);
}

body.dark-mode .slider-arrow {
  background: #2d3748;
  border-color: #4a5568;
  color: #f8fafc;
}

body.dark-mode .slider-arrow:hover:not(:disabled) {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.section-title {
  text-align: center;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 50px;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px; /* Mezera mezi textem a obrázkem */
}

.hero-interactive-preview {
  width: 100%;
}
/* =========================================================================
   MŘÍŽKA VIDEÍ (.video-grid)
   ========================================================================= */

/* Hlavní kontejner mřížky */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
  width: 100%;
}

/* Karta videa */
.video-card {
  background-color: var(--container-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--card-border-radius, 12px);
  overflow: hidden;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.05));
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
  border-color: var(--primary-color, #0284c7);
}

/* Obal samotného přehrávače/videa (držící poměr stran 16:9) */
.video-wrapper,
.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* Poměr 16:9 */
  background-color: #000000;
  overflow: hidden;
}

.video-wrapper iframe,
.video-wrapper video,
.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* Popis / Info pod videem */
.video-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.video-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark, #1a202c);
  line-height: 1.35;
  margin: 0;
}

.video-description {
  font-size: 0.85rem;
  color: var(--text-muted, #718096);
  line-height: 1.5;
  margin: 0;
}

/* Tmavý režim (Dark Mode) */
body.dark-mode .video-card {
  background-color: var(--container-bg, #1a202c);
  border-color: var(--border-color, #2d3748);
}

body.dark-mode .video-card:hover {
  border-color: #38bdf8;
}

body.dark-mode .video-title {
  color: var(--text-dark, #f8fafc);
}

body.dark-mode .video-description {
  color: var(--text-muted, #a0aec0);
}

/* Statická mřížka čísel z index.html */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

.stat-card {
  background: var(--container-bg);
  padding: 30px 20px;
  border-radius: var(--card-border-radius);
  border: 1px solid var(--border-color);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 46px;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* Sekce partnerských autoškol */
.partners-logos-section {
  width: 100%;
}

.logos-flex {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
  padding-bottom: 50px;
}

.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 160px;
  height: 60px;
}

.logo-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.logo-item img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Ceníky */
.pricing-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  max-width: var(--site-max-width);
  margin: 0 auto;
}

/* =========================================================================
   ÚPRAVY PRO STRÁNKU CENÍKU (CENÍKOVÉ KARTY & TLAČÍTKA)
   ========================================================================= */

.price-card {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 35px 30px;
    border: 1px solid #e2e8f0;
    border-radius: var(--site-border-radius);
}

.price-card.premium {
    border: 2px solid #0284c7;
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.12);
    border-radius: var(--site-border-radius);
}

/* Štítek Nejoblíbenější */
.popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #0284c7;
    color: #ffffff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Štítek se slevou */
.lepsi-cena-badge {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* Tlačítka v ceníku přes celou šířku */
.pricing-card-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: auto; /* Přišpendlí tlačítko ke dnu karty */
    box-sizing: border-box;
}

/* 1. Tlačítko zdarma (Světlé obrysové) */
.btn-price-free {
    background: #f1f5f9;
    color: #0f172a !important;
    border: 1px solid #cbd5e1;
}

.btn-price-free:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

/* 2. Tlačítko pro studenty (Modré primární) */
.btn-price-student {
    background: #0284c7;
    color: #ffffff !important;
    border: 1px solid #0284c7;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-price-student:hover {
    background: #0369a1;
    border-color: #0369a1;
    transform: translateY(-2px);
}

/* 3. Tlačítko pro autoškoly (Tmavé elegantní) */
.btn-price-school {
    background: #0f172a;
    color: #ffffff !important;
    border: 1px solid #0f172a;
}

.btn-price-school:hover {
    background: #1e293b;
    border-color: #1e293b;
}

/* Vysvětlující text pod tlačítky */
.pricing-notice {
    font-size: 0.78rem;
    color: #64748b;
    text-align: center;
    margin: 8px 0 0 0;
    line-height: 1.3;
}
/* Ceníky - Seznam funkcí s modrými fajfkami */
.price-card ul {
  list-style: none; /* Odstraní černé výchozí tečky */
  padding: 0;
  margin: 20px 0;
}

.price-card li {
  font-size: 15px;
  color: var(--text-color);
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-card li:last-child {
  border-bottom: none;
}

/* Modrá fajfka před každým bodem */
.price-card li::before {
  content: "✓";
  color: var(--primary-color);
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}



.price {
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 25px;
}
/* =========================================================================
   PROCESNÍ SEKCE: JAK TO FUNGUJE (CENÍK)
   ========================================================================= */

.steps-process-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.step-process-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    flex: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-process-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

/* Modrý kroužek s číslem */
.step-number-badge {
    width: 44px;
    height: 44px;
    background: #e0f2fe;
    color: #0284c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 18px;
}

/* Finální krok (Zelené akcenty) */
.step-process-card.step-final {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.step-number-badge.final {
    background: #dcfce7;
    color: #15803d;
}

.step-process-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
}

.step-process-card p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.55;
}

/* Spojovací šipka mezi kartami */
.step-connector-arrow {
    font-size: 1.5rem;
    font-weight: bold;
    color: #cbd5e1;
    user-select: none;
}

/* Responzivita pro mobily (seřadí pod sebe bez šipek) */
@media (max-width: 850px) {
    .steps-process-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .step-connector-arrow {
        display: none;
    }

    .step-process-card {
        width: 100%;
    }
}
/* FAQ Accordion */
.faq-item {
  background-color: var(--container-bg);
  margin-bottom: 16px;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  padding: 24px 30px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

.faq-answer {
  padding: 0 30px 24px 30px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

/* Interaktivní náhledy (Tabs) v Hero sekci */
.preview-tabs {
  display: flex;
  gap: 8px;
  background: var(--border-color);
  padding: 6px;
  border-radius: 12px 12px 0 0;
  overflow-x: auto;
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--container-bg);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.preview-window {
  background: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: 0 0 10px 10px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  min-height: 320px;
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.preview-card {
  width: 100%;
}

.preview-grid-ucebnice {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 15px;
  align-items: flex-start;
}

.ucebnice-text h4 {
  font-size: 1.1rem;
  margin: 0 0 10px 0;
  color: var(--text-dark);
}

.ucebnice-img img {
  width: 100%;
  object-fit: cover;
}
.ucebnice-text li {
  font-size: 0.9rem;
  margin: 0 0 8px 0;
}

/* Mini tabulka v záložce Otázky */
.table-mini {
  font-size: 0.8rem;
  width: 100%;
}

.table-mini-row {
  display: grid;
  grid-template-columns: 85px 25px 70px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
  font-size: 0.78rem;
}

.table-mini-row.head {
  font-weight: bold;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
}

.table-mini-row code {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  padding: 2px 4px;
  border-radius: 4px;
  color: var(--text-color);
  font-size: 0.72rem;
}

.q-text {
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Náhled cvičného testu v landing page */
.test-preview-card {
  display: flex;
  flex-direction: column;
}

.test-mini-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.test-timer {
  color: var(--color-danger);
  font-weight: bold;
}

.test-q-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.test-q-img-wrapper {
  text-align: center;
  margin: 10px 0 14px 0;
}

.test-q-img {
  max-height: 140px;
  width: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  object-fit: cover;
}

.test-opt {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--text-color);
}

.test-opt.selected {
  border-color: var(--primary-color);
  background: var(--primary-light);
  font-weight: 600;
}

/* Náhled pokroku v landing page */
.progress-preview-card h4 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.progress-preview-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.progress-item-block .progress-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
}

.progress-item-block .bar-bg {
  height: 7px;
  background: var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.progress-item-block .bar-fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 10px;
}

/* Mini tabulka výsledků v náhledu (5. záložka) */
.table-mini-row-vysledky {
  display: grid;
  grid-template-columns: 30px 1.5fr 1fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
  font-size: 0.85rem;
}

.table-mini-row-vysledky.head {
  font-weight: bold;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
}

/* =========================================================================
   12. ADMIN A UČITELSKÁ ZÓNA
   ========================================================================= */
.admin-layout {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}

.admin-main-content {
  flex-grow: 1;
  width: 100%; /* Přidáno: zajišťuje, že obsah vždy zabere zbytek šířky displeje */
  min-width: 0; /* Opravuje chybu flexboxu, kdy tabulka mohla přesahovat mimo okno */
}

/* Sjednotí zobrazení a zarovnání ve všech podsekcích */
.admin-sub-section {
  width: 100%;
}

/* Hlavičky sekcí (Nadpis + vyhledávání/filtr vedle sebe) */
.admin-sub-section > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Zalomí hledání na mobilu dolů */
  gap: 15px;
  margin-bottom: 20px;
}

.admin-sub-section h3 {
  margin: 0; /* Odstraní výchozí horní margin, aby byl nadpis zarovnán s polem hledání */
}

.admin-sidebar {
  width: 260px;
  border-right: 1px solid var(--border-color);
  padding-right: 20px;
}

.admin-nav-item {
  display: block;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.admin-nav-item:hover,
.admin-nav-item.active {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 700;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  background-color: var(--table-header-bg);
  padding: 12px;
  border-bottom: 2px solid var(--border-color);
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

/* =========================================================================
   13. PATIČKA (FOOTER)
   ========================================================================= */
.landing-footer {
  background-color: #111827; /* Tmavě grafitová barva */
  color: #9ca3af;
  padding: 50px 0 25px 0;
  font-size: 14px;
  border-top: 3px solid var(--primary-color);
}

.footer-container {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  /* Vyladěné šířky sloupců pro optickou rovnováhu */
  grid-template-columns: 2.2fr 1fr 1.2fr 1.3fr;
  gap: 40px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-logo {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-logo .text-cz-badge {
  color: var(--primary-color);
}

.footer-about {
  line-height: 1.6;
  font-size: 13.5px;
  color: #9ca3af;
  max-width: 320px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #9ca3af;
  transition: color 0.2s ease;
  font-size: 13.5px;
}

.footer-col ul li a:hover {
  color: #ffffff;
}

/* Kontaktní seznam */
.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #e5e7eb;
}

.footer-contact-list .contact-icon {
  width: 18px;
  height: 18px;
  stroke: var(--primary-color);
  flex-shrink: 0;
}

.footer-contact-list a {
  color: #e5e7eb;
  font-weight: 500;
}

.footer-contact-list a:hover {
  color: var(--primary-color);
}

/* Spodní lišta s Copyrightem */
.footer-bottom {
  max-width: var(--site-max-width);
  margin: 40px auto 0 auto;
  padding: 20px 20px 0 20px;
  border-top: 1px solid #1f2937;
  text-align: center;
  font-size: 12.5px;
  color: #6b7280;
}

.footer-bottom p {
  margin: 0;
}
/* =========================================================================
   PROSTOR OKOLO SEKCÍ A OPRAVA VZHLEDU V TMAVÉM REŽIMU
   ========================================================================= */

/* Přidání vertikálního prostoru (horní a dolní odsazení) pro všechny sekce */
.content-section {
  padding: 5px;
}

/* =========================================================================
   14. TMAVÝ REŽIM OPRAVY (DARK MODE OVERRIDES)
   ========================================================================= */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
  color: var(--text-dark) !important;
}

body.dark-mode .landing-header {
  background-color: #0f172a !important;
  border-bottom-color: #1e293b !important;
}

body.dark-mode .main-navbar,
body.dark-mode .dropdown-menu,
body.dark-mode .modal-box,
body.dark-mode .ucebnice-body,
body.dark-mode .article-card,
body.dark-mode .next-article-box,
body.dark-mode .timeline-container,
body.dark-mode .chapter-quiz-card,
body.dark-mode .stat-card,
body.dark-mode .preview-window,
body.dark-mode #modal-detail-autoskola .modal-content {
  background-color: var(--container-bg) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
}
body.dark-mode .content-section {
  background-color: var(--container-bg) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
  padding: 5px 15px 15px 15px;
  border-radius: var(--site-border-radius);
}

body.dark-mode .ans-badge {
  background-color: rgba(56, 189, 248, 0.2) !important;
  color: #38bdf8 !important;
}

body.dark-mode .preview-tabs {
  background-color: #1e293b !important;
}

body.dark-mode .tab-btn.active {
  background-color: var(--container-bg) !important;
  color: #38bdf8 !important;
}

body.dark-mode .test-opt {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: var(--text-color) !important;
}

body.dark-mode .test-opt.selected {
  background-color: rgba(56, 189, 248, 0.15) !important;
  border-color: #38bdf8 !important;
}

body.dark-mode .ucebnice-card figcaption {
  color: var(--text-muted) !important;
}

body.dark-mode .text-zakon {
  background-color: #1e293b !important;
  color: #94a3b8 !important;
  border-left-color: #3b82f6 !important;
}

body.dark-mode .article-perex,
body.dark-mode .priklad-box {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background-color: #2d2d2d !important;
  color: #ffffff !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .admin-table th {
  background-color: #2a2a2a !important;
}

/* =========================================================================
   15. RESPONZIVITA (MEDIA QUERIES)
   ========================================================================= */
.mobile-menu-toggle,
.mobile-topics-toggle {
  display: none;
}
/* --- ZLOM PRO HLAVNÍ NAVIGACI --- */
@media (max-width: 1000px) {
  .mobile-menu-toggle {
    display: block !important;
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-dark);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--container-bg);
    flex-direction: column;
    padding: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
  }

  .nav-links.is-open,
  .nav-links.active,
  nav#main-nav-links.is-open {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}
.dashboard-content {
  max-width: var(--site-max-width);
  margin: 40px auto;
  padding: 0 10px;
}

@media (max-width: 900px) {
  .progress-dashboard-grid,
  .pricing-grid,
  .hero-container,
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .grid-3 {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 600px) {
  .ucebnice-body {
    padding: 15px;
  }
  .grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
  }
  .grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
  }
  .grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 30px;
  }
  /* --- FINÁLNÍ OPRAVA MOBILNÍHO LAYOUTU UČEBNICE --- */
  @media (max-width: 768px) {
    .ucebnice-layout,
    .admin-layout {
      display: flex !important;
      flex-direction: column !important; /* Skládá prvky pod sebe */
      height: auto !important;
      min-height: auto !important;
    }

    .mobile-topics-toggle {
      width: 100% !important;
      margin-bottom: 15px;
    }

    .ucebnice-body {
      width: 100% !important;
      overflow-y: visible !important;
    }

    /* Zrušení fixní pozice levého menu na mobilu */
    .ucebnice-sidebar {
      position: relative !important;
      top: 0 !important;
      width: 100% !important;
    }
  }

  .ucebnice-sidebar {
    width: 100% !important;
    height: auto;
    display: none;
  }

  .ucebnice-sidebar.is-active {
    display: block;
  }

  .mobile-topics-toggle {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 12px;
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .footer-container {
    grid-template-columns: 1fr;
  }

  .znacky-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Mobilní responzivita */
@media (max-width: 768px) {
  .flashcard-slider-wrapper {
    gap: 6px;
  }

  .slider-arrow {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .flashcard-header {
    padding: 12px 15px;
    font-size: 1rem;
  }

  .flashcard-body {
    padding: 15px;
  }

  .flashcard-list li {
    font-size: 0.88rem;
  }
}
/* Responzivní adaptace pro mobily */
@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .video-info {
    padding: 12px;
  }

  .video-title {
    font-size: 0.95rem;
  }

  .video-description {
    font-size: 0.82rem;
  }
}

/* =========================================================================
   COOKIE BANNER (Mód: Levý dolní roh - 1/3 šířky)
   ========================================================================= */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 100%;
  max-width: 400px; /* cca 1/3 až 1/4 obrazovky */
  background-color: var(--container-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--card-border-radius, 12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  z-index: 10000;
  padding: 20px;
  font-family: inherit;
  box-sizing: border-box;
}

.cookie-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cookie-text h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--text-dark, #1a202c);
}

.cookie-text p {
  font-size: 0.85rem;
  color: var(--text-color, #4a5568);
  margin-bottom: 0;
  line-height: 1.5;
}

.cookie-text a {
  color: var(--primary-color, #0284c7);
  text-decoration: underline;
}

/* Detailní volby */
.cookie-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--bg-color, #f7fafc);
  border-radius: var(--site-border-radius, 6px);
  border: 1px solid var(--border-color, #e2e8f0);
  font-size: 0.8rem;
}

.cookie-option label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  color: var(--text-color, #2d3748);
}

.cookie-option input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  cursor: pointer;
}

/* Tlačítka akcí navržená pro užší kartu */
.cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.btn-cookie {
  width: 100%;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--site-border-radius, 6px);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-align: center;
}

.btn-cookie-accept {
  background-color: var(--primary-color, #0284c7);
  color: #ffffff;
}

.btn-cookie-accept:hover {
  background-color: var(--primary-hover, #0369a1);
}

.btn-cookie-reject {
  background-color: var(--container-bg, #ffffff);
  color: var(--text-color, #2d3748);
  border-color: var(--border-dark, #cbd5e1);
}

.btn-cookie-reject:hover {
  background-color: var(--bg-color, #f7fafc);
}

.btn-cookie-settings {
  background: transparent;
  color: var(--text-muted, #718096);
  padding: 4px;
}

.btn-cookie-settings:hover {
  color: var(--text-dark, #1a202c);
}

/* Tmavý režim */
body.dark-mode .cookie-banner {
  background-color: #1a202c;
  border-color: #2d3748;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body.dark-mode .cookie-details {
  background-color: #121212;
  border-color: #2d3748;
}

body.dark-mode .btn-cookie-reject {
  background-color: #2d3748;
  color: #f8fafc;
  border-color: #4a5568;
}

/* =========================================================================
   KOMPLETNÍ RESPONZIVITA PRO MOBILY (max-width: 768px)
   ========================================================================= */
@media (max-width: 768px) {
  /* 1. Oprava přečnívání hlavního kontejneru */
  .hero-container {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* 2. Zmenšení nadpisu na mobilu (aby se neřezal na pravé straně) */
  .hero-text h1 {
    font-size: 1.6rem !important;
    line-height: 1.25 !important;
    word-wrap: break-word !important;
  }

  /* 3. Oprava pravé interaktivní ukázky */
  .hero-interactive-preview {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 20px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* 4. Oprava tabulky/karty uvnitř ukázky */
  .preview-window,
  .preview-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px !important;
  }

  /* 5. Vynucení přeplátování přetékajícího textu v modrém boxu citace */
  .preview-card p,
  .preview-card div,
  .preview-card span {
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* 1. Hlavní menu – zmenšení zbytečných mezer */
  .nav-menu,
  .mobile-menu {
    gap: 5px !important;
    padding: 20px 15px !important;
  }
  .nav-menu a,
  .mobile-menu a,
  .nav-link {
    font-size: 1.1rem !important;
    padding: 8px 0 !important;
  }

  /* 2. Patička (Footer) – zarovnání na střed */
  .landing-footer,
  .footer-container,
  .footer-col {
    text-align: center !important;
    align-items: center !important;
  }
  .footer-container {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }
  .footer-about {
    margin: 0 auto !important;
  }
  .footer-contact-list li {
    justify-content: center !important;
  }

  /* 3. Učebnice – zrušení dvousloupcového layoutu pro obrázky */
  .sloupce-2,
  .sloupce-3 {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  .sloupce-2 figure,
  .sloupce-3 figure {
    width: 100% !important;
    margin: 10px 0 !important;
  }
  .sloupce-2 img,
  .sloupce-3 img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* 4. Úprava hlavičky v procvičování (.quiz-modal-header) */
  .quiz-modal-header {
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: space-between !important;
  }
  .quiz-modal-header > div:last-child {
    order: 2;
  }

  /* 6. Okno modálu ostrého testu (#test-modal) */
  .modal-overlay#test-modal,
  .modal-overlay#quiz-modal {
    padding: 10px !important;
  }
  #test-modal .modal-box,
  .quiz-modal-box {
    width: 100% !important;
    max-width: 100% !important;
    padding: 15px 12px !important;
    margin: 0 !important;
    border-radius: 8px !important;
  }

  /* Mřížka čísel otázek v testu */
  #test-modal div[style*="grid-template-columns"],
  .question-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 6px !important;
  }

  /* Tlačítka a časovač v testu */
  #test-modal .quiz-modal-header {
    align-items: center !important;
  }

}
@media (max-width: 768px) {
  /* 1. Hero sekce a nadpisy na úvodní stránce */
  .hero-section,
  .landing-hero {
    padding: 30px 15px !important;
    text-align: center !important;
  }

  .hero-section h1,
  .landing-hero h1 {
    font-size: 1.8rem !important;
    line-height: 1.3 !important;
  }

  /* 2. Přepínací záložky v náhledu (Tab Preview Bar) */
  .preview-tabs,
  .tab-navigation,
  .tabs-bar {
    display: flex !important;
    overflow-x: auto !important; /* Umožní horizontální posun prstem */
    white-space: nowrap !important;
    gap: 8px !important;
    padding-bottom: 8px !important;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start !important;
  }

  .tab-btn,
  .preview-tab-btn {
    font-size: 0.8rem !important;
    padding: 6px 12px !important;
    flex-shrink: 0 !important; /* Zamezí smáčknutí tlačítek */
  }

  /* 3. Náhled karty učebnice v ukázce */
  .preview-window,
  .tab-content {
    padding: 15px 12px !important;
  }

  /* Zrušení dvousloupcového řazení v náhledu učebnice */
  .preview-window .sloupce-2,
  .preview-window div[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
  }

  .preview-window img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 10px 0 !important;
  }

  .stat-card,
  .feature-card {
    padding: 15px 10px !important;
  }

  .stat-card .stat-number,
  .stat-number {
    font-size: 2rem !important;
  }
}
/* Adaptace pro mobilní telefony (roztáhne se přes spodek) */
@media (max-width: 480px) {
  .cookie-banner {
    bottom: 0;
    left: 0;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 16px;
  }
}
/* =========================================================================
   DOPLŇKOVÁ OPRAVA MOBILNÍHO ZOBRAZENÍ (VLOŽIT NA SPODEK STYLE.CSS)
   ========================================================================= */

/* Zamezení nechtěnému vodorovnému posunu celé stránky */
html,
body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

@media (max-width: 768px) {
  /* 1. Oprava dvousloupcového Hero kontejneru na 1 sloupec pod sebe */
  .hero-container {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
  }

  .hero-text h1 {
    font-size: 1.6rem !important;
    line-height: 1.25 !important;
    text-align: center !important;
    word-break: break-word !important;
  }

  .hero-text p {
    text-align: center !important;
  }

  .hero-actions {
    display: flex !important;
    justify-content: center !important;
    margin-top: 35px;
  }
}

/* 2. Oprava přetékající interaktivní ukázky (Tabs) */
.hero-interactive-preview {
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 15px !important;
  box-sizing: border-box !important;
}

.preview-window,
.preview-card {
  width: 100% !important;
  max-width: 100% !important;
  padding: 12px !important;
  box-sizing: border-box !important;
}

.preview-card p,
.preview-card div,
.preview-card span {
  word-break: break-word !important;
  white-space: normal !important;
}

.preview-grid-ucebnice {
  grid-template-columns: 1fr !important;
}

/* 3. Oprava stlačeného a přetékajícího ceníku */
.pricing-grid {
  flex-direction: column !important;
  width: 100% !important;
  gap: 20px !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
}


/* =========================================================================
   OPRAVA ROZHRANÍ OSTRÉHO TESTU NA MOBILU (#test-modal)
   ========================================================================= */
@media (max-width: 768px) {
  /* 1. Ukotvení modálu a nastavení rorolování */
  #test-modal.modal-overlay {
    padding: 10px !important;
    align-items: flex-start !important;
  }

  #test-modal .quiz-modal-box {
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
    max-height: calc(100vh - 20px) !important;
    padding: 12px !important;
    overflow-y: auto !important; /* Plynulé skrolování celého testu */
  }

  /* 2. Přehledná hlavička (Časovač, Zodpovězeno, Ukončit) */
  #test-modal .quiz-modal-header {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 8px !important;
    align-items: center !important;
    padding-bottom: 10px !important;
  }

  /* Tlačítko ukončit */
  #finish-btn {
    grid-column: 1 / 2;
    width: fit-content !important;
    padding: 6px 10px !important;
    font-size: 0.78rem !important;
  }

  /* Časovač vpravo nahoře */
  #timer-display {
    grid-column: 2 / 3;
    font-size: 0.85rem !important;
    padding: 4px 8px !important;
  }

  /* Text Zodpovězeno přes celý spodní řádek hlavičky */
  .test-status {
    grid-column: 1 / -1;
    text-align: center !important;
    font-size: 0.8rem !important;
    margin-top: 2px;
  }

 

  /* Šipky < a > vedle mřížky čísel */
  #top-prev-btn,
  #top-next-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 1rem !important;
  }

  /* 4. Možnosti odpovědí A, B, C */
  #test-modal .answer-btn {
    padding: 10px 12px !important;
    font-size: 0.88rem !important;
    gap: 10px !important;
  }

  #test-modal .ans-badge,
  #test-modal .ans-label {
    padding: 2px 8px !important;
    font-size: 0.8rem !important;
  }
}
/* =========================================================================
   PŘEPÍNAČ ZOBRAZENÍ HESLA (TOGGLE PASSWORD)
   ========================================================================= */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  margin-bottom: 0 !important; /* Margin drží obalový div */
}

.toggle-password-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  user-select: none;
  z-index: 5;
}

.toggle-password-btn:hover {
  opacity: 1;
}

body.dark-mode .toggle-password-btn {
  filter: invert(1);
}
/* =========================================================================
   UNIVERZÁLNÍ RESPONZIVNÍ FILTRAČNÍ LIŠTA (FILTER BAR)
   ========================================================================= */
.filter-bar-responsive {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  width: 100%;
  flex-wrap: wrap; /* Na středních displejích se tlačítka zalomí pod sebe */
}

/* Sjednocený vzhled tlačítek uvnitř filtrační lišty */
.filter-bar-responsive button {
  white-space: nowrap; /* Zamezí nevzhlednému půlení textu uvnitř tlačítka */
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--site-border-radius, 6px);
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Mobilní responzivita (Obrazovky do 768px) */
@media (max-width: 768px) {
  .filter-bar-responsive {
    display: flex !important;
    flex-wrap: wrap !important; /* Na mobilu se nezalomí na 10 řádků */
    overflow-x: auto !important; /* Povolí plynulý posun prstem doprava/doleva */
    padding-bottom: 8px !important; /* Prostor pro komfortní dotyk */
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start !important;
  }

  /* Tlačítka si na mobilu zachovají svou velikost a nesmrští se */
  .filter-bar-responsive button {
    flex-shrink: 0 !important;
    font-size: 0.85rem !important;
    padding: 8px 12px !important;
  }
}
/* Posun Cookie banneru na mobilu, aby neblokoval Smartsupp chat */
@media (max-width: 480px) {
  .cookie-banner {
    bottom: 70px !important; /* Vytvoří mezeru nad chatu bublinou */
  }
}
/* =========================================================================
   NOVÉ ZÁHLAVÍ KVÍZOVÉHO MODÁLU
   ========================================================================= */
.quiz-modal-header-v2 {
  width: 100%;

}

/* Vrchní řádek s tlačítky */
.quiz-nav-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100%;
  gap: 10px;
  margin-bottom: 25px;
}

/* Červené tlačítko Ukončit */
.btn-exit-quiz {
  background: #fdf2f2;
  color: #d9534f;
  border: 1px solid #fecaca;
  padding: 8px 10px;
  border-radius: var(--site-border-radius);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-exit-quiz:hover {
  background-color: #f7bdbd;
}

/* Vodorovná čára */
.quiz-header-divider {
  border: none;
  border-top: 1px solid var(--border-color, #e2e8f0);
  width: 100%;
}
.quiz-header {
  display: flex;
  justify-content: space-between;
  margin: 10px 0 0 0;
}

/* Spodní řádek s informacemi o pořadí */
.quiz-info-row {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}
/* =========================================================================
   TŘÍSLOUPCOVÝ SPODNÍ ŘÁDEK MODÁLU (BODY | POKROK | HVĚZDIČKA)
   ========================================================================= */
.quiz-info-row-v2 {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100%;
  padding: 4px 0;
}

.quiz-info-left,
.quiz-info-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.quiz-info-left {
  justify-content: flex-start;
}

.quiz-info-right {
  justify-content: flex-end;
}

.quiz-info-center {
  flex: 2;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

/* Stylový badge pro body */
.q-points-badge {
  background-color: #f1f5f9;
  color: #475569;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Hvězdička v záhlaví */
.quiz-star-btn {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #cbd5e1;
  transition:
    transform 0.15s ease,
    color 0.15s ease;
  line-height: 1;
}

.quiz-star-btn:hover {
  transform: scale(1.15);
}

.quiz-star-btn.active {
  color: #eab308;
}
/* Sjednocený spodní text záhlaví */
.quiz-info-row-centered {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  padding: 2px 0;
}

/* Obal pro nadpis otázky + hvězdičku */
.question-header-wrapper {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 15px;
}

/* Text otázky */
.question-title-text {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: var(--text-color, #1e293b) !important;
  margin-top: 10px;
  margin-bottom: 5px;
  line-height: 1.4 !important;
  flex: 1;
}

/* Zvýrazněná hvězdička vedle otázky */
.quiz-star-btn {
  background: transparent !important;
  border: none !important;
  font-size: 1.6rem !important;
  cursor: pointer !important;
  color: #e2e8f0 !important; /* Světle šedá pro neaktivní stav */
  -webkit-text-stroke: 1.5px #94a3b8; /* Zvýrazněný tmavší obrys */
  transition: all 0.2s ease !important;
  line-height: 1 !important;
  padding: 4px !important;
  flex-shrink: 0;
}

.quiz-star-btn:hover {
  transform: scale(1.2);
  -webkit-text-stroke: 1.5px #eab308;
  color: #fef08a !important;
}

/* Aktivní uložená hvězdička (zářivě žlutá) */
.quiz-star-btn.active {
  color: #eab308 !important;
  -webkit-text-stroke: 1.5px #ca8a04 !important;
  text-shadow: 0 0 8px rgba(234, 179, 8, 0.4);
}
.quiz-info-bottom {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 0.85rem;
}
.quiz-info-bottom span {
  display: inline-block;
  background-color: #f1f5f9;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  margin-right: 8px;
  vertical-align: middle;
}

.question-star {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Styl pro kód otázky před textem */
.q-code-badge {
  display: inline-block;
  background-color: #f1f5f9;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  margin-right: 8px;
  vertical-align: middle;
}

/* Zajištění správného řádkování a zarovnání nadpisu */
.question-star h3#q-text {
  line-height: 1.5;
  color: #1e293b;
  font-weight: 700;
  margin: 10px;
}
.btn-next {
  width: 36px;
  height: 72px;
  border: none;
  background: #2563eb;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Obal pro matici otázek s šipkami */
.test-tracker-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
}

.tracker-nav-btn {
  background: #f0f9ff;
  color: #089ae8;
  border: 1px solid #bae6fd;
  font-size: 1.5rem;
  border-radius: 6px !important;
  width: 32px !important;
  height: 32px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.tracker-nav-btn:hover {
  background: #bae6fd;
  color: #ffffff;
}

/* Odznáčky na spodní liště testu */
.q-info-badge {
  background-color: #f1f5f9;
  color: #777e81;
  padding: 6px 12px;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}
/* Oprava zobrazení matice čísel (1-25) v testu */
.question-tracker {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 5px;
  max-width: 500px !important;
  margin: 0 auto !important;
}
.test-navigation {
  display: flex;
  justify-content: space-between;
  
}

/* Úprava obalu matice, aby šipky stály vedle mřížky */
.test-tracker-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 10px 0 !important;
}


/* =========================================================================
   ČISTÉ TŘÍDY NAHRAZUJÍCÍ INLINE STYLY Z JS
   ========================================================================= */

/* Zobrazení a skrytí elementů / modálů */
.hidden {
  display: none !important;
}

.visible-flex {
  display: flex !important;
}

.visible-block {
  display: block !important;
}

.visible-table-row {
  display: table-row !important;
}

/* Řádky v tabulce s reakcí na kliknutí */
.clickable-row {
  cursor: pointer;
}

/* Karta chybné otázky ve wrong-answers-modal */
.wrong-answer-card {
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--card-border-radius, 8px);
  padding: 15px;
  margin-bottom: 15px;
  background-color: var(--container-bg, #ffffff);
}

.wrong-answer-card .q-title {
  font-weight: 600;
  color: var(--text-dark, #1e293b);
  margin-bottom: 8px;
}

.wrong-answer-card img {
  max-height: 180px;
  border-radius: 6px;
  margin-bottom: 10px;
  display: block;
}

.wrong-answer-box {
  font-size: 0.9rem;
  margin-top: 6px;
  padding: 8px;
  border-left: 4px solid;
  border-radius: 4px;
}

.wrong-answer-box.user-choice {
  background-color: #fef2f2;
  border-color: var(--color-danger, #ef4444);
  color: #991b1b;
}

.wrong-answer-box.correct-choice {
  background-color: #f0fdf4;
  border-color: #22c55e;
  color: #166534;
}

/* Stavy tlačítka matice otázek (Tracker u testu) */
.q-node {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-dark, #cbd5e1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.85rem;
  background-color: var(--bg-color, #f8fafc);
  color: var(--text-dark, #1e293b);
  transition: all 0.15s ease;
}

.q-node.answered {
  background-color: #22c55e;
  color: #ffffff;
  border-color: #16a34a;
}

.q-node.current {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
}

/* Akční odkaz v tabulce (Zobrazit / Skrýt) */
.action-link.active {
  color: var(--color-danger, #ef4444);
}
/* Kontejner pro média */
#question-container {
  text-align: center;
}

/* Jednotný styl pro videa a obrázky v otázkách */
.q-media-element {
  max-width: 100% !important;
  max-height: 280px !important;
  border-radius: 8px !important;
  margin: 10px auto !important;
  display: block !important;
  object-fit: contain !important;
}
/* =========================================================================
   OPTIMALIZACE UI & UX 
   ========================================================================= */

/* Oprava dvojitého scrollbaru (Double Scrollbar) v testech */
#quiz-modal .quiz-modal-box,
#test-modal .quiz-modal-box {
  overflow: hidden !important; /* Rámeček okna se nesmí rolovat */
}
.quiz-modal-body {
  overflow-y: auto !important; /* Pouze vnitřní obsah se smí rolovat */
}

/* Toast Notifikace (Náhrada za alert()) */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  min-width: 280px;
  padding: 16px 20px;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideInRight 0.3s ease forwards;
  white-space: pre-line; /* Toto zajistí funkční odřádkování */
}
.toast.success {
  background-color: #10b981;
}
.toast.error {
  background-color: #ef4444;
}
.toast.warning {
  background-color: #f59e0b;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}
.admin-graf-kontejner {
  max-height: 300px;
}
/* =========================================================================
   AUTH TLAČÍTKA V NAVIGACI
   ========================================================================= */
.auth-buttons-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 10px;
  padding-left: 20px;
  border-left: 2px solid var(--border-color);
}

.auth-login-link {
  color: var(--text-dark);
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s ease;
}

.auth-login-link:hover {
  color: var(--primary-color);
}

.auth-register-btn {
  padding: 9px 20px;
  font-size: 15px;
  border-radius: 8px;
}

/* Úprava pro mobily a tablety */
@media (max-width: 900px) {
  .auth-buttons-group {
    flex-direction: column; /* Poskládá tlačítka pod sebe */
    align-items: stretch; /* Roztáhne je na celou šířku menu */
    margin-left: 0;
    padding-left: 0;
    border-left: none; /* Skryje svislou oddělovací čáru */
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color); /* Přidá vodorovnou čáru nahoru */
    gap: 12px;
    width: 100%;
  }

  .auth-login-link {
    text-align: center;
    padding: 8px 0;
  }

  .auth-register-btn {
    width: 100%;
    text-align: center;
  }
}
.slider-gallery-container {
  position: relative;
  max-width: var(--site-max-width, 1240px); /* Zvětšeno pro 3 obrázky */
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.slider-gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 20px;
  padding: 15px 5px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.slider-gallery-track::-webkit-scrollbar {
  display: none;
}

/* Zobrazení 3 obrázků vedle sebe na velkém monitoru */
.slider-gallery-track img {
  /* 100% šířky mínus 2x 20px mezera, to celé děleno 3 */
  flex: 0 0 calc((100% - 40px) / 3);
  width: calc((100% - 40px) / 3);
  border-radius: var(--card-border-radius, 12px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
  scroll-snap-align: center;
  border: 1px solid var(--border-color, #e2e8f0);
  object-fit: cover;
  aspect-ratio: 15 / 9;
  cursor: pointer;
}
/* Obal pro obrázek i popisek drží šířku a pozici */
.slider-gallery-item {
  flex: 0 0 calc((100% - 40px) / 3);
  width: calc((100% - 40px) / 3);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
}

/* Samotný obrázek už jen vyplňuje svůj obal */
.slider-gallery-item img {
  width: 100%;
  border-radius: var(--card-border-radius, 12px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
  border: 1px solid var(--border-color, #e2e8f0);
  object-fit: cover;
  aspect-ratio: 15 / 9;
  cursor: pointer;
}

/* Styl textu pod obrázkem */
.slider-gallery-caption {
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark, #1a202c);
  text-align: center;
  line-height: 1.4;
}

/* Responzivita pro menší obrazovky */
@media (max-width: 900px) {
  .slider-gallery-item {
    flex: 0 0 calc((100% - 20px) / 2);
    width: calc((100% - 20px) / 2);
  }
}

@media (max-width: 600px) {
  .slider-gallery-item {
    flex: 0 0 100%;
    width: 100%;
  }
}

/* Responzivita pro menší obrazovky */
@media (max-width: 900px) {
  /* Tablet: 2 obrázky vedle sebe */
  .slider-gallery-track img {
    flex: 0 0 calc((100% - 20px) / 2);
  }
}

@media (max-width: 600px) {
  /* Mobil: 1 obrázek na celou šířku */
  .slider-gallery-track img {
    width: 100%;
  }

  .slider-gallery-track {
    gap: 12px;
  }
}
.slider-gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #1a202c !important;
  font-size: 20px !important;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: all 0.2s ease;
}

.slider-gallery-btn:hover {
  background-color: #0284c7 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
  transform: translateY(-50%) scale(1.05);
}

/* Umístění šipek mírně přes okraj obrázku */
.slider-gallery-btn.prev {
  left: -24px;
}
.slider-gallery-btn.next {
  right: -24px;
}

/* Štítky pro verzi licence v navbaru */
.nav-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  vertical-align: middle;
}

.nav-badge.free {
  background-color: #e2e8f0;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.nav-badge.premium {
  background-color: #fef08a; /* Jemná zlatá */
  color: #854d0e;
  border: 1px solid #fde047;
  box-shadow: 0 0 8px rgba(253, 224, 71, 0.4);
}
/* --- PAYWALL MODAL STYLY --- */
.paywall-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  display: inline-block;
  background: #fefce8;
  width: 80px;
  height: 80px;
  line-height: 80px;
  border-radius: 50%;
  border: 2px solid #fef08a;
  box-shadow: 0 4px 15px rgba(253, 224, 71, 0.3);
}

.paywall-benefits {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

.paywall-price {
  font-size: 1.5rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 20px;
}

.paywall-price .price-period {
  font-size: 0.9rem;
  color: #64748b;
  font-weight: 500;
}

.paywall-btn {
  width: 100%;
  font-size: 1.1rem;
  padding: 14px;
  border-radius: 8px;
  background-color: var(--primary-color, #0284c7);
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.paywall-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}
/* =========================================================================
   FREEMIUM PAYWALL MODAL
   ========================================================================= */

#modal-paywall {
  z-index: 9999;
}

.modal-content.paywall-content {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  max-width: 420px;
  text-align: center;
  padding: 40px 25px 30px;
  margin: 20px;
  /* Oprava pro scrollování na mobilních telefonech */
  max-height: 85vh;
  overflow-y: auto;
}

.paywall-close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  transition: color 0.2s ease;
}

.paywall-close-btn:hover {
  color: #0f172a;
}

.paywall-title {
  margin-bottom: 12px;
  font-size: 1.6rem;
  color: #0f172a;
}

#paywall-dynamic-text {
  color: #64748b;
  margin-bottom: 25px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.paywall-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  color: #334155;
  font-size: 0.9rem;
  line-height: 2;
}

.paywall-check {
  color: #16a34a;
  margin-right: 8px;
  font-weight: bold;
}

.paywall-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.paywall-btn {
  text-decoration: none;
}

.paywall-footer-text {
  margin-top: 15px;
  font-size: 0.75rem;
  color: #94a3b8;
}
/* Jemné vizuální odlišení v textu učebnice */
.legal-tooltip {
  border-bottom: 1px dashed #0284c7;
  color: #0284c7;
  cursor: help;
  font-weight: 600;
}
/* --- VEŘEJNÉ KARTY ČLÁNKŮ (CLANKY.HTML) --- */
.public-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.public-article-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 30px 25px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.public-article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.card-badge {
  background-color: #f0f9ff;
  color: #0284c7;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.public-article-card h3 {
  margin: 0 0 15px 0;
  font-size: 20px;
  color: #0f172a;
  line-height: 1.35;
  font-weight: 800;
}

.public-article-card p {
  color: #475569;
  line-height: 1.6;
  margin: 0 0 30px 0;
  font-size: 15px;
}

/* Obal pro spodní část karty (zarovná prvky dolů a rozloží je do stran) */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: auto; /* Důležité: zatlačí patičku vždy na spodek karty */
}

.read-time {
  font-size: 13px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-outline-blue {
  border: 2px solid #0284c7;
  color: #0284c7;
  background-color: transparent;
  padding: 8px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-outline-blue:hover {
  background-color: #0284c7;
  color: #ffffff;
}

/* --- FILTR KATEGORIÍ --- */
.public-articles-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn-filter {
  background-color: #0284c7;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    opacity 0.2s ease;
}

.btn-filter:not(.active) {
  background-color: #e2e8f0;
  color: #475569;
}

.btn-filter:hover:not(.active) {
  background-color: #cbd5e1;
}
/* --- NAVIGACE NA KONCI ČLÁNKU --- */
.article-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color, #e2e8f0);
  gap: 20px;
}

.article-navigation .nav-side {
  flex: 1;
  display: flex;
}

.article-navigation .nav-left {
  justify-content: flex-start;
}

.article-navigation .nav-right {
  justify-content: flex-end;
}

.article-navigation .nav-center {
  flex: 0 1 auto;
  text-align: center;
}

/* Zkrácení dlouhých názvů článků v tlačítku */
.article-navigation .nav-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px; /* Zabrání rozbití layoutu u dlouhých názvů */
}

/* Mobilní zobrazení */
@media (max-width: 768px) {
  .article-navigation {
    flex-direction: column;
  }

  .article-navigation .nav-side,
  .article-navigation .nav-center {
    width: 100%;
    justify-content: center;
  }

  .article-navigation .nav-left a,
  .article-navigation .nav-right a {
    width: 100%;
    max-width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Odkaz na Všechny články posuneme na mobilu dolů */
  .article-navigation .nav-left {
    order: 1;
  }
  .article-navigation .nav-right {
    order: 2;
    margin-bottom: 20px;
  }
  .article-navigation .nav-center {
    order: 3;
  }
}
/* --- STRÁNKA KONTAKT --- */
.contact-card {
  background-color: var(--primary-light, #f0f9ff);
  border: 1px solid var(--primary-color, #0284c7);
  border-radius: 12px;
  padding: 25px 30px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact-card h3 {
  color: var(--text-dark);
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.25rem;
}

/* Tečkovaný seznam vycházející z tvého návrhu */
.dotted-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dotted-list li {
  padding: 12px 0;
  border-bottom: 2px dotted #cbd5e1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.5;
}

.dotted-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dotted-list .icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: -2px;
}

/* Kontaktní formulář a Mapa */
.contact-form-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.contact-map-wrapper {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

/* Tmavý režim pro Kontakt */
body.dark-mode .contact-card {
  background-color: #1e293b;
  border-color: #334155;
}
body.dark-mode .dotted-list li {
  border-bottom-color: #4a5568;
  color: #e2e8f0;
}
body.dark-mode .contact-form-wrapper {
  background: #1a202c;
  border-color: #2d3748;
}
body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
  background: #0f172a;
  border-color: #4a5568;
  color: #f8fafc;
}

/* Specifické styly pro tuto stránku */
.feature-section {
  text-align: center;
  margin: 70px 0;
}
.feature-section h2 {
  color: var(--primary-color);
  text-transform: uppercase;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
}
.feature-section p {
  max-width: 950px;
  margin: 0 auto 40px auto;
  color: var(--text-color);
  line-height: 1.7;
}
.feature-img-wrapper {
  background: var(--container-bg);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 15px;
}
.feature-img-wrapper img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}
.pricing-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}
.badge-yellow {
  background-color: #fef08a; /* Žlutá ze screenshotu */
  border: 2px solid #ca8a04;
  color: #1a202c;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 15px;
}
.intro-box {
  background-color: var(--primary-light);
  border: 1px solid var(--primary-color);
  padding: 25px 30px;
  border-radius: 8px;
  margin: 0 auto;
  max-width: 1000px;
}
/* --- STYLY PRO FORMULÁŘE V MODÁLNÍCH OKNECH --- */

/* Uspořádání štítků a polí pod sebe */
#modal-add-school .form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
  width: 100%;
}

/* Vzhled popisků (labels) */
#modal-add-school label {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
  font-size: 0.9rem;
}

/* Vzhled samotných políček (inputs, selects, textareas) */
#modal-add-school .form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-dark, #cbd5e1);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background-color: #ffffff;
  color: var(--text-dark);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  box-sizing: border-box;
}

/* Efekt při kliknutí do políčka (Focus) */
#modal-add-school .form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Úprava mřížky pro modal, aby měla hezké mezery */
#modal-add-school {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px; /* Mezera jen mezi sloupci, vertikální řeší margin-bottom u form-group */
}

/* Textarea ať jde zvětšovat jen dolů */
#modal-add-school textarea.form-control {
  resize: vertical;
}

/* Vzhled tlačítka Zrušit (outline) */
.btn-outline {
  padding: 10px 20px;
  border: 1px solid var(--border-dark, #cbd5e1);
  background-color: transparent;
  color: var(--text-dark);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
}

.btn-outline:hover {
  background-color: #f1f5f9;
}

/* Responzivita pro mobilní telefony (jeden sloupec) */
@media (max-width: 600px) {
  #modal-add-school .form-group[style*="grid-column"] {
    grid-column: span 1 !important;
  }
}
/* --- ÚPRAVA HERO SEKCE (Rozložení 50/50) --- */

.hero-text {
  flex: 1; /* Levý sloupec zabere přesně polovinu místa */
  max-width: 50%;
}

.hero-image-wrapper {
  flex: 1; /* Pravý sloupec s obrázkem zabere druhou polovinu */
  display: flex;
  justify-content: flex-end; /* Obrázek zarovná k pravému okraji */
  align-items: center;
}

.hero-image-wrapper img {
  width: 100%; /* Obrázek vyplní svůj sloupec */
  height: auto;
  max-width: 750px; /* Pojistka, aby nebyl na obřích monitorech příliš velký */
  object-fit: contain;
}

/* --- Responzivita pro tablety a mobily --- */
@media (max-width: 992px) {
  .hero-container {
    flex-direction: column; /* Na menších displejích se prvky seřadí pod sebe */
    text-align: center; /* Vycentrování textu */
    gap: 30px;
  }

  .hero-text {
    max-width: 100%; /* Text se roztáhne na celou šířku */
  }

  .hero-actions {
    justify-content: center; /* Vycentruje tlačítko na mobilu */
    margin-top: 35px;
  }

  .hero-image-wrapper {
    width: 100%;
    justify-content: center; /* Na mobilu vycentruje i samotný obrázek */
  }
  .hero-features-list {
    text-align: left; /* Zruší centrování textu u odrážek */
    max-width: 420px; /* Zabrání roztáhnutí až do úplných krajů displeje */
    margin: 20px auto 0 auto; /* Vycentruje celý BLOK seznamu na střed obrazovky */
  }
}
/* Styl pro bodový seznam v Hero sekci */
.hero-features-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0 0; /* Zrušen spodní margin, ten dáme tlačítku */
  display: flex;
  flex-direction: column;
  gap: 16px; /* ZVĚTŠENO z 12px: Větší mezera mezi jednotlivými odrážkami */
}

.hero-features-list li {
  position: relative;
  padding-left: 36px; /* ZVĚTŠENO z 30px: Více prostoru mezi fajfkou a textem */
  font-size: 1.05rem;
  color: var(--text-color);
  line-height: 1.5;
}

.hero-features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px; /* POSUNUTO: Optické srovnání s výškou prvního řádku */
  color: var(--primary-color);
  font-weight: 900;
  font-size: 1.25rem;
}
.hero-actions {
  display: flex;
  justify-content: center;
  margin-top: 35px;
}
/* --- FORMATOVÁNÍ TEXTU UVNITŘ OÚV ODPOVĚDÍ --- */

/* Hlavní modrý blok pro kategorie (např. Kontrola zvenčí vozidla) */
.ouv-answer-content .ouv-section-title {
  background-color: var(--primary-color, #0284c7);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 4px;
  margin: 1.5rem 0 1rem 0;
  font-size: 1.05rem;
  font-weight: 600;
}

/* První nadpis nebude mít zbytečnou mezeru nahoře */
.ouv-answer-content .ouv-section-title:first-child {
  margin-top: 0;
}

/* Menší modrý nadpis (např. Pneumatiky, Světla) */
.ouv-answer-content .ouv-subsection-title {
  color: var(--primary-color, #0284c7);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 1.2rem 0 0.5rem 0;
}

/* Odsazení a vzhled seznamů uvnitř výkladu */
/* --- AKORDEON PRO OÚV OTÁZKY --- */
.ouv-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 40px;
}

.ouv-item {
  background-color: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.ouv-item:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.ouv-question {
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  list-style: none; /* Odstraní výchozí černou šipku v některých prohlížečích */
  display: flex;
  align-items: center;
  position: relative;
  user-select: none;
  font-size: 1.05rem;
}

/* Skrytí výchozí šipky pro webkit prohlížeče (Chrome, Safari) */
.ouv-question::-webkit-details-marker {
  display: none;
}

/* Naše vlastní šipka, která se animuje */
.ouv-question::after {
  content: "▼";
  position: absolute;
  right: 20px;
  font-size: 0.9rem;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

/* Rotace šipky po rozbalení */
.ouv-item[open] .ouv-question::after {
  transform: rotate(180deg);
}

.ouv-item[open] .ouv-question {
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.ouv-answer {
  padding: 20px;
  background-color: #ffffff;
  color: var(--text-color);
  line-height: 1.6;
}

.ouv-answer p {
  margin: 0;
}
.ouv-answer-content .ouv-list {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-left: 20px;
  list-style-type: disc;
}

.ouv-answer-content .ouv-list li {
  margin-bottom: 0.3rem;
  color: var(--text-color);
  line-height: 1.5;
}

/* Poslední seznam před dalším hlavním blokem nemá zbytečný spodní přesah */
.ouv-answer-content .ouv-list:last-child {
  margin-bottom: 0;
}
.ouv-answer figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 15px 0;
}

.ouv-answer figure img {
  display: block;
  margin: 0 auto;
}
/* =========================================================================
   MODÁLNÍ OKNO PRO BANNERY
   ========================================================================= */
.modal-banners-box {
  max-width: 850px !important;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.banner-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.banner-item {
  display: flex;
  gap: 20px;
  align-items: center;
  background-color: var(--container-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--site-border-radius);
  padding: 15px;
}

.banner-preview {
  flex: 0 0 35%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--site-border-radius);
  background-color: var(--bg-color);
  min-height: 90px;
}

.banner-preview img {
  max-width: 100%;
  height: auto;
}

.banner-code-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.banner-code-input {
  width: 100%;
  height: 75px;
  padding: 10px;
  border: 1px solid var(--border-dark);
  border-radius: var(--site-border-radius);
  font-family: monospace;
  font-size: 0.82rem;
  color: var(--text-color);
  background-color: var(--bg-color);
  resize: none;
  box-sizing: border-box;
}

.btn-copy-code {
  padding: 6px 16px;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .banner-item {
    flex-direction: column;
  }

  .banner-preview {
    width: 100%;
  }

  .banner-code-box {
    width: 100%;
  }
}
/* =========================================================================
   STYLY PRO CHYBOVOU STRÁNKU (404)
   ========================================================================= */
.error-404-container {
  text-align: center;
  padding: 60px 25px;
  max-width: 900px;
  margin: 40px auto;
}

.error-badge {
  display: inline-block;
  background-color: #fef2f2;
  color: var(--color-danger, #dc2626);
  border: 1px solid #fca5a5;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.error-title {
  font-size: 2.4rem;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.error-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 35px auto;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.error-suggestions h3 {
  margin-top: 10px;
  margin-bottom: 25px;
  color: var(--text-dark);
}

.suggestion-card {
  text-align: center;
  align-items: center !important;
  text-decoration: none;
  padding: 20px 15px !important;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.suggestion-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.suggestion-card .card-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.suggestion-card h4 {
  font-size: 1.1rem;
  margin: 0 0 8px 0;
  color: var(--text-dark);
}

.suggestion-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Tmavý režim */
body.dark-mode .error-badge {
  background-color: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
  border-color: #991b1b;
}

@media (max-width: 600px) {
  .error-title {
    font-size: 1.8rem;
  }
  .error-actions {
    flex-direction: column;
    width: 100%;
  }
  .error-actions a {
    width: 100%;
    text-align: center;
  }
}
/* Kontejner pro řádkové seznamy – 2 sloupce na desktopu */
.category-row-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin-bottom: 25px;
}

/* Karta řádku */
.category-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--container-bg, #ffffff);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-row-card:hover {
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
  transform: translateY(-1px);
}

.category-row-info h3 {
  margin: 0 0 4px 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
}

.category-row-info p {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
}

/* Kruhový ukazatel pokroku (Koláč/Ring) na konci řádku */
.progress-ring {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  /* Dynamický gradient z JS (zelená pro dokočeno, šedá pro zbytek) */
  background: conic-gradient(#16a34a calc(var(--percent) * 1%), #e2e8f0 0);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.progress-ring::before {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--container-bg, #ffffff);
}

.progress-ring-text {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
}

/* Tmavý režim - přizpůsobení barvy vnitřku kruhu */
body.dark-mode .progress-ring::before {
  background: #1e293b;
}
body.dark-mode .category-row-card {
  background: #1e293b;
  border-color: #334155;
}
body.dark-mode .category-row-info h3 {
  color: #f8fafc;
}
body.dark-mode .progress-ring-text {
  color: #f8fafc;
}


/* Pravý číselný odznak pro obecné statistiky */
/* Pravý číselný odznak */
.row-stat-badge {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 5px 12px;
  border-radius: 18px;
  min-width: 46px;
  text-align: center;
  flex-shrink: 0;
}

/* Tmavý režim - přizpůsobení odznaku */
body.dark-mode .row-stat-badge {
  background: #0369a1;
  color: #f0f9ff;
  border-color: #0284c7;
}
/* Styling promo bannerů uvnitř ukázkové kapitoly */
/* Styling promo bannerů uvnitř ukázkové kapitoly */
.promo-box-chapter {
    margin: 32px 0;
    padding: 24px;
    border-radius: 12px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.promo-box-chapter.ucebnice-theme {
    border-color: #0284c7;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
}

.promo-box-chapter.otazky-theme {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.promo-box-chapter.testy-theme {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

.promo-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.promo-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.promo-title-group h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

.promo-title-group p {
    margin: 3px 0 0 0;
    font-size: 0.88rem;
    color: #64748b;
}

.promo-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 16px;
}

.promo-benefits li {
    font-size: 0.9rem;
    color: #334155;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.promo-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 5px;
    padding-top: 14px;
    border-top: 1px dashed #cbd5e1;
}

.promo-price-tag {
    font-size: 0.88rem;
    color: #64748b;
    font-weight: 500;
}

.promo-btn {
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.promo-btn-blue {
    background: #0284c7;
    color: #ffffff !important;
}

.promo-btn-blue:hover {
    background: #0369a1;
}

.promo-btn-orange {
    background: #f59e0b;
    color: #ffffff !important;
}

.promo-btn-orange:hover {
    background: #d97706;
}

.promo-btn-green {
    background: #10b981;
    color: #ffffff !important;
}

.promo-btn-green:hover {
    background: #059669;
}

/* Tmavý režim */
body.dark-mode .promo-box-chapter {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .promo-title-group h3 {
    color: #f8fafc;
}

body.dark-mode .promo-benefits li {
    color: #cbd5e1;
}
.postup-objednavky{
width: 48px; 
height: 48px; 
background: #e0f2fe; 
color: #0284c7; 
border-radius: 50%; 
display: flex; 
align-items: center; 
justify-content: center; 
font-weight: 800; 
font-size: 1.2rem; 
margin: 0 auto 15px;
}
.lepsi-cena {
  font-size: 0.85rem; 
  color: #16a34a; 
  font-weight: 800"
}
.flex-center {
  margin:25px 0 25px 0; 
  display: flex; 
  align-items: center; 
  justify-content: center;
}
.faq-section-block {
  margin-top: 30px;
}

        /* Specifické úpravy pro stránku FAQ */
        .faq-categories-nav {
            display: flex;
            justify-content: center;
            gap: 12px;
            margin-bottom: 40px;
            flex-wrap: wrap;
        }

        .faq-category-btn {
            padding: 10px 22px;
            border-radius: 8px;
            border: 1px solid var(--border-dark, #cbd5e1);
            background: #ffffff;
            color: var(--text-color, #334155);
            font-weight: 700;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .faq-category-btn:hover {
            background: #f1f5f9;
            border-color: var(--primary-color, #0284c7);
        }

        .faq-category-btn.active {
            background: var(--primary-color, #0284c7);
            color: #ffffff;
            border-color: var(--primary-color, #0284c7);
            box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
        }

        .faq-group-title {
            font-size: 1.4rem;
            color: var(--text-dark, #0f172a);
            margin: 60px 0 20px 0;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--primary-color, #0284c7);
            display: flex;
            align-items: center;
            gap: 10px;
        }

    

        .faq-accordion-item {
            background-color: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            margin-bottom: 12px;
            overflow: hidden;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .faq-accordion-item:hover {
            border-color: #cbd5e1;
        }

        .faq-accordion-item[open] {
            border-color: var(--primary-color, #0284c7);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
        }

        .faq-accordion-item summary {
            padding: 18px 22px;
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--text-dark, #0f172a);
            cursor: pointer;
            user-select: none;
            list-style: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 15px;
            background-color: #ffffff;
            transition: background-color 0.2s ease;
        }

        .faq-accordion-item summary::-webkit-details-marker {
            display: none;
        }

        .faq-accordion-item summary:hover {
            background-color: #f8fafc;
        }

        .faq-accordion-item summary::after {
            content: "▼";
            font-size: 0.8rem;
            color: var(--primary-color, #0284c7);
            transition: transform 0.2s ease;
            flex-shrink: 0;
        }

        .faq-accordion-item[open] summary::after {
            transform: rotate(180deg);
        }

        .faq-accordion-body {
            padding: 0 22px 20px 22px;
            font-size: 0.95rem;
            color: var(--text-color, #334155);
            line-height: 1.65;
            border-top: 1px solid #f1f5f9;
            background-color: #ffffff;
            padding-top: 15px;
        }

        .faq-accordion-body p {
            margin-bottom: 12px;
        }

        .faq-accordion-body p:last-child {
            margin-bottom: 0;
        }

        /* Tmavý režim */
        body.dark-mode .faq-category-btn {
            background: #1e293b;
            border-color: #334155;
            color: #f8fafc;
        }

        body.dark-mode .faq-category-btn.active {
            background: #0284c7;
            border-color: #0284c7;
        }

        body.dark-mode .faq-accordion-item {
            background-color: #1a202c;
            border-color: #2d3748;
        }

        body.dark-mode .faq-accordion-item summary {
            background-color: #1a202c;
            color: #f8fafc;
        }

        body.dark-mode .faq-accordion-body {
            background-color: #1a202c;
            border-top-color: #2d3748;
            color: #cbd5e1;
        }
    

/* =========================================================================
   NOVÉ OPTIMALIZOVANÉ ROZHRANÍ OSTRÉHO TESTU (MODAL #test-modal)
   ========================================================================= */

/* 1. Kompaktní horní hlavička */
.test-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    width: 100%;
}

.btn-exit-small {
    background: #fdf2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-exit-small:hover {
    background: #fee2e2;
}

.test-status-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.timer-badge {
    background-color: #fef2f2 !important;
    color: #ef4444 !important;
    border: 1px solid #fca5a5 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
}

.count-badge {
    background-color: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.9rem;
}

/* 2. Horizontálně rolovatelná matice čísel (1-25) */
.test-tracker-wrapper-scroll {
    width: 100%;
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

.test-tracker-wrapper-scroll::-webkit-scrollbar {
    height: 4px;
}

.test-tracker-wrapper-scroll::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.question-tracker {
    display: flex !important;
    flex-wrap: nowrap !important; /* Na mobilu udrží 1 řádek bez zalamování */
    gap: 6px !important;
    min-width: max-content;
    justify-content: flex-start !important;
}

.q-node {
    width: 32px !important;
    height: 32px !important;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    background-color: #f8fafc;
    color: #1e293b;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.q-node.answered {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #059669 !important;
}

.q-node.current {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0369a1 !important;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.3);
}



/* 4. Nenápadná patička s meta informacemi */
.test-footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    margin-top: 12px;
}
/* Jednotný styl pro všechny 3 prvky v patičce */
.test-meta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    height: 32px;
    box-sizing: border-box;
}



/* Tlačítko hvězdičky jako odznak */
.test-meta-badge.star-badge-btn {
    cursor: pointer;
    padding: 0 10px;
    transition: all 0.2s ease;
}

.test-meta-badge.star-badge-btn:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
}

.star-icon-text {
    font-size: 1.1rem;
    color: #94a3b8;
    line-height: 1;
}

.test-meta-badge.star-badge-btn.active .star-icon-text,
.star-icon-text.active {
    color: #f59e0b;
}

/* Tmavý režim */
body.dark-mode .test-footer-meta {
    background-color: #0f172a;
    border-top-color: #1e293b;
}

body.dark-mode .test-meta-badge {
    background-color: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark-mode .test-meta-badge.points-badge {
    color: #f8fafc;
    background-color: #334155;
}

.points-tag {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    color: #334155;
}

.star-btn-footer {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: #cbd5e1;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.15s ease, color 0.15s ease;
}

.star-btn-footer:hover,
.star-btn-footer.active {
    color: #f59e0b;
    transform: scale(1.15);
}

/* Tmavý režim úpravy */
body.dark-mode .test-footer-meta {
    background-color: #0f172a;
    border-top-color: #1e293b;
    color: #94a3b8;
}

body.dark-mode .points-tag {
    background: #1e293b;
    color: #f8fafc;
}

/* Responzivní přizpůsobení pro malé telefony */
@media (max-width: 600px) {
    #test-modal .quiz-modal-box {
        padding: 12px !important;
    }

    .question-title-text {
        font-size: 1rem !important;
    }

    .test-footer-meta {
        font-size: 0.78rem;
        padding: 8px 10px;
    }
}
/* =========================================================================
   PROMO BANNER PRO FREE UŽIVATELE (DVOUSLOUPCOVÝ LAYOUT)
   ========================================================================= */
.free-upgrade-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0 30px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

/* Dvousloupcová mřížka s automatickým zalomením na mobilu */
.upgrade-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.upgrade-col {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
    border: 2px solid #0284c7;
    border-radius: 12px;
    padding: 20px;
}

/* Druhý sloupec (Autoškoly) v tmavším / odlišném akcentu */
.upgrade-col-school {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-color: #0f172a;
}

.upgrade-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.upgrade-crown-icon {
    font-size: 1.8rem;
    line-height: 1;
    background: #ffffff;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #bae6fd;
    flex-shrink: 0;
}

.upgrade-crown-icon.school-icon {
    border-color: #cbd5e1;
}

.upgrade-header h3 {
    margin: 0 0 4px 0;
    font-size: 1.15rem;
    color: #0f172a;
    font-weight: 800;
}

.upgrade-header p {
    margin: 0;
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.45;
}

.upgrade-features-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 12px;
}

.upgrade-features-list li {
    font-size: 0.88rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.upgrade-features-list .check {
    color: #16a34a;
    font-weight: 900;
}

.upgrade-actions {
    margin-top: auto;
}

.upgrade-btn-main {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    box-sizing: border-box;
}

.upgrade-btn-school-main {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    background: #0f172a;
    color: #ffffff !important;
    border-radius: 8px;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.2s ease;
}

.upgrade-btn-school-main:hover {
    background: #1e293b;
}

/* Responsivita pro tablety a mobily */
@media (max-width: 850px) {
    .upgrade-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
}

/* Tmavý režim */
body.dark-mode .free-upgrade-card {
    background: #1a202c;
    border-color: #2d3748;
}

body.dark-mode .upgrade-col {
    background: #0f172a;
    border-color: #0284c7;
}

body.dark-mode .upgrade-col-school {
    border-color: #475569;
}

body.dark-mode .upgrade-header h3 {
    color: #f8fafc;
}

body.dark-mode .upgrade-header p,
body.dark-mode .upgrade-features-list li {
    color: #cbd5e1;
}

body.dark-mode .upgrade-crown-icon {
    background: #1e293b;
}