:root {
  --navy: #0c2340;
  --navy-light: #163a5f;
  --gold: #c9a227;
  --gold-soft: #e8d48a;
  --white: #fff;
  --muted: #5a6b7d;
  --line: #dce3ea;
  --bg: #f6f8fb;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --max: 1080px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--navy);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
}
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 1.25rem 0;
}
.header-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem; }
.brand {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
}
.tagline { font-size: .9rem; opacity: .85; }

.hero { padding: 2.5rem 0 3rem; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin-bottom: .5rem;
}
.lead { color: var(--muted); margin-bottom: 1.75rem; max-width: 36rem; }

.search-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 12px 40px rgba(12, 35, 64, .08);
}
.trip-type {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.trip-type input { margin-right: .35rem; accent-color: var(--navy); }
.search-row {
  display: grid;
  grid-template-columns: .9fr .9fr 1.15fr 1.15fr 1.35fr .7fr auto;
  gap: .65rem;
  align-items: end;
}
@media (max-width: 980px) {
  .search-row { grid-template-columns: 1fr 1fr; }
  .search-row .btn-search { grid-column: 1 / -1; }
}
.field label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: .35rem;
}
.field input,
.field select {
  width: 100%;
  padding: .75rem .85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1.05rem;
  font-family: inherit;
  background: #fff;
}
.field input:focus,
.field select:focus {
  outline: 2px solid var(--gold-soft);
  border-color: var(--gold);
}
.hint { font-size: .75rem; color: var(--muted); margin-top: .25rem; display: block; }
.field-return.is-disabled { opacity: .45; }
.field-return.is-disabled input { pointer-events: none; }

.btn-search {
  margin: 0;
  width: auto;
  padding: .75rem 1.1rem;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, #b8921f 100%);
  color: var(--navy);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
}
.btn-search:hover { filter: brightness(1.05); }
.btn-search:disabled { opacity: .6; cursor: wait; }

.form-note { margin-top: .85rem; font-size: .9rem; color: var(--muted); min-height: 1.25em; }
.form-note.is-error { color: #a32020; }
.form-note.is-ok { color: #1a6b3a; }

.results-section { padding: 0 0 3rem; }
.results-section h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: .35rem;
}
.results-meta { color: var(--muted); font-size: .9rem; margin-bottom: 1.25rem; }

.results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.offer {
  background: var(--white);
  border: 1px solid #e6ebf1;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(12, 35, 64, .06);
  overflow: hidden;
}
.offer-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
}
.offer-dirs { min-width: 0; }
.dir {
  padding: 1.05rem 1.25rem 1rem;
  border-bottom: 1px solid #eef2f6;
}
.dir:last-child { border-bottom: 0; }
.dir-kicker {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a97a6;
  margin-bottom: .75rem;
}
.seg {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 88px minmax(0, 1fr);
  gap: .35rem .75rem;
  align-items: center;
}
.seg-carrier {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}
.seg-carrier strong { display: block; font-size: .92rem; line-height: 1.2; }
.seg-carrier span { display: block; color: var(--muted); font-size: .75rem; }
.seg-note { grid-column: 1 / -1; margin: 0; color: #6d7c8c; font-size: .75rem; }
.seg-air {
  text-align: center;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
}
.seg-air i {
  display: block;
  height: 2px;
  margin: .3rem .2rem;
  background: #c5d0dc;
  border-radius: 2px;
}
.conn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: .7rem 0;
  padding: .45rem .85rem;
  border-radius: 8px;
  background: #f4f7fb;
  color: var(--navy-light);
  font-size: .82rem;
}
.conn strong { color: var(--navy); font-weight: 700; }
.bag-bar {
  margin-top: .8rem;
  padding: .55rem .85rem;
  border-radius: 8px;
  background: #0c2340;
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.dir-mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f4f7fb;
  border: 1px solid #e3eaf2;
  color: var(--navy);
  font-size: .72rem;
  font-weight: 700;
  flex: 0 0 auto;
}
.dir-carrier strong {
  display: block;
  font-size: .92rem;
  line-height: 1.2;
}
.dir-carrier span {
  display: block;
  color: var(--muted);
  font-size: .75rem;
}
.dir-point strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.dir-point em,
.dir-point span {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: .78rem;
}
.dir-point em { color: var(--navy-light); margin-top: .15rem; }
.dir-point-end { text-align: right; }
.dir-path {
  text-align: center;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
}
.dir-path i {
  display: block;
  height: 2px;
  margin: .35rem .15rem;
  background: linear-gradient(90deg, transparent, #c5d0dc 12%, #c5d0dc 88%, transparent);
  position: relative;
}
.dir-path i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: .45rem;
  height: .45rem;
  border: 2px solid #c9a227;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}
.dir-meta {
  margin-top: .75rem;
  color: #6d7c8c;
  font-size: .78rem;
}
.offer-buy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: .55rem;
  padding: 1.15rem 1rem;
  border-left: 1px solid #eef2f6;
  background: linear-gradient(180deg, #fbfcfe 0%, #fff 100%);
  text-align: center;
}
.offer-price {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--navy);
}
.offer-ptc {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.offer-source {
  font-size: .72rem;
  color: #8a97a6;
  line-height: 1.3;
}
.offer-book {
  margin-top: .25rem;
  border: 0;
  border-radius: 8px;
  background: #9a3412;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  padding: .7rem .85rem;
  cursor: pointer;
}
.offer-book:hover { background: #7c2d12; }
.offer-warning {
  margin: 0 1.25rem 1rem;
  padding: .55rem .75rem;
  font-size: .82rem;
  line-height: 1.4;
  color: #7a4a00;
  background: #fff8e6;
  border-radius: 8px;
  border: 1px solid #f0d89a;
}
@media (max-width: 800px) {
  .offer-main { grid-template-columns: 1fr; }
  .offer-buy {
    border-left: 0;
    border-top: 1px solid #eef2f6;
  }
  .seg { grid-template-columns: 1fr 1fr; }
  .seg-carrier, .seg-air, .seg-note { grid-column: 1 / -1; }
  .dir-point-end { text-align: left; }
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
  font-size: .85rem;
  color: var(--muted);
  background: var(--white);
}

.book-modal {
  position: fixed;
  inset: 0;
  background: rgba(12, 35, 64, .45);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 20;
}
.book-modal[hidden] { display: none; }
.book-card {
  width: min(100%, 640px);
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem 1.35rem 1.1rem;
  box-shadow: 0 20px 50px rgba(12, 35, 64, .2);
}
.book-card h2 { font-family: var(--serif); font-size: 1.45rem; margin-bottom: .35rem; }
.book-route { font-weight: 700; margin-bottom: .45rem; }
.book-help { color: var(--muted); font-size: .88rem; margin-bottom: 1rem; }
.book-grid {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  gap: .75rem;
}
.book-span { grid-column: 1 / -1; }
.book-actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  margin-top: 1rem;
}
.book-cancel {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: .7rem .9rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
@media (max-width: 640px) {
  .book-grid { grid-template-columns: 1fr; }
}
