:root {
  --blue: #1f73d8;
  --blue-hover: #155db5;
  --yellow: #f7b500;
  --green: #1f7a55;
  --canvas: #f7f9f7;
  --surface: #ffffff;
  --surface-muted: #eef3ef;
  --surface-warm: #fff8ea;
  --line: #d9e2dc;
  --text: #16231d;
  --muted: #60706a;
  --subtle: #87958f;
  --shadow: 0 18px 48px rgba(22, 35, 29, 0.14);
  color-scheme: light;
  font-family: Inter, Manrope, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--canvas);
  color: var(--text);
  margin: 0;
}

button,
input {
  font: inherit;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  min-height: 72px;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  font-size: 18px;
  font-weight: 800;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  height: 36px;
  width: 36px;
}

.nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.nav a {
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  text-decoration: none;
}

.nav a:hover,
.nav a:focus {
  background: var(--surface-muted);
  color: var(--text);
  outline: none;
}

.iconButton,
.secondaryButton,
.primaryButton,
.travelButton {
  align-items: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
}

.iconButton {
  background: var(--surface-muted);
  color: var(--blue);
  flex: 0 0 44px;
  height: 44px;
  overflow: hidden;
  width: 44px;
}

.iconButton img {
  display: block;
  height: 18px !important;
  max-height: 18px;
  max-width: 18px;
  object-fit: contain;
  width: 18px !important;
}

.primaryButton {
  background: var(--blue);
  color: #fff;
  padding: 0 22px;
}

.primaryButton:hover,
.primaryButton:focus {
  background: var(--blue-hover);
}

.secondaryButton {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0 16px;
}

.travelButton {
  background: var(--yellow);
  color: var(--text);
  margin-top: 24px;
  padding: 0 18px;
  width: 100%;
}

.hero {
  min-height: clamp(560px, calc(100vh - 128px), 720px);
  overflow: hidden;
  position: relative;
}

.heroMedia {
  background:
    linear-gradient(90deg, rgba(8, 17, 24, 0.56), rgba(8, 17, 24, 0.05)),
    url("../mobile/assets/travel_ua/images/hero/mountain_dawn.png") center / cover;
  inset: 0;
  position: absolute;
}

.heroContent {
  color: #fff;
  max-width: 1120px;
  padding: clamp(56px, 9vw, 112px) 32px 72px;
  position: relative;
}

.eyebrow {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #fee28a;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(48px, 9vw, 94px);
  line-height: 0.95;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  margin-bottom: 0;
}

h3 {
  font-size: 20px;
  line-height: 1.25;
}

.heroText {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.55;
  max-width: 650px;
}

.searchPanel {
  align-items: end;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--text);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1.6fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) auto;
  margin-top: 34px;
  max-width: 1060px;
  padding: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  height: 44px;
  min-width: 0;
  padding: 0 12px;
}

.section,
.splitSection {
  padding: 72px 32px;
  scroll-margin-top: 88px;
}

.sectionHeader {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto 24px;
  max-width: 1180px;
}

.chipGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto 24px;
  max-width: 1180px;
}

.chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  min-height: 36px;
  padding: 0 14px;
}

.chip.isActive {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.dataStatus {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  margin: 0 auto 16px;
  max-width: 1180px;
  padding: 10px 12px;
}

.dataStatus[data-tone="success"] {
  border-color: rgba(31, 122, 85, 0.28);
  color: var(--green);
}

.dataStatus[data-tone="warning"] {
  background: var(--surface-warm);
  border-color: rgba(247, 181, 0, 0.42);
  color: #7a5b00;
}

.dataStatus[data-tone="loading"] {
  color: var(--blue);
}

.placeGrid,
.regionGrid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1180px;
}

.placeCard,
.regionGrid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.placeCard img,
.regionGrid img {
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  width: 100%;
}

.placeCardBody,
.regionGrid article {
  padding: 16px;
}

.placeCardBody {
  display: grid;
  gap: 8px;
}

.placeMeta,
.placeActions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.placeMeta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.placeCard p,
.regionGrid p {
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0;
}

.miniButton {
  background: var(--surface-muted);
  border: 0;
  border-radius: 8px;
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  min-height: 36px;
  padding: 0 12px;
}

.categoryBadge {
  background: var(--surface-muted);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  padding: 8px 10px;
}

.emptyState,
.loadingState {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  justify-items: center;
  min-height: 220px;
  padding: 24px;
  text-align: center;
}

.emptyState strong {
  color: var(--text);
  font-size: 20px;
}

.loadingState span {
  animation: spin 0.8s linear infinite;
  border: 3px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 999px;
  height: 34px;
  width: 34px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.splitSection {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(320px, 0.8fr) minmax(360px, 1.2fr);
  margin: 0 auto;
  max-width: 1244px;
}

.routePlanner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.segment {
  background: var(--surface-muted);
  border-radius: 10px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 24px;
  padding: 4px;
}

.segment button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  min-height: 36px;
}

.segment button.isActive {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(22, 35, 29, 0.08);
}

.stopList {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.routeStatus {
  background: var(--surface-muted);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  margin: 14px 0 0;
  padding: 10px 12px;
}

.routeStatus[data-tone="success"] {
  background: rgba(31, 122, 85, 0.12);
  color: var(--green);
}

.routeStatus[data-tone="warning"] {
  background: var(--surface-warm);
  color: #7a5b00;
}

.routeStatus[data-tone="error"] {
  background: rgba(216, 90, 74, 0.12);
  color: var(--blocked, #d85a4a);
}

.stopList li {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 32px 1fr auto;
  padding-bottom: 12px;
}

.stopList span {
  align-items: center;
  background: var(--yellow);
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.stopList small {
  color: var(--muted);
  font-weight: 750;
}

.mapPreview {
  background: #dce7df;
  border-radius: 8px;
  min-height: 520px;
  overflow: hidden;
  position: relative;
}

.mapPreview img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.mapCard {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  bottom: 18px;
  display: grid;
  gap: 4px;
  left: 18px;
  padding: 12px 14px;
  position: absolute;
}

.mapCard span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.regionBand {
  background: var(--surface-warm);
}

.regionGrid article {
  display: grid;
  gap: 8px;
}

.regionGrid img {
  border-radius: 6px;
}

@media (max-width: 900px) {
  .topbar {
    padding: 0 16px;
  }

  .nav {
    display: none;
  }

  .hero {
    min-height: clamp(620px, calc(100vh - 112px), 740px);
  }

  .heroContent,
  .section,
  .splitSection {
    padding-left: 16px;
    padding-right: 16px;
  }

  .searchPanel,
  .splitSection,
  .placeGrid,
  .regionGrid {
    grid-template-columns: 1fr;
  }

  .searchPanel {
    align-items: stretch;
  }

  .mapPreview {
    min-height: 360px;
  }
}

@media (max-width: 520px) {
  .sectionHeader {
    align-items: flex-start;
    flex-direction: column;
  }

  .heroContent {
    padding-top: 48px;
  }

  .heroText {
    font-size: 16px;
  }

  .stopList li {
    align-items: start;
    grid-template-columns: 32px 1fr;
  }

  .stopList small {
    grid-column: 2;
  }
}
