:root {
  --premium-navy: #071b36;
  --premium-blue: #0d2f56;
  --premium-ink: #10233f;
  --premium-muted: #66758a;
  --premium-line: #dfe6ef;
  --premium-surface: #ffffff;
  --premium-soft: #f4f7fb;
  --premium-gold: #d59b32;
  --premium-gold-dark: #a86e13;
}

body {
  background: linear-gradient(180deg, #eef3f8 0%, #f8fafc 42%, #eef2f6 100%) !important;
  color: var(--premium-ink) !important;
}

.hero {
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(115deg, rgba(5,21,43,.98), rgba(10,46,83,.94)) !important;
  box-shadow: 0 18px 45px rgba(7,27,54,.22) !important;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 78% 12%, rgba(213,155,50,.16), transparent 28%), linear-gradient(90deg, transparent 45%, rgba(255,255,255,.06));
}

.hero .container {
  position: relative !important;
  z-index: 1 !important;
}

.hero h1 {
  letter-spacing: -.035em !important;
  text-shadow: 0 4px 22px rgba(0,0,0,.25) !important;
}

.hero p {
  color: rgba(255,255,255,.78) !important;
}

.telegram-hero-link {
  background: linear-gradient(135deg, #e2ab45, #c78720) !important;
  color: #172b45 !important;
  border: 1px solid rgba(255,255,255,.28) !important;
  box-shadow: 0 10px 22px rgba(0,0,0,.18) !important;
  font-weight: 700 !important;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease !important;
}

.telegram-hero-link:hover,
.telegram-hero-link:focus-visible {
  background: linear-gradient(135deg, #f0bd5b, #d99a30) !important;
  color: #10233f !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 14px 28px rgba(0,0,0,.25) !important;
}

main > div {
  max-width: 1800px !important;
}

main h2, main h3 {
  color: var(--premium-ink) !important;
  letter-spacing: -.025em !important;
}

#f > div:first-child,
#h > div:first-of-type,
.offers-hub,
.assembled-routes,
.price-calendar,
.nearby-dates {
  border: 1px solid var(--premium-line) !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(16,35,63,.06) !important;
}

#t1, #t2,
.flight-mode-tab.active,
#route-category {
  background: var(--premium-navy) !important;
  border-color: var(--premium-navy) !important;
  color: #fff !important;
}

#t1:hover, #t2:hover,
.flight-mode-tab:hover,
#route-category:focus {
  border-color: var(--premium-gold) !important;
}

#sort-by,
#origin-select,
#destination-select,
#route-category,
#hotel-search,
#hotel-stars,
#hotel-sort {
  min-height: 42px !important;
  border-color: #cbd6e3 !important;
  border-radius: 10px !important;
  color: var(--premium-ink) !important;
  background: #fff !important;
}

.flight-card,
.hotel-card-wrap,
.assembled-card {
  border-radius: 16px !important;
  border-color: var(--premium-line) !important;
  box-shadow: 0 8px 20px rgba(16,35,63,.07) !important;
}

.hotel-card-wrap:hover,
.flight-card:hover,
.assembled-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 16px 30px rgba(16,35,63,.12) !important;
}

.price-calendar {
  background: rgba(255,255,255,.98) !important;
}

.calendar-nav:hover:not(:disabled),
.calendar-nav:focus-visible {
  background: #fff8e8 !important;
  border-color: var(--premium-gold) !important;
  color: var(--premium-gold-dark) !important;
}

.calendar-day.price-low {
  background: #f4fbf6 !important;
  border-color: #a8d5b4 !important;
}

.calendar-day.selected-departure,
.calendar-day.selected-return {
  background: var(--premium-navy) !important;
  border-color: var(--premium-navy) !important;
}

.calendar-day.selected-return {
  background: var(--premium-gold-dark) !important;
  border-color: var(--premium-gold-dark) !important;
}

.book-outbound,
.book-inbound {
  border-radius: 10px !important;
}

