/* Оформление старого airlinecoop.org (шаблон 2023 года) без jQuery-виджетов и неиспользуемых правил */

@font-face {
  font-family: "ProximaNova";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/proxima-nova-regular-4beaa96a.woff2") format("woff2");
}

@font-face {
  font-family: "ProximaNova";
  font-weight: 700;
  font-display: swap;
  src: url("/assets/proxima-nova-bold-bb2cfa0e.woff2") format("woff2");
}

@font-face {
  font-family: "Prompt";
  font-weight: 400;
  font-display: swap;
  src: url("/assets/prompt-regular-d5e8156c.woff2") format("woff2");
}

:root {
  --text: #000;
  --accent: #416a8c;
  --gray: #f2f2f2;
  --font: "ProximaNova", Arial, sans-serif;
  --font-logo: "Prompt", Arial, sans-serif;
  --font-size: 18px;
  --title-size: 36px;
  --sidebar: 255px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--accent) #ccc; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font: var(--font-size)/1.25 var(--font);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; }

a { color: inherit; }

button, input, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

:focus-visible { outline: 2px solid #fdd835; outline-offset: 2px; }

::selection { color: #fff; background: var(--accent); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.container { width: 100%; max-width: 1158px; margin: 0 auto; padding: 0 24px; }

/* Логотип в шапке и подвале */

.logo { display: flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.logo__text { display: flex; flex-direction: column; }
.logo__name { font: 29px/1 var(--font-logo); }
.logo__tagline { font-size: 11px; line-height: 1; }

/* Шапка */

.header { padding: 8px 0 19px; }
.header__inner { display: flex; align-items: center; justify-content: space-between; }
.header .logo__image { width: 61px; }
.header__nav { display: flex; gap: 36px; }
.header__nav a { font-size: 16px; line-height: 19px; text-decoration: none; transition: color .2s linear; }
.header__nav a:hover, .header__nav a.is-active { color: var(--accent); }

.header__menu-button {
  display: none;
  width: 34px;
  height: 29px;
  margin-right: -8px;
  padding: 8px;
  border: 0;
  color: var(--accent);
  background: none;
}

.header__menu-button span:first-child,
.header__menu-button span:first-child::before,
.header__menu-button span:first-child::after {
  display: block;
  width: 18px;
  height: 3px;
  border-radius: 3px;
  background: currentColor;
  transition: .2s linear;
}

.header__menu-button span:first-child { position: relative; }
.header__menu-button span:first-child::before,
.header__menu-button span:first-child::after { content: ""; position: absolute; left: 0; }
.header__menu-button span:first-child::before { top: -5px; }
.header__menu-button span:first-child::after { top: 5px; }
.header__menu-button[aria-expanded="true"] span:first-child { background: transparent; }
.header__menu-button[aria-expanded="true"] span:first-child::before { top: 0; transform: rotate(45deg); }
.header__menu-button[aria-expanded="true"] span:first-child::after { top: 0; transform: rotate(-45deg); }

/* Крошки */

.breadcrumbs { position: relative; z-index: 0; margin-bottom: 28px; padding: 8px 0; color: var(--accent); font-size: 16px; line-height: 22px; }
.breadcrumbs::before { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .5; background: url("/assets/bg-breadcrumbs-6a7a26ec.webp") center / cover; }
.breadcrumbs__list { margin-block: 0; list-style: none; }
.breadcrumbs__list li { display: inline; }
.breadcrumbs__list li + li::before { content: "/"; margin: 0 6px; color: #666; }
.breadcrumbs__list a { color: var(--text); text-decoration: none; transition: color .2s linear; }
.breadcrumbs__list a:hover { color: var(--accent); }

/* Заголовки и текст */

.page-title { margin: 0 0 28px; font-size: var(--title-size); font-weight: 400; line-height: calc(100% + 8px); }

.prose { line-height: calc(1em + 4px); }
.prose > * { margin: 0 0 calc(var(--font-size) + 4px); }
.prose > :last-child { margin-bottom: 0; }
.prose h1 { font-size: 2em; line-height: 1.2; }
.prose h2 { font-size: 1.4em; line-height: 1.25; }

.about { margin-block: 30px; }

/* Главная: поиск билетов */

.hero { position: relative; z-index: 0; padding: 45px 0; background: #ddd; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .4; background: url("/assets/bg-search-3e721c64.webp") center / cover; }
.hero__title { margin: 0 0 24px; font-size: var(--title-size); line-height: calc(100% + 8px); text-align: center; }

.search {
  display: grid;
  grid-template-columns: 20fr 20fr 13.5fr 13.5fr 13fr 15fr;
  align-items: end;
  gap: 10px;
  padding: 20px 15px 30px;
  border-radius: 3px;
  color: #424242;
  background: rgb(16 41 117 / .42);
  font: 14px/1 Arial, sans-serif;
}

.search__field { position: relative; min-width: 0; }
.search__field label, .search__label { display: block; margin-bottom: 8px; color: #fff; font-size: 12px; }

.search__input {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 12px;
  border: 1px solid #fff;
  border-radius: 3px;
  background: #fff;
  font-size: 14px;
  text-align: left;
}

.search__input:focus, .search__input[aria-expanded="true"] { border-color: #fdd835; outline: none; }
.search__field--place .search__input { padding-right: 46px; text-overflow: ellipsis; }
.search__field--date .search__input { padding-right: 6px; }

.search__code { position: absolute; right: 10px; bottom: 0; color: #999; font-size: 12px; line-height: 50px; pointer-events: none; }

.search__options {
  position: absolute;
  z-index: 99;
  top: 100%;
  left: 0;
  width: max(100%, 280px);
  max-height: 315px;
  margin: 1px 0 0;
  padding: 0;
  overflow-y: auto;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 0 15px rgb(0 0 0 / .3);
  list-style: none;
}

.search__options li { display: flex; justify-content: space-between; gap: 12px; padding: 12px; line-height: 1.3; cursor: pointer; }
.search__options li span { color: #999; font-size: 12px; }
.search__options li:hover, .search__options li[aria-selected="true"] { background: #f5f5f5; }

/* Крестик «обратный билет не нужен» в строке подписи: внутри поля его перекрыл бы значок календаря браузера */
.search__clear {
  position: absolute;
  top: -5px;
  right: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  color: #fff;
  background: none;
  font-size: 20px;
  line-height: 1;
}

.search__clear:hover { color: #fdd835; }

.search__passengers { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding-right: 28px; }
.search__passengers span, .search__passengers small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search__passengers small { color: #999; font-size: 13px; }
.search__passengers::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 22px;
  width: 8px;
  height: 8px;
  border: solid #2175dc;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform .2s;
}

.search__passengers[aria-expanded="true"] { border-color: #fdd835; }
.search__passengers[aria-expanded="true"]::after { bottom: 18px; transform: rotate(-135deg); }

.search__popover {
  position: absolute;
  z-index: 999;
  top: 100%;
  left: 0;
  width: 270px;
  margin-top: 1px;
  padding: 7px 0 20px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 0 15px rgb(0 0 0 / .3);
}

.search__counter { display: grid; grid-template-columns: 1fr 35px 30px 35px; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px 0 20px; }
.search__counter button { width: 35px; height: 35px; padding: 0; border: 1px solid #cfd8dc; border-radius: 50%; color: #2175dc; background: #fff; font-size: 18px; line-height: 1; }
.search__counter button:hover { border-color: #2175dc; }
.search__counter input { width: 100%; padding: 0; border: 0; background: none; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.search__counter input::-webkit-inner-spin-button, .search__counter input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.search__business { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-top: 1px solid #e0e0e0; cursor: pointer; }
.search__business input { width: 16px; height: 16px; margin: 0; accent-color: #1a51ac; }

.search__done {
  display: block;
  margin: 5px auto 0;
  padding: 0 30px;
  border: 1px solid #ac1a58;
  border-radius: 40px;
  color: #ac1a58;
  background: #fff;
  font-size: 13px;
  line-height: 43px;
}

.search__submit {
  height: 50px;
  border: 0;
  border-radius: 3px;
  color: #fff;
  background: linear-gradient(90deg, #2175dc, #0ea7ff);
  box-shadow: 0 4px 2px rgb(0 0 0 / .18);
  font-size: 15px;
  font-weight: 600;
}

/* Значок-самолётик перед словом Search */
.search__submit::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 6px;
  vertical-align: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M2 10.6 22 2l-8.6 20-2.6-8.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Главная: последние статьи */

.latest { position: relative; z-index: 0; overflow: hidden; padding: 76px 0 89px; background: var(--gray); }
.latest::before { content: ""; position: absolute; z-index: -1; bottom: -27px; left: 50%; width: 1419px; height: 569px; margin-left: -1240px; background: url("/assets/bg-articles-c68264a3.webp") center / cover no-repeat; }

.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-head__title { margin: 0; font-size: var(--title-size); font-weight: 400; line-height: calc(var(--title-size) + 8px); }

/* Ссылка «Show all» с линией-украшением слева, как в шаблоне */
.section-head__link { position: relative; padding-left: 199px; color: var(--accent); font-size: 16px; line-height: 19px; text-decoration: none; }
.section-head__link::before { content: ""; position: absolute; top: 50%; left: 0; width: 186px; height: 1px; background: var(--text); }
.section-head__link::after { content: ""; position: absolute; top: calc(50% - 1px); left: 149px; width: 37px; height: 3px; background: var(--accent); }

.cards, .article-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }

.card { position: relative; padding: 12px 9px 24px; background: #fff; }
.article-list .card { padding: 24px 16px 32px; background: var(--gray); }
.card__title { margin: 0; font-size: 22px; line-height: 27px; }
.card__title a { text-decoration: none; border-bottom: 1px solid var(--accent); }
.card__title a:hover { color: var(--accent); }
.card__summary { margin: 4px 0 0; line-height: calc(1em + 4px); }

/* Линия-украшение в правом нижнем углу карточки */
.card::after { content: ""; position: absolute; right: 0; bottom: 0; width: 95px; height: 1px; background: var(--text); }
.card::before { content: ""; position: absolute; z-index: 1; right: 0; bottom: -1px; width: 37px; height: 3px; background: var(--accent); }

/* Внутренние страницы: текст и колонка со статьями */

.layout { display: flex; justify-content: space-between; align-items: flex-start; gap: 31px; margin-bottom: 52px; }
.layout__main { flex: 1; min-width: 0; }
.layout__aside { flex: 0 0 var(--sidebar); }

.sidebar { padding: 16px 12px; background: var(--gray); }
.sidebar__title { margin: 0 0 16px; font-size: 24px; font-weight: 400; line-height: 29px; }
.sidebar .card { padding: 0 0 20px; background: none; }
.sidebar .card + .card { margin-top: 20px; }
.sidebar .card__title { font-size: 18px; line-height: 23px; }

.article-list { margin-bottom: 52px; }

/* Контакты */

.form__field { margin-bottom: 24px; }

.form input[type="text"], .form input[type="email"], .form textarea {
  display: block;
  width: 100%;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  font-size: var(--font-size);
  font-weight: 500;
  transition: border-color .2s linear;
}

.form input[type="text"], .form input[type="email"] { height: 44px; padding: 0 20px; }
.form textarea { height: 138px; padding: 11px 20px; resize: vertical; }
.form ::placeholder { color: #000; opacity: 1; }
.form input:focus, .form textarea:focus { border-color: var(--accent); outline: none; }
.form__submit { display: block; width: 100%; padding: 12px 24px; border: 0; color: #fff; background: #000; transition: background .2s linear; }
.form__submit:hover { background: var(--accent); }
.form__errors { margin-bottom: 24px; color: #c00; }
.form__errors p { margin: 0 0 4px; }
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice { margin: 0 0 24px; color: green; }

.not-found { margin-block: 40px 60px; }

/* Подвал */

.footer { padding: 35px 0 26px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 40px; }
.footer .logo { margin-right: auto; }
.footer .logo__image { width: 128px; }
.footer__links { display: flex; gap: 40px; font-size: 16px; line-height: 24px; }
.footer__links a { text-decoration: none; transition: color .2s linear; }
.footer__links a:hover { color: var(--accent); }

.footer__copyright { position: relative; margin: 0 0 0 auto; font-size: 14px; line-height: 17px; }
.footer__copyright::after { content: ""; position: absolute; right: 0; bottom: -21px; width: 95px; height: 1px; background: linear-gradient(90deg, var(--text) 58px, var(--accent) 0); }

/* Плашка о cookies */

.cookies { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; padding: 20px 10px; border-top: 2px solid #830e0e; background: #f7dede; }
.cookies[hidden] { display: none; }
.cookies__inner { display: flex; align-items: center; gap: 20px; }
.cookies__text { flex: 1; }
.cookies__text p { margin: 0 0 15px; }
.cookies__text p:last-child { margin: 0; }
.cookies__buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.cookies__buttons button { padding: 8px 10px; border: 0; border-radius: 5px; color: #fff; background: #b23427; font-size: 15px; }

/* Адаптивность: точки перелома шаблона */

@media (max-width: 1170px) {
  .search { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .search__field--place { grid-column: span 6; }
  .search__field--date { grid-column: span 3; }
  .search__field--passengers { grid-column: span 3; }
  .search__submit { grid-column: span 3; }
}

@media (max-width: 1157px) {
  :root { --font-size: 16px; --title-size: 32px; --sidebar: 240px; }
  .layout { gap: 24px; }
  .breadcrumbs { font-size: 15px; line-height: 21px; }
  .hero { padding: 80px 0; }
  .latest { padding: 60px 0; }
  .cards, .article-list { gap: 24px; }
  .card__title { font-size: 20px; line-height: 24px; }
  .section-head__link { padding-left: 108px; }
  .section-head__link::before { width: 92px; }
  .section-head__link::after { left: 55px; }
}

@media (max-width: 1023px) {
  :root { --font-size: 15px; --title-size: 30px; }
  .header { padding: 8px 0 12px; }
  .header__menu-button { display: flex; align-items: center; justify-content: center; }
  .header__nav {
    position: fixed;
    z-index: 101;
    top: 52px;
    right: 0;
    flex-direction: column;
    gap: 0;
    width: 240px;
    padding: 24px;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 10px 30px rgb(0 0 0 / .3);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .3s linear, visibility .3s;
  }
  .header__nav.is-open { transform: translateX(-24px); visibility: visible; }
  .header__nav a { font-size: 17px; line-height: 33px; text-align: right; }
  .layout { flex-direction: column; align-items: stretch; gap: 40px; }
  .layout__aside { flex-basis: auto; }
  .sidebar { padding: 20px; }
  .hero { padding: 60px 0; }
  .latest { padding: 52px 0; }
  .cards, .article-list { gap: 20px; }
  .card__title { font-size: 19px; line-height: 23px; }
  .section-head__link { width: 100%; margin-top: 12px; }
}

@media (max-width: 767px) {
  :root { --font-size: 14px; --title-size: 26px; }
  .breadcrumbs { margin-bottom: 24px; font-size: 14px; line-height: 18px; }
  .hero { padding: 48px 0; }
  .hero__title { margin-bottom: 20px; }
  .search__field--place, .search__field--passengers { grid-column: span 12; }
  .search__field--date { grid-column: span 6; }
  .search__submit { grid-column: span 12; margin-top: 4px; }
  .cards, .article-list { grid-template-columns: minmax(0, 1fr); }
  .article-list .card { margin-inline: -24px; }
  .footer__inner { justify-content: center; text-align: center; }
  .footer .logo { order: 3; margin-right: 0; }
  .footer__links { order: 2; }
  .footer__copyright { order: 1; width: 100%; margin: 0; }
  .footer__copyright::after { display: none; }
  .cookies__inner { flex-direction: column; text-align: center; }
  .cookies__buttons { justify-content: center; }
}

@media (max-width: 479px) {
  .search { padding: 15px 12px 20px; }
  .logo__name { font-size: 24px; }
}
