:root {
  --primary: #b10c08; /* tmavě červená */
  --accent: #fbdeaa; /* světlá písková */
  --bg: #fffaf3; /* jemné pozadí ladící s accent */
  --text: #2b2b2b;
  --card: #ffffff;
  --ring: rgba(177, 12, 8, 0.25);
  --shadow: rgba(0, 0, 0, 0.1);
  --border: #efe7d6;
  --hover-bg: rgba(177, 12, 8, 0.03);
}

/* Dark mode */
[data-theme="dark"] {
  --primary: #ff6b6b;
  --accent: #ffd93d;
  --bg: #1a1a1a;
  --text: #e0e0e0;
  --card: #252525;
  --ring: rgba(255, 107, 107, 0.3);
  --shadow: rgba(0, 0, 0, 0.5);
  --border: #3a3a3a;
  --hover-bg: rgba(255, 107, 107, 0.1);
}

[data-theme="dark"] body {
  background: radial-gradient(
      60rem 60rem at 120% -10%,
      rgba(255, 217, 61, 0.15) 0%,
      transparent 60%
    ),
    var(--bg);
}

[data-theme="dark"] .brand {
  background: color-mix(in hsl, var(--accent) 30%, black 50%);
  border-color: color-mix(in hsl, var(--accent) 40%, black 30%);
}

[data-theme="dark"] .pill {
  background: linear-gradient(
    135deg,
    color-mix(in hsl, var(--accent) 25%, black) 0%,
    color-mix(in hsl, var(--accent) 20%, black) 100%
  );
  border-color: color-mix(in hsl, var(--accent) 50%, black);
}

[data-theme="dark"] .day-header {
  background: linear-gradient(
    135deg,
    color-mix(in hsl, var(--accent) 20%, black) 0%,
    color-mix(in hsl, var(--accent) 15%, black) 100%
  );
}

[data-theme="dark"] .journey-item {
  background: var(--card);
  border-color: var(--border);
}

[data-theme="dark"] .modal {
  background-color: rgba(0, 0, 0, 0.95);
}

[data-theme="dark"] .icon-badge {
  background: linear-gradient(
    135deg,
    color-mix(in hsl, var(--accent) 30%, black) 0%,
    color-mix(in hsl, var(--accent) 25%, black) 100%
  );
}

[data-theme="dark"] .qr {
  background: repeating-linear-gradient(
    45deg,
    #333,
    #333 8px,
    #3a3a3a 8px,
    #3a3a3a 16px
  );
  border-color: #555;
}

[data-theme="dark"] .qr:hover {
  border-color: var(--primary);
  background: repeating-linear-gradient(
    45deg,
    #3a3a3a,
    #3a3a3a 8px,
    #404040 8px,
    #404040 16px
  );
}

/* Dark mode - journey types s výraznějšími barvami */
[data-theme="dark"] .journey-type.train {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #93c5fd;
  border: 1px solid #3b82f6;
}