.book-outbound {
  background: var(--premium-navy) !important;
}

.book-inbound {
  background: #fff8e8 !important;
  border-color: #e5bd72 !important;
  color: var(--premium-gold-dark) !important;
}

@media (max-width: 699px) {
  .hero h1 { font-size: clamp(2rem, 10vw, 3.2rem) !important; }
  main > div { padding-left: .8rem !important; padding-right: .8rem !important; }
  #t1, #t2 { flex: 1 1 0 !important; }
}

/* Возвращаем исходную фотографию hero и оставляем мягкое премиальное затемнение. */
.hero {
  background-image: linear-gradient(115deg, rgba(5,21,43,.78), rgba(10,46,83,.58)), url('/static/img/hero-premium-airplane.webp') !important;
  background-size: cover !important;
  background-position: center bottom !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
}

/* Финальное правило hero: фото самолёта обязательно остаётся видимым. */
.hero {
  background: linear-gradient(115deg, rgba(5,21,43,.56), rgba(10,46,83,.26)), url('/static/img/hero-premium-airplane.webp') center bottom / cover no-repeat !important;
  background-attachment: scroll !important;
}

/* Композиция hero: полноценный первый экран и видимый самолёт справа. */
.hero {
  min-height: 460px !important;
  box-sizing: border-box !important;
  padding: 92px 0 78px !important;
  display: flex !important;
  align-items: center !important;
  background-position: 65% center !important;
  background-size: cover !important;
}

.hero .container {
  width: 100% !important;
}

@media (max-width: 699px) {
  .hero {
    min-height: 430px !important;
    padding: 76px 0 62px !important;
    background-position: 67% center !important;
  }
}

/* Композиция hero: полноценный первый экран и видимый самолёт справа. */
.hero {
  min-height: 460px !important;
  box-sizing: border-box !important;
  padding: 92px 0 78px !important;
  display: flex !important;
  align-items: center !important;
  background-position: 65% center !important;
  background-size: cover !important;
}

.hero .container {
  width: 100% !important;
}

@media (max-width: 699px) {
  .hero {
    min-height: 430px !important;
    padding: 76px 0 62px !important;
    background-position: 67% center !important;
  }
}

/* Показываем почти весь кадр самолёта без обрезания снизу. */
.hero {
  background-color: #071b36 !important;
  background-size: 90% auto !important;
  background-position: right center !important;
  background-repeat: no-repeat !important;
}

@media (max-width: 699px) {
  .hero {
    background-size: auto 100% !important;
    background-position: 68% center !important;
  }
}

/* Полный кадр без обрезания: contain сохраняет самолёт и нижнюю часть изображения. */
.hero {
  background-color: #071b36 !important;
  background-size: contain !important;
  background-position: right center !important;
  background-repeat: no-repeat !important;
}

@media (max-width: 699px) {
  .hero {
    background-size: contain !important;
    background-position: center center !important;
  }
}

/* Немного увеличиваем самолёт, сохраняя полный кадр. */
.hero {
  min-height: 560px !important;
  padding: 92px 0 82px !important;
  background-size: contain !important;
  background-position: right center !important;
}

@media (max-width: 699px) {
  .hero {
    min-height: 500px !important;
    padding: 78px 0 64px !important;
    background-size: contain !important;
    background-position: center center !important;
  }
}

/* Всплывающий календарь по кнопке «Даты». */
.calendar-open-button {
  display: inline-flex !important;
  align-items: center !important;
  gap: .45rem !important;
  margin: 0 0 1rem !important;
  padding: .72rem 1.05rem !important;
  border: 1px solid #c9a04a !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #fff7df, #f4e2ad) !important;
  color: #74500e !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  box-shadow: 0 7px 18px rgba(16,35,63,.08) !important;
}

.calendar-open-button:hover,
.calendar-open-button:focus-visible {
  background: #f9e8b9 !important;
  outline: 3px solid rgba(213,155,50,.2) !important;
}

