* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #f4f7fb;
  color: #172033;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, #1e293b, #0f766e);
  color: white;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
}

.hero-main {
  min-width: 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.lang-btn {
  border: 0;
  cursor: pointer;
  padding: 9px 12px;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.lang-btn.active {
  background: white;
  color: #0f766e;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 8px;
}

h1,
h2,
p {
  margin: 0;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  margin-bottom: 8px;
}

.hero p {
  opacity: 0.85;
  font-size: 18px;
}

.status-badge {
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.status-badge.ok {
  background: #dcfce7;
  color: #166534;
}

.status-badge.warning {
  background: #fef9c3;
  color: #854d0e;
}

.status-badge.critical {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.moving,
.status-badge.neutral {
  background: #e5e7eb;
  color: #374151;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 18px 0;
}

.summary-card,
.panel {
  background: white;
  border-radius: 24px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.summary-card {
  padding: 22px;
}

.label {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 8px;
}

.value {
  font-size: 22px;
  font-weight: 800;
}

.content {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 18px;
}

.panel {
  padding: 22px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.panel-title h2 {
  font-size: 22px;
}

.panel-title span {
  color: #64748b;
  font-size: 14px;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-bus {
  position: absolute;
  left: 86px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #0f766e;
  color: white;
  border: 3px solid white;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
  transform: translateY(-50%);
  transition: top 1.4s ease;
  animation: bus-breathe 1.4s ease-in-out infinite;
  z-index: 5;
}

.stop {
  position: relative;
  display: grid;
  grid-template-columns: 64px 42px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.stop::before {
  content: "";
  position: absolute;
  left: 98px;
  top: -13px;
  width: 4px;
  height: 13px;
  border-radius: 999px;
  background: #e2e8f0;
}

.stop:first-child::before {
  display: none;
}

.stop.passed::before,
.stop.current::before {
  background: #22c55e;
}

.stop .time {
  font-weight: 800;
  color: #334155;
}

.dot {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 15px;
  background: #e2e8f0;
  color: #334155;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.stop-name {
  font-weight: 750;
}

.zone-name {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
}

.stop.passed .dot,
.stop.current .dot {
  background: #22c55e;
  color: white;
}

.stop.passed,
.stop.current {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.stop.current {
  transform: scale(1.01);
  box-shadow: 0 12px 26px rgba(34, 197, 94, 0.13);
}

.stop.current .dot {
  animation: pulse-dot 1.25s infinite;
}

.stop.time_passed {
  opacity: 0.75;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35); }
  70% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes bus-breathe {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.08); }
}

#map {
  width: 100%;
  height: 520px;
  border-radius: 20px;
  overflow: hidden;
}

@media (max-width: 900px) {
  .page {
    width: min(100% - 20px, 1180px);
    margin: 10px auto;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .summary-grid,
  .content {
    grid-template-columns: 1fr;
  }

  #map {
    height: 420px;
  }
}
