:root {
  --bg: #eef3ff;
  --surface: #ffffff;
  --primary: #1f5aee;
  --primary-soft: #eef2ff;
  --accent: #ff7a59;
  --text: #1f2332;
  --muted: #6b7280;
  --border: #d7dfe8;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, rgba(31, 90, 238, 0.12), transparent 35%), #f8fbff;
  color: var(--text);
}

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

button,
a {
  font: inherit;
}

.site-shell {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 20px 24px 40px;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  border: 1px solid rgba(31, 90, 238, 0.12);
  box-shadow: var(--shadow);
  position: sticky;
  top: 16px;
  z-index: 20;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  font-size: 1.1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
}

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--primary);
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.hero-banner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  margin: 32px 0 28px;
  align-items: stretch;
}

.hero-copy {
  padding: 28px 30px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(31, 90, 238, 0.1);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2.75rem, 4vw, 4.25rem);
  line-height: 1.02;
}

.hero-copy p {
  margin: 0 0 28px;
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-stats div {
  padding: 18px;
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(31, 90, 238, 0.08);
}

.hero-stats strong {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-card {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(31, 90, 238, 0.12);
}

.hero-card h2 {
  margin: 0 0 20px;
  font-size: 1.75rem;
}

.booking-form .form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.booking-form label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 600;
}

.booking-form input,
.booking-form select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f8fbff;
  color: var(--text);
}

.booking-form input:focus,
.booking-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 90, 238, 0.12);
}

.booking-form button.primary-button {
  width: 100%;
  margin-top: 10px;
  padding: 16px 18px;
  border-radius: 18px;
}

.feature-section {
  padding: 0 6px;
}

.feature-section h2 {
  margin: 0 0 22px;
  font-size: 2rem;
}

.feature-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(31, 90, 238, 0.08);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.feature-card h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.results-panel,
.summary-panel,
.form-card,
.history-panel {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(31, 90, 238, 0.08);
  box-shadow: var(--shadow);
}

.results-panel h2,
.summary-panel h2 {
  margin-top: 0;
  font-size: 1.75rem;
}

.train-list {
  display: grid;
  gap: 18px;
}

.train-card,
.summary-card,
.form-card,
.history-panel {
  border-radius: 22px;
  padding: 22px;
}

.train-card {
  background: #f8fbff;
  border: 1px solid rgba(31, 90, 238, 0.08);
}

.train-card h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.train-meta,
.summary-item {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.train-meta span,
.summary-item span {
  color: var(--muted);
  font-size: 0.95rem;
}

.train-card p,
.summary-card p {
  margin: 0 0 18px;
  color: var(--text);
}

.train-card button {
  appearance: none;
  border: none;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.train-card button:hover,
.nav-button:hover {
  background: #154fd1;
}

.summary-card {
  min-height: 200px;
  background: linear-gradient(135deg, rgba(31, 90, 238, 0.08), rgba(255, 122, 89, 0.08));
}

.summary-card .summary-item strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  color: var(--text);
}

.summary-note {
  margin-top: 10px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .hero-banner {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-page-grid {
    grid-template-columns: 1fr;
  }
}

.confirmation-card {
  padding: 32px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(31, 90, 238, 0.08);
  box-shadow: var(--shadow);
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(31, 90, 238, 0.12);
  margin-bottom: 24px;
}

.ticket-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  margin: 0 0 6px;
  display: block;
}

.ticket-section {
  margin-bottom: 24px;
}

.ticket-section h3 {
  margin: 0 0 14px;
  font-size: 1.15rem;
}

.ticket-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.passenger-table {
  width: 100%;
  border-collapse: collapse;
  background: #f8fbff;
  border-radius: 18px;
  overflow: hidden;
}

.passenger-table th,
.passenger-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(31, 90, 238, 0.08);
}

.passenger-table th {
  background: rgba(31, 90, 238, 0.06);
  color: var(--text);
  font-weight: 700;
}

.passenger-table tbody tr:last-child td {
  border-bottom: none;
}

.ticket-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(31, 90, 238, 0.12);
  color: var(--muted);
}

@media (max-width: 720px) {
  .ticket-header,
  .ticket-grid {
    display: grid;
    gap: 16px;
  }

  .passenger-table th,
  .passenger-table td {
    padding: 12px 10px;
  }
}

@media print {
  body {
    background: white;
  }

  .nav-bar,
  .site-header,
  .page-heading,
  .nav-button {
    display: none !important;
  }

  .confirmation-card {
    box-shadow: none;
    border: none;
    padding: 0;
  }
}

.history-item {
  background: #f8fbff;
  border-radius: 20px;
  border: 1px solid rgba(31, 90, 238, 0.08);
  padding: 24px;
  margin-bottom: 18px;
}

.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.history-row--space {
  margin-top: 18px;
}

.cancel-button {
  background: #ff5f5f;
  border: none;
  color: white;
  padding: 12px 18px;
  border-radius: 16px;
  cursor: pointer;
}

.cancel-button:hover {
  background: #e04343;
}

@media (max-width: 720px) {
  .site-shell {
    padding: 18px 16px 28px;
  }

  .nav-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .hero-copy {
    padding: 24px;
  }

  .hero-copy h1 {
    font-size: 2.5rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .booking-form .form-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .train-meta,
  .summary-item {
    grid-template-columns: 1fr;
  }

  .booking-page-grid {
    display: grid;
    gap: 20px;
  }

  .form-card,
  .history-panel {
    padding: 20px;
  }

  .grid-two-columns {
    display: grid;
    gap: 16px;
  }

  .passenger-row {
    display: grid;
    gap: 16px;
  }
}