body.calendar-modal-open::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(3,14,31,.68);
  backdrop-filter: blur(4px);
}

.calendar-modal[hidden] { display: none !important; }

.calendar-modal:not([hidden]) {
  position: fixed !important;
  z-index: 1001 !important;
  top: 50% !important;
  left: 50% !important;
  width: min(900px, calc(100vw - 2rem)) !important;
  max-height: min(86vh, 720px) !important;
  overflow: auto !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  padding: 1.15rem !important;
  background: #fff !important;
  border: 1px solid rgba(255,255,255,.8) !important;
  border-radius: 22px !important;
  box-shadow: 0 28px 80px rgba(0,0,0,.35) !important;
}

.calendar-modal .calendar-heading { position: relative !important; padding-right: 2.6rem !important; }
.calendar-modal-close {
  position: absolute !important;
  top: -.2rem !important;
  right: 0 !important;
  width: 36px !important;
  height: 36px !important;
  border: 1px solid #d7dee8 !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: #536276 !important;
  font-size: 1.5rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

@media (max-width: 699px) {
  .calendar-modal:not([hidden]) {
    width: calc(100vw - 1rem) !important;
    max-height: calc(100vh - 1rem) !important;
    padding: .85rem !important;
    border-radius: 18px !important;
  }
}

/* Всплывающий календарь по кнопке «Даты». */
.calendar-open-button {
  display: inline-flex !important;
  align-items: center !important;
  gap: .45rem !important;
  margin: 0 0 1rem !important;
  padding: .72rem 1.05rem !important;
  border: 1px solid #c9a04a !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #fff7df, #f4e2ad) !important;
  color: #74500e !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  box-shadow: 0 7px 18px rgba(16,35,63,.08) !important;
}

.calendar-open-button:hover,
.calendar-open-button:focus-visible {
  background: #f9e8b9 !important;
  outline: 3px solid rgba(213,155,50,.2) !important;
}

body.calendar-modal-open::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(3,14,31,.68);
  backdrop-filter: blur(4px);
}

.calendar-modal[hidden] { display: none !important; }

.calendar-modal:not([hidden]) {
  position: fixed !important;
  z-index: 1001 !important;
  top: 50% !important;
  left: 50% !important;
  width: min(900px, calc(100vw - 2rem)) !important;
  max-height: min(86vh, 720px) !important;
  overflow: auto !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  padding: 1.15rem !important;
  background: #fff !important;
  border: 1px solid rgba(255,255,255,.8) !important;
  border-radius: 22px !important;
  box-shadow: 0 28px 80px rgba(0,0,0,.35) !important;
}