[data-theme="dark"] .journey-type.bus {
  background: linear-gradient(135deg, #854d0e 0%, #a16207 100%);
  color: #fde047;
  border: 1px solid #eab308;
}

[data-theme="dark"] .journey-type.walk {
  background: linear-gradient(135deg, #581c87 0%, #6b21a8 100%);
  color: #e9d5ff;
  border: 1px solid #a855f7;
}

[data-theme="dark"] .journey-type.food {
  background: linear-gradient(135deg, #9a3412 0%, #c2410c 100%);
  color: #fed7aa;
  border: 1px solid #f97316;
}

[data-theme="dark"] .journey-type.station {
  background: linear-gradient(135deg, #14532d 0%, #166534 100%);
  color: #86efac;
  border: 1px solid #22c55e;
}

[data-theme="dark"] .wait-item {
  background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
  border-color: #6b7280;
  color: #d1d5db;
}

[data-theme="dark"] .wait-item:hover {
  background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
}

[data-theme="dark"] .train-name {
  color: #9ca3af;
}

[data-theme="dark"] .day-section {
  border-color: var(--border);
}

* {
  box-sizing: border-box;
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.35rem;
  background: var(--card);
  padding: 0.4rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px var(--shadow);
  z-index: 100;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  box-shadow: 0 6px 20px var(--shadow);
}

.theme-btn {
  background: transparent;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}

.theme-btn:hover {
  background: var(--hover-bg);
  transform: scale(1.1);
}

.theme-btn:focus {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.theme-btn[aria-checked="true"] {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--ring);
}

[data-theme="dark"] .theme-btn[aria-checked="true"] {
  background: var(--accent);
  border-color: var(--accent);
  filter: brightness(0.9);
}

@media (max-width: 720px) {
  .theme-toggle {
    bottom: 0.5rem;
    left: 0.5rem;
    padding: 0.3rem;
    gap: 0.25rem;
  }

  .theme-btn {
    padding: 0.3rem 0.4rem;
    font-size: 0.9rem;
    min-width: 32px;
    min-height: 32px;
  }
}
html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
    Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(
      60rem 60rem at 120% -10%,
      var(--accent) 0%,
      transparent 60%
    ),
    var(--bg);
  background-attachment: fixed;
  min-height: 100%;
}

header {
  display: grid;
  place-items: center;
  padding: 2.5rem 1rem 1.5rem;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: color-mix(in hsl, var(--accent) 70%, white);
  border: 1px solid color-mix(in hsl, var(--accent) 60%, black 10%);
  font-weight: 600;
  letter-spacing: 0.25px;
  flex-wrap: wrap;
}

.brand-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in hsl, var(--primary) 20%, transparent);
}

.archive-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, var(--primary) 0%, #8b0000 100%);
  color: white;
  border-radius: 12px;
  margin-left: 0.5rem;
  box-shadow: 0 2px 8px rgba(177, 12, 8, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

[data-theme="dark"] .archive-badge {
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.last-updated {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.7;
  color: #666;
}

[data-theme="dark"] .last-updated {
  color: #d1d5db;
  opacity: 0.8;
}

h1 {
  margin: 0.75rem 0 0;
  font-size: clamp(2rem, 3vw + 1rem, 3.5rem);
  font-family: "Georgia", "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    #8b0000 50%,
    var(--primary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(177, 12, 8, 0.1);
  position: relative;
  display: inline-block;
}

h1::before {
  content: "🍷 ";
}

h1::after {
  content: " 🍷";
}

.subtitle {
  margin: 0.5rem 0 0;
  color: #5a5a5a;
}

.group-photo {
  width: 100%;
  max-width: 800px;
  height: auto;
  margin: 1.5rem auto 0;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.group-photo:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .group-photo {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .group-photo:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.15);
}

@media (max-width: 720px) {
  .group-photo {
    margin: 1rem 0 0;
    border-radius: 12px;
  }

  .archive-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    margin-left: 0.35rem;
  }
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.card {
  grid-column: span 12;
  background: var(--card);
  border: 1px solid #efe7d6;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(177, 12, 8, 0.12);
  border-color: var(--accent);
}

@media (min-width: 720px) {
  .span-6 {
    grid-column: span 6;
  }
  .span-4 {
    grid-column: span 4;
  }
  .span-full {
    grid-column: 1 / -1;
  }
}

.card h2 {
  margin: 0 0 0.8rem;
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.card h2::before {
  content: attr(data-icon);
  font-size: 1.4rem;
}

.card p {
  margin: 0.25rem 0 1rem;
  color: #5a5a5a;
  line-height: 1.6;
}

/* Archiv sekce */
.archive-section {
  background: linear-gradient(135deg, var(--card) 0%, #fffaf5 100%);
}

.archive-header {
  padding: 0.5rem 0;
  border-radius: 12px;
  transition: background 0.2s ease;
  cursor: pointer;
}

.archive-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.archive-header:hover {
  background: rgba(251, 222, 170, 0.15);
}

.archive-content {
  display: none;
}

.archive-toggle-icon {
  color: var(--primary);
  font-size: 1rem;
  transition: transform 0.3s ease;
  margin-left: auto;
}

.archive-content {
  overflow: hidden;
  transition: all 0.3s ease;
}

.archive-grid {
  margin-top: 1.5rem;
}

.archive-content .grid {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-theme="dark"] .archive-section {
  background: linear-gradient(135deg, var(--card) 0%, #1a1a1a 100%);
}

[data-theme="dark"] .archive-header:hover {
  background: rgba(177, 12, 8, 0.1);
}

.btn {
  --btn-bg: var(--primary);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    var(--btn-bg) 0%,
    color-mix(in hsl, var(--btn-bg) 85%, black) 100%
  );
  color: var(--btn-fg);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  box-shadow: 0 4px 12px var(--ring), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px var(--ring), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px var(--ring);
}

.btn:focus {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.btn.secondary {
  --btn-bg: var(--accent);
  --btn-fg: #3a2200;
  box-shadow: 0 4px 12px rgba(251, 222, 170, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn.secondary:hover {
  box-shadow: 0 8px 20px rgba(251, 222, 170, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn.disabled {
  --btn-bg: #999;
  --btn-fg: #fff;
  cursor: not-allowed !important;
  opacity: 0.6;
  box-shadow: none;
  pointer-events: none;
}

.btn.disabled:hover {
  transform: none;
  box-shadow: none;
}

.btn.disabled::before {
  display: none;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

/* Ikony v nadpisech karet */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    color-mix(in hsl, var(--accent) 90%, white) 100%
  );
  font-size: 1.3rem;
  box-shadow: 0 2px 8px rgba(251, 222, 170, 0.4);
}

.qr-wrap {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.qr {
  width: 140px;
  height: 140px;
  border-radius: 16px;
  background: repeating-linear-gradient(
    45deg,
    #f5f5f5,
    #f5f5f5 8px,
    #fafafa 8px,
    #fafafa 16px
  );
  display: grid;
  place-items: center;
  color: #999;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px dashed #d8d2c5;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.qr::before {
  content: "💳";
  font-size: 2.5rem;
  position: absolute;
  opacity: 0.15;
}

.qr:hover {
  border-color: var(--primary);
  background: repeating-linear-gradient(
    45deg,
    #fff,
    #fff 8px,
    var(--bg) 8px,
    var(--bg) 16px
  );
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(177, 12, 8, 0.15);
}

.list {
  display: grid;
  gap: 0.7rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.list li {
  padding: 0.6rem 0.8rem;
  background: linear-gradient(
    90deg,
    rgba(177, 12, 8, 0.03) 0%,
    transparent 100%
  );
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.list li:hover {
  background: linear-gradient(
    90deg,
    rgba(177, 12, 8, 0.06) 0%,
    transparent 100%
  );
  border-left-color: var(--primary);
  transform: translateX(4px);
}

.list li strong {
  color: var(--primary);
  font-weight: 700;
}

.pill {
  display: inline-block;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.6;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    color-mix(in hsl, var(--accent) 85%, white) 100%
  );
  border: 2px solid color-mix(in hsl, var(--accent) 70%, black 10%);
  box-shadow: 0 4px 12px rgba(251, 222, 170, 0.3);
  transition: all 0.3s ease;
}

.pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 222, 170, 0.4);
  border-color: var(--primary);
}

details {
  border: 1px dashed #f0d8b0;
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  background: #fffdf9;
}

summary {
  cursor: pointer;
  font-weight: 600;
  transition: color 0.2s ease;
}

summary:hover {
  color: var(--primary);
}

/* Progress bar pro celý itinerář */
.journey-progress-bar {
  margin: 1.5rem 0;
  padding: 1rem;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    color-mix(in hsl, var(--accent) 85%, white) 100%
  );
  border-radius: 12px;
  border: 2px solid color-mix(in hsl, var(--accent) 70%, black 10%);
}

.progress-bar-container {
  position: relative;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  height: 32px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #e67e22 100%);
  border-radius: 8px;
  transition: width 1s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}

.progress-bar-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}

[data-theme="dark"] .journey-progress-bar {
  background: linear-gradient(
    135deg,
    color-mix(in hsl, var(--accent) 25%, black) 0%,
    color-mix(in hsl, var(--accent) 20%, black) 100%
  );
  border-color: color-mix(in hsl, var(--accent) 50%, black);
}

[data-theme="dark"] .progress-bar-container {
  background: rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .progress-bar-label {
  color: var(--text);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.scroll-to-current-btn {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, #d41410 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(177, 12, 8, 0.3);
}

.scroll-to-current-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(177, 12, 8, 0.4);
}

.scroll-to-current-btn:active {
  transform: translateY(0);
}

.scroll-to-current-btn:focus {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.scroll-icon {
  font-size: 1.2rem;
  animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

[data-theme="dark"] .scroll-to-current-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #ff8585 100%);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

[data-theme="dark"] .scroll-to-current-btn:hover {
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
}

@media (max-width: 720px) {
  .scroll-to-current-btn {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }

  .scroll-text {
    display: none;
  }

  .scroll-to-current-btn::after {
    content: "Přejít na aktuální";
  }
}

/* Spoje - široká karta */
.transport-card {
  grid-column: 1 / -1;
  animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.day-section {
  border: 1px solid #efe7d6;
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.day-section:hover {
  box-shadow: 0 4px 16px rgba(177, 12, 8, 0.1);
  transform: translateY(-2px);
}

.day-header {
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    color-mix(in hsl, var(--accent) 80%, white) 100%
  );
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease;
}

.day-header:hover {
  background: linear-gradient(
    135deg,
    color-mix(in hsl, var(--accent) 90%, white) 0%,
    var(--accent) 100%
  );
}

.day-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.weather-widget {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin-left: 0.5rem;
  cursor: help;
  transition: all 0.2s ease;
}

.weather-widget:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
}

.weather-icon {
  font-size: 1.2rem;
}

.weather-temp {
  color: #333;
}

.weather-city {
  font-size: 0.7rem;
  opacity: 0.7;
  font-weight: 500;
}

.weather-loading {
  opacity: 0.6;
  font-size: 0.8rem;
}

[data-theme="dark"] .weather-widget {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .weather-temp {
  color: #e0e0e0;
}

[data-theme="dark"] .weather-city {
  opacity: 0.6;
}

/* Odkazy - pouze pro textové odkazy, ne tlačítka */
a:not(.btn) {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:not(.btn):hover {
  color: #004499;
  text-decoration: underline;
}

[data-theme="dark"] a:not(.btn) {
  color: #66b3ff;
}

[data-theme="dark"] a:not(.btn):hover {
  color: #99ccff;
  text-decoration: underline;
}

[data-theme="dark"] a:not(.btn):visited {
  color: #9999ff;
}

.chevron {
  transition: transform 0.3s ease;
  font-size: 1.2rem;
}

.day-section.active .chevron {
  transform: rotate(180deg);
}

.day-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 1.2rem;
}

.day-section.active .day-content {
  max-height: 10000px;
  padding: 1.2rem;
}

.journey-item {
  background: white;
  border: 1px solid #efe7d6;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes highlightPulse {
  0%,
  100% {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--border);
  }
  25%,
  75% {
    box-shadow: 0 8px 32px rgba(177, 12, 8, 0.3);
    border-color: var(--primary);
  }
  50% {
    box-shadow: 0 12px 40px rgba(177, 12, 8, 0.4);
    border-color: var(--primary);
    transform: scale(1.02);
  }
}

.journey-item:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateX(4px);
  border-color: var(--accent);
}

.journey-item:last-child {
  margin-bottom: 0;
}

.wait-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.6rem 1rem;
  margin: 0.5rem 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px dashed #adb5bd;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #495057;
  font-weight: 600;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.wait-item:hover {
  opacity: 1;
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  transform: translateX(2px);
}

.wait-icon {
  font-size: 1.3rem;
  animation: tickTock 2s ease-in-out infinite;
}

@keyframes tickTock {
  0%,
  100% {
    transform: rotate(-10deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

.wait-text {
  font-style: italic;
}

.journey-type {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.journey-type.train {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  color: #1565c0;
  border: 1px solid #90caf9;
}

.journey-type.bus {
  background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
  color: #f57f17;
  border: 1px solid #ffd54f;
}

.journey-type.walk {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
  color: #6a1b9a;
  border: 1px solid #ce93d8;
}

.journey-type.food {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
  border: 1px solid #ffcc80;
}

.journey-type.station {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.journey-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.train-number {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.train-name {
  font-size: 0.95rem;
  color: #5a5a5a;
  font-style: italic;
}

.journey-route {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
  margin: 0.8rem 0;
  padding: 0.8rem;
  background: linear-gradient(
    90deg,
    rgba(177, 12, 8, 0.03) 0%,
    transparent 100%
  );
  border-radius: 8px;
}

.journey-route > div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.route-time {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 60px;
}

.route-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  color: #999;
  position: relative;
  min-width: 60px;
  width: 100%;
}

.route-arrow::before {
  content: "";
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, #ccc 100%);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.route-arrow::after {
  content: "▶";
  font-size: 0.8rem;
  color: var(--primary);
  transition: all 0.3s ease;
}

/* Stavy na ose podle času */
.journey-item.completed .route-arrow::before {
  background: linear-gradient(90deg, #2ecc71 0%, #27ae60 100%);
}

.journey-item.completed .route-arrow::after {
  content: "✓";
  color: #2ecc71;
  font-weight: bold;
}

.journey-item.active .route-arrow::before {
  background: linear-gradient(90deg, var(--primary) 0%, #e67e22 50%, #ccc 100%);
  animation: pulseArrow 2s ease-in-out infinite;
}

.journey-item.active .route-arrow::after {
  color: var(--primary);
  animation: bounce 1s ease-in-out infinite;
}

.journey-item.upcoming .route-arrow::before {
  background: linear-gradient(90deg, #bdc3c7 0%, #95a5a6 100%);
}

.journey-item.upcoming .route-arrow::after {
  content: "⏳";
  color: #95a5a6;
}

/* Dark mode - lepší čitelnost pro upcoming (budoucí) aktivity */
[data-theme="dark"] .journey-item.upcoming {
  opacity: 1;
  background: #1f1f1f;
}

[data-theme="dark"] .journey-item.upcoming .route-time {
  color: #f3f4f6;
  font-weight: 700;
}

[data-theme="dark"] .journey-item.upcoming .route-station {
  color: #e5e7eb;
  font-weight: 600;
}

[data-theme="dark"] .journey-item.upcoming .train-number {
  color: #fbbf24;
}

[data-theme="dark"] .journey-item.upcoming .train-name {
  color: #d1d5db;
}

[data-theme="dark"] .journey-item.upcoming .journey-note {
  color: #d1d5db;
  background: #2d2d2d;
}

[data-theme="dark"] .journey-item.upcoming .route-arrow::before {
  background: linear-gradient(90deg, #9ca3af 0%, #d1d5db 100%);
}

[data-theme="dark"] .journey-item.upcoming .route-arrow::after {
  color: #d1d5db;
  font-size: 1rem;
}

@keyframes pulseArrow {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 rgba(177, 12, 8, 0);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 10px rgba(177, 12, 8, 0.5);
  }
}

/* Realtime animovaná ikona na trase */
.route-progress {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  animation: bounce 1s ease-in-out infinite;
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: left 0.5s linear;
}

@keyframes bounce {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-5px);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(255, 193, 7, 0);
  }
}

@keyframes rotateHourglass {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}

.hourglass-icon {
  display: inline-block;
  animation: rotateHourglass 4s ease-in-out infinite;
}

.route-station {
  font-weight: 600;
  color: var(--text);
}

.journey-note {
  font-size: 0.9rem;
  color: #666;
  margin: 0.6rem 0;
  padding: 0.5rem;
  background: #fffaf3;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
}

.vehicle-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 0.8rem;
}

.vehicle-img {
  width: auto;
  height: 40px;
  max-width: 150px;
  border-radius: 0;
  object-fit: contain;
  border: none;
  border-top: 2px solid #efe7d6;
  border-bottom: 2px solid #efe7d6;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  background: white;
  padding: 4px 0;
  display: block;
}

.vehicle-img:first-child {
  border-left: 2px solid #efe7d6;
  border-radius: 8px 0 0 8px;
  padding-left: 4px;
}

.vehicle-img:last-child {
  border-right: 2px solid #efe7d6;
  border-radius: 0 8px 8px 0;
  padding-right: 4px;
}

.vehicle-img:only-child {
  border: 2px solid #efe7d6;
  border-radius: 8px;
  padding: 4px;
}

.vehicle-img:hover {
  transform: scale(1.5) translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: var(--primary);
  z-index: 10;
}

.vehicle-img.disabled {
  filter: grayscale(100%) brightness(1.1);
  opacity: 0.6;
  border-color: #ccc;
}

.vehicle-img.disabled:hover {
  transform: scale(1.5) translateY(-5px);
  border-color: #999;
}

.vehicle-img.disabled::after {
  content: "❌";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.vehicle-img.disabled:hover::after {
  opacity: 0.9;
}

footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: #6a6a6a;
  font-size: 0.95rem;
}

.heart {
  color: var(--primary);
}

/* utility */
.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-0 {
  margin-bottom: 0;
}

/* Responzivita */
@media (max-width: 720px) {
  .journey-route {
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    padding: 0.6rem;
  }

  .route-arrow::before {
    min-width: 40px;
  }

  .route-time {
    font-size: 1.1rem;
    min-width: 50px;
  }

  .route-station {
    font-size: 0.85rem;
  }

  .vehicle-images {
    justify-content: center;
  }

  .vehicle-img {
    height: 60px;
    max-width: 110px;
  }

  .vehicle-img:hover {
    transform: scale(1.3) translateY(-5px);
  }

  .qr-wrap {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
  }

  .qr {
    margin: 0 auto;
  }

  .card {
    padding: 1rem;
  }

  .day-section.active .day-content {
    padding: 0.8rem;
  }

  .journey-item {
    padding: 0.8rem;
  }

  h1 {
    font-size: 2rem;
  }

  .day-title {
    font-size: 1.1rem;
  }

  .weather-widget {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin-left: 0;
    margin-top: 0.3rem;
  }

  .weather-icon {
    font-size: 1rem;
  }

  .journey-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .train-number {
    font-size: 1rem;
  }

  .train-name {
    font-size: 0.85rem;
  }
}

/* Stínové animace pro karty */
@keyframes cardPulse {
  0%,
  100% {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  }
  50% {
    box-shadow: 0 8px 28px rgba(177, 12, 8, 0.1);
  }
}

/* Modal pro plakát */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  position: relative;
  margin: auto;
  padding: 20px;
  max-width: 90%;
  max-height: 90vh;
  animation: zoomIn 0.3s ease;
}

.modal-content img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 25px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1001;
  background: rgba(177, 12, 8, 0.8);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  background: var(--primary);
  transform: rotate(90deg) scale(1.1);
}

@keyframes zoomIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Survey modal styles */
.modal-content.survey-content {
  background: var(--card);
  border-radius: 16px;
  max-width: 1200px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content.survey-content h2 {
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  text-align: center;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.75rem;
}

.survey-data {
  margin-top: 1rem;
}

/* Sekce grafů */
.survey-charts {
  margin-bottom: 2rem;
  display: grid;
  gap: 1.5rem;
}

.chart {
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.chart-title {
  margin: 0 0 1.25rem 0;
  color: var(--primary);
  font-size: 1.2rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.75rem;
}

.chart-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chart-bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 200px) 1fr;
  gap: 1rem;
  align-items: center;
}

.chart-label {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-bar-container {
  background: rgba(251, 222, 170, 0.2);
  border-radius: 8px;
  height: 32px;
  position: relative;
  overflow: visible; /* Změněno z hidden na visible */
}

.chart-bar {
  background: linear-gradient(90deg, var(--primary) 0%, #d41410 100%);
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.75rem;
  transition: width 0.6s ease;
  min-width: 50px;
  position: relative;
}

.chart-bar-gray {
  background: linear-gradient(90deg, #999 0%, #777 100%);
  opacity: 0.6;
}

.chart-value {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.chart-placeholder {
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border: 2px dashed var(--accent);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
}

.chart-placeholder h3 {
  margin: 0 0 0.5rem 0;
  color: var(--primary);
  font-size: 1.4rem;
}

/* Rozbalovací sekce pro surová data */
.survey-raw-data {
  margin-top: 2rem;
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 0;
  background: #ffffff;
}

.survey-raw-data summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  user-select: none;
  color: var(--primary);
  font-size: 1.1rem;
  transition: background-color 0.2s ease;
  border-radius: 10px;
}

.survey-raw-data summary:hover {
  background: rgba(251, 222, 170, 0.2);
}

.survey-raw-data summary::marker {
  color: var(--primary);
}

.survey-raw-data[open] summary {
  border-bottom: 2px solid var(--accent);
  border-radius: 10px 10px 0 0;
  margin-bottom: 1.5rem;
}

.survey-raw-data .survey-responses {
  padding: 0 1.5rem 1.5rem;
}

.survey-responses {
  display: grid;
  gap: 1.5rem;
}

.survey-card {
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.survey-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(177, 12, 8, 0.15);
  transform: translateY(-2px);
}

.survey-card h3 {
  margin: 0 0 1rem 0;
  color: var(--primary);
  font-size: 1.2rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
}

.survey-field {
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  border-radius: 6px;
  background: rgba(251, 222, 170, 0.1);
}

.survey-field strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.survey-field span {
  color: #444;
  font-size: 1rem;
  line-height: 1.5;
}

.loading,
.error,
.no-data {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: #666;
}

.error {
  color: #c00;
}

/* Skeleton loader */
.skeleton-loader {
  display: grid;
  gap: 1.5rem;
  padding: 1rem;
}

.skeleton-card {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s ease-in-out infinite;
  border-radius: 12px;
  height: 150px;
}

[data-theme="dark"] .skeleton-card {
  background: linear-gradient(90deg, #2d2d2d 25%, #3a3a3a 50%, #2d2d2d 75%);
  background-size: 200% 100%;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Scrollbar styling for survey modal */
.modal-content.survey-content::-webkit-scrollbar {
  width: 10px;
}

.modal-content.survey-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.modal-content.survey-content::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}

.modal-content.survey-content::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Legenda */
.journey-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding: 0.8rem;
  background: #fffaf3;
  border-radius: 8px;
  font-size: 0.9rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-icon {
  font-size: 1.2rem;
}

.legend-icon-pending {
  color: #95a5a6;
}

.legend-icon-active {
  color: var(--primary);
}

.legend-icon-completed {
  color: #2ecc71;
}

.legend-text {
  color: #666;
}

/* Dark mode pro legendu */
[data-theme="dark"] .journey-legend {
  background: #2c3e50;
}

[data-theme="dark"] .legend-text {
  color: #bdc3c7;
}

[data-theme="dark"] .legend-icon-active {
  color: #e74c3c;
}

@media (max-width: 768px) {
  .modal-content.survey-content {
    width: 95%;
    padding: 1rem;
  }

  .survey-card {
    padding: 1rem;
  }

  .modal-content.survey-content h2 {
    font-size: 1.4rem;
  }

  /* Responzivní grafy */
  .chart {
    padding: 1rem;
  }

  .chart-title {
    font-size: 1rem;
  }

  .chart-bar-row {
    grid-template-columns: minmax(80px, 120px) 1fr;
    gap: 0.5rem;
  }

  .chart-label {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .chart-bar-container {
    height: 28px;
    overflow: visible;
  }

  .chart-bar {
    min-width: 30px; /* Menší minimální šířka pro mobily */
  }

  .chart-value {
    font-size: 0.7rem;
    padding-right: 0.25rem;
  }

  /* Pokud je sloupec úzký, zobraz hodnotu vně (na mobilu) */
  .chart-bar-narrow .chart-value {
    position: absolute;
    left: 100%;
    margin-left: 0.25rem;
    color: var(--text);
    text-shadow: none;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
  }
}