.calendar-modal .calendar-heading { position: relative !important; padding-right: 2.6rem !important; }
.calendar-modal-close {
  position: absolute !important;
  top: -.2rem !important;
  right: 0 !important;
  width: 36px !important;
  height: 36px !important;
  border: 1px solid #d7dee8 !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: #536276 !important;
  font-size: 1.5rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

@media (max-width: 699px) {
  .calendar-modal:not([hidden]) {
    width: calc(100vw - 1rem) !important;
    max-height: calc(100vh - 1rem) !important;
    padding: .85rem !important;
    border-radius: 18px !important;
  }
}

/* Компактный popover рядом с кнопкой «Даты», без полноэкранной подложки. */
body.calendar-modal-open::before { display: none !important; }
body.calendar-modal-open { overflow: auto !important; }
.calendar-modal:not([hidden]) {
  top: var(--calendar-top, 180px) !important;
  left: var(--calendar-left, 8px) !important;
  transform: none !important;
  width: min(900px, calc(100vw - 16px)) !important;
  max-height: min(78vh, 650px) !important;
  margin: 0 !important;
}
.calendar-summary {
  display: inline-block !important;
  margin: 0 0 1rem .55rem !important;
  color: #66758a !important;
  font-size: .86rem !important;
  vertical-align: middle !important;
}
.calendar-modal-close { z-index: 2 !important; }

/* Более широкая премиальная кнопка покупки с мягким эффектом «капли». */
.flight-card > span[style*="Купить билет"],
.flight-card > span[style*="background:#2563eb"] {
  display: flex !important;
  position: relative !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: .85rem !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #0b2b50, #174f82) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(7,27,54,.18) !important;
  transition: transform .2s ease, box-shadow .2s ease !important;
}
.flight-card > span[style*="Купить билет"]::after,
.flight-card > span[style*="background:#2563eb"]::after {
  content: '';
  position: absolute;
  top: -45%;
  left: -20%;
  width: 42%;
  height: 190%;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  transform: translateX(-180%) rotate(18deg);
  transition: transform .55s ease;
}
.flight-card:hover > span[style*="Купить билет"],
.flight-card:hover > span[style*="background:#2563eb"] {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 25px rgba(7,27,54,.26) !important;
}
.flight-card:hover > span[style*="Купить билет"]::after,
.flight-card:hover > span[style*="background:#2563eb"]::after {
  transform: translateX(430%) rotate(18deg);
}
.assembled-actions a.book-outbound,
.assembled-actions a.book-inbound {
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  position: relative !important;
  overflow: hidden !important;
}

@media (max-width: 699px) {
  .calendar-summary { display: block !important; margin: -.55rem 0 1rem !important; }
  .calendar-modal:not([hidden]) { max-height: calc(100vh - 16px) !important; }
}

/* Премиальный блок направлений с фотографиями городов. */
.city-destinations {
  margin: 2rem 0 1rem;
  padding: 1.35rem;
  border: 1px solid #dfe6ef;
  border-radius: 22px;
  background: linear-gradient(145deg, #ffffff, #f4f7fb);
  box-shadow: 0 14px 34px rgba(16,35,63,.08);
}
.city-destinations-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.section-eyebrow {
  display: block;
  margin-bottom: .35rem;
  color: #a86e13;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
}
.city-destinations h2 { margin: 0 !important; color: #10233f !important; }
.city-destinations-heading p { margin: .35rem 0 0; color: #66758a; }
.city-destinations-note {
  flex: 0 0 auto;
  padding: .42rem .72rem;
  border: 1px solid #e4c57d;
  border-radius: 999px;
  background: #fff8e8;
  color: #8d6115;
  font-size: .78rem;
  font-weight: 800;
}
.city-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .9rem;
}
.city-card {
  position: relative;
  min-height: 205px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: #0b2748;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(7,27,54,.12);
  transition: transform .24s ease, box-shadow .24s ease;
}
.city-card img { width: 100%; height: 100%; min-height: 205px; display: block; object-fit: cover; transition: transform .45s ease; }
.city-card-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,27,54,.02) 25%, rgba(4,16,34,.88) 100%); }
.city-card-copy { position: absolute; right: 1rem; bottom: .9rem; left: 1rem; color: #fff; }
.city-card-copy strong { display: block; font-size: 1.15rem; letter-spacing: -.02em; }
.city-card-copy small { display: block; margin-top: .22rem; color: rgba(255,255,255,.75); font-size: .75rem; }
.city-card:hover, .city-card:focus-visible { transform: translateY(-4px); box-shadow: 0 16px 28px rgba(7,27,54,.22); outline: none; }
.city-card:hover img, .city-card:focus-visible img { transform: scale(1.06); }
.city-card:focus-visible { box-shadow: 0 0 0 3px rgba(213,155,50,.58), 0 16px 28px rgba(7,27,54,.22); }

@media (max-width: 980px) { .city-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 699px) {
  .city-destinations { padding: 1rem; border-radius: 18px; }
  .city-destinations-heading { align-items: flex-start; flex-direction: column; }
  .city-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .city-card, .city-card img { min-height: 165px; }
  .city-card-copy { right: .7rem; bottom: .7rem; left: .7rem; }
  .city-card-copy strong { font-size: 1rem; }
  .city-card-copy small { font-size: .68rem; }
}

/* Премиальные рейсовые карточки: фото направления справа, читаемая зона слева. */
.flight-card {
  position: relative !important;
  overflow: hidden !important;
  min-height: 164px !important;
  padding: 1rem !important;
  border: 1px solid #dce5ef !important;
  border-radius: 18px !important;
  background-color: #fff !important;
  background-repeat: no-repeat !important;
  background-position: right center !important;
  background-size: 48% 100% !important;
  box-shadow: 0 9px 24px rgba(7,27,54,.09) !important;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease !important;
}
.flight-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.96) 43%, rgba(255,255,255,.72) 64%, rgba(255,255,255,.10) 100%);
}
.flight-card > * { position: relative !important; z-index: 1 !important; }
.flight-card:hover, .flight-card:focus-within {
  transform: translateY(-3px) !important;
  border-color: #c9a04a !important;
  box-shadow: 0 16px 32px rgba(7,27,54,.16) !important;
}
.flight-card .book-outbound,
.flight-card .book-inbound,
.flight-card a[href*="travel"],
.flight-card a[href*="aviasales"] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: min(100%, 240px) !important;
  min-height: 44px !important;
  margin-top: .75rem !important;
  border-radius: 12px !important;
  font-weight: 800 !important;
  box-shadow: 0 7px 16px rgba(7,27,54,.16) !important;
}
.flight-card .book-outbound { background: linear-gradient(135deg,#0b2b50,#1b5a8d) !important; color:#fff !important; }
.flight-card .book-inbound { background: linear-gradient(135deg,#fff6dc,#efd18c) !important; color:#79520c !important; border:1px solid #d9b35e !important; }
.flight-card a[href*="travel"], .flight-card a[href*="aviasales"] { background: linear-gradient(135deg,#0b2b50,#1b5a8d) !important; color:#fff !important; text-decoration:none !important; }

@media (max-width:699px) {
  .flight-card { min-height: 174px !important; background-size: 58% 100% !important; }
  .flight-card::after { background: linear-gradient(90deg,rgba(255,255,255,.99) 0%,rgba(255,255,255,.94) 52%,rgba(255,255,255,.18) 100%); }
  .flight-card .book-outbound, .flight-card .book-inbound, .flight-card a[href*="travel"], .flight-card a[href*="aviasales"] { width:100% !important; }
}

/* СамЛечу: мягкий фото-вариант карточек рейсов. */
.flight-card {
  background-color: #fff !important;
  background-repeat: no-repeat !important;
  background-position: right center !important;
  background-size: 44% 100% !important;
  border: 1px solid #d9e1eb !important;
  border-left: 3px solid #d4a648 !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 22px rgba(7,27,54,.08) !important;
}
.flight-card::after {
  background: linear-gradient(90deg,
    rgba(255,255,255,.99) 0%,
    rgba(255,255,255,.98) 39%,
    rgba(255,255,255,.90) 53%,
    rgba(255,255,255,.56) 68%,
    rgba(255,255,255,.08) 100%) !important;
}
.flight-card > * { max-width: 62% !important; }
.flight-card .flight-card-route { color: #102d4d !important; }
.flight-card .flight-card-price { color: #16734a !important; }
.flight-card a[href*="travel"],
.flight-card a[href*="aviasales"],
.flight-card .book-outbound,
.flight-card .book-inbound {
  width: min(100%, 220px) !important;
  min-height: 42px !important;
  margin-top: .72rem !important;
  border: 1px solid rgba(212,166,72,.58) !important;
  border-radius: 11px !important;
  background: #123b63 !important;
  box-shadow: 0 5px 12px rgba(7,27,54,.13) !important;
  color: #fff !important;
  transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease !important;
}
.flight-card a[href*="travel"]:hover,
.flight-card a[href*="aviasales"]:hover,
.flight-card .book-outbound:hover,
.flight-card .book-inbound:hover {
  background: #174c7d !important;
  box-shadow: 0 8px 16px rgba(7,27,54,.18) !important;
  transform: translateY(-1px) !important;
}
@media (max-width:699px) {
  .flight-card { background-size: 52% 100% !important; }
  .flight-card::after { background: linear-gradient(90deg,rgba(255,255,255,.99) 0%,rgba(255,255,255,.94) 48%,rgba(255,255,255,.22) 100%) !important; }
  .flight-card > * { max-width: 70% !important; }
  .flight-card a[href*="travel"], .flight-card a[href*="aviasales"], .flight-card .book-outbound, .flight-card .book-inbound { width: 100% !important; }
}

/* СамЛечу: чистые карточки рейсов без фотографий. */
.flight-card {
  background: #fff !important;
  background-image: none !important;
  background-size: auto !important;
  background-position: initial !important;
  border: 1px solid #dbe4ee !important;
  border-left: 3px solid #d4a648 !important;
  border-radius: 16px !important;
  box-shadow: 0 7px 20px rgba(7,27,54,.08) !important;
  color: #102d4d !important;
}
.flight-card::after { content: none !important; display: none !important; }
.flight-card > * { max-width: none !important; }
.flight-card .flight-card-route { color: #102d4d !important; }
.flight-card .flight-card-price { color: #16734a !important; }
.flight-card a[href*="travel"],
.flight-card a[href*="aviasales"],
.flight-card .book-outbound,
.flight-card .book-inbound {
  width: min(100%, 240px) !important;
  min-height: 44px !important;
  margin-top: .72rem !important;
  border: 1px solid #c89c45 !important;
  border-radius: 11px !important;
  background: linear-gradient(135deg, #0d3459, #174a76) !important;
  box-shadow: 0 5px 12px rgba(7,27,54,.13) !important;
  color: #fff !important;
}
.flight-card a[href*="travel"]:hover,
.flight-card a[href*="aviasales"]:hover,
.flight-card .book-outbound:hover,
.flight-card .book-inbound:hover {
  background: #174c7d !important;
  box-shadow: 0 8px 16px rgba(7,27,54,.18) !important;
}

/* СамЛечу: компактные карточки городов на вкладке «Отели». */
.city-card-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: .75rem !important;
}
.city-card,
.city-card img {
  min-height: 174px !important;
  height: 174px !important;
}
.city-card-copy { right: .72rem !important; bottom: .68rem !important; left: .72rem !important; }
.city-card-copy strong { font-size: 1rem !important; }
.city-card-copy small { font-size: .7rem !important; }
@media (max-width: 980px) {
  .city-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 699px) {
  .city-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: .6rem !important; }
  .city-card, .city-card img { min-height: 155px !important; height: 155px !important; }
  .city-card-copy strong { font-size: .92rem !important; }
}

/* Расширение сайта до 1800px */
.container {
  width: 100%;
  max-width: 1800px !important;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

/* Шапка на всю ширину экрана */
.hero {
  width: 100%;
  max-width: none !important;
  box-sizing: border-box;
}

.hero > .container {
  max-width: 1800px !important;
  width: 100%;
}

/* Основные колонки занимают всю ширину контейнера */
main.container > div[style*="max-width:1800px"],
.offers-hub,
.offer-lanes,
.offer-source,
.assembled-routes,
.assembled-routes-list {
  width: 100%;
  max-width: 1800px !important;
  box-sizing: border-box;
}

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

/* Если фотография в шапке задана тегом img */
.hero img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: cover;
}

/* Если фотография является фоном шапки */
.hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 999px) {
  .offer-lanes {
    grid-template-columns: 1fr;
  }
}

/* Финальное исправление: фото самолёта на всю ширину шапки */
.hero {
  width: 100% !important;
  min-height: 460px !important;
  box-sizing: border-box !important;
  background:
    linear-gradient(90deg, rgba(5, 21, 43, .68), rgba(5, 21, 43, .16)),
    url('/static/img/hero-premium-airplane.webp') center center / cover no-repeat !important;
  background-attachment: scroll !important;
}

.hero::after {
  background: linear-gradient(90deg, rgba(5, 21, 43, .18), rgba(5, 21, 43, .04)) !important;
}

@media (max-width: 699px) {
  .hero {
    min-height: 430px !important;
    background-position: center center !important;
    background-size: cover !important;
  }
}


/* Показываем нижнюю часть самолёта и хвост без обрезания */
.hero {
  min-height: 540px !important;
  background-position: center bottom !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

@media (max-width: 699px) {
  .hero {
    min-height: 470px !important;
    background-position: center bottom !important;
    background-size: cover !important;
  }
}


/* Показываем самолёт целиком: без обрезания кабины и хвоста */
.hero {
  min-height: 540px !important;
  background-color: #071b36 !important;
  background-image:
    linear-gradient(90deg, rgba(5, 21, 43, .58), rgba(5, 21, 43, .12)),
    url('/static/img/hero-premium-airplane.webp') !important;
  background-size: 100% 100%, contain !important;
  background-position: center center, center bottom !important;
  background-repeat: no-repeat, no-repeat !important;
}

@media (max-width: 699px) {
  .hero {
    min-height: 470px !important;
    background-size: 100% 100%, contain !important;
    background-position: center center, center bottom !important;
  }
}


/* Фото полностью закрывает шапку без пустых полей по бокам */
.hero {
  background-color: transparent !important;
  background-image:
    linear-gradient(90deg, rgba(5, 21, 43, .45), rgba(5, 21, 43, .10)),
    url('/static/img/hero-premium-airplane.webp') !important;
  background-size: 100% 100%, 100% 100% !important;
  background-position: center center, center center !important;
  background-repeat: no-repeat, no-repeat !important;
}

@media (max-width: 699px) {
  .hero {
    background-size: 100% 100%, 100% 100% !important;
  }
}


/* Фото полностью закрывает шапку без пустых полей по бокам */
.hero {
  background-color: transparent !important;
  background-image:
    linear-gradient(90deg, rgba(5, 21, 43, .45), rgba(5, 21, 43, .10)),
    url('/static/img/hero-premium-airplane.webp') !important;
  background-size: 100% 100%, 100% 100% !important;
  background-position: center center, center center !important;
  background-repeat: no-repeat, no-repeat !important;
}

@media (max-width: 699px) {
  .hero {
    background-size: 100% 100%, 100% 100% !important;
  }
}


/* Финальный вариант без растяжения фотографии */
.hero {
  min-height: 620px !important;
  height: 620px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  background-color: #071b36 !important;
  background-image:
    linear-gradient(90deg, rgba(5, 21, 43, .48), rgba(5, 21, 43, .08)),
    url('/static/img/hero-premium-airplane.webp') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

.hero .container {
  min-height: 620px !important;
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

@media (max-width: 699px) {
  .hero {
    min-height: 520px !important;
    height: 520px !important;
  }

  .hero .container {
    min-height: 520px !important;
  }
}


/* Кнопка Telegram не растягивается на всю шапку */
.hero .telegram-hero-link {
  align-self: flex-start !important;
  width: fit-content !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* На телефоне кнопка остаётся удобной на всю ширину */
@media (max-width: 699px) {
  .hero .telegram-hero-link {
    align-self: stretch !important;
    width: 100% !important;
  }
}


/* Кнопка Telegram сразу под описанием и по центру */
.hero .telegram-hero-link {
  align-self: center !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* На телефоне также центрируем кнопку, но сохраняем удобную ширину */
@media (max-width: 699px) {
  .hero .telegram-hero-link {
    align-self: center !important;
    width: min(100%, 360px) !important;
  }
}


/* Поднимаем текст и кнопку выше относительно самолёта */
.hero .container {
  transform: translateY(-70px) !important;
}

@media (max-width: 699px) {
  .hero .container {
    transform: translateY(-45px) !important;
  }
}

