/* ==========================================================================
   Авиабилеты — страница поиска (шаг 0)
   Hero с иллюминатором, белая карточка поиска, ритм секций.
   Палитра бренда: #02122C (navy), #FCD32C (yellow), #35384B, #F7F7FA
   ========================================================================== */

.avia-page {
    --avp-navy: #02122C;
    --avp-navy-2: #0B1B3A;
    --avp-ink: #1C1B1B;
    --avp-yellow: #FCD32C;
    --avp-yellow-2: #FFDE4D;
    --avp-white: #FFFFFF;
    --avp-line: #E7E7EC;
    --avp-muted: #6B7280;
    --avp-radius: 8px;

    display: block;
    width: 100%;
    background: #FFFFFF;
    color: var(--avp-ink);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* Контейнер: контент 1130px + поля 20px */
.avia-page .avp-container {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------------------------------------------------------------
   1. Hero: тёмный «салон»
   -------------------------------------------------------------------------- */

.avp-hero {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 54px 0 0;
    overflow: visible;
    background:
        radial-gradient(120% 90% at 78% 30%, rgba(37, 99, 235, .28) 0%, rgba(2, 18, 44, 0) 58%),
        linear-gradient(160deg, #0a1a34 0%, #02122C 46%, #061733 100%);
    isolation: isolate;
}

/* Свечение от иллюминатора на стены салона */
.avp-hero__sky {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(46% 62% at 76% 42%, rgba(140, 190, 245, .22) 0%, rgba(140, 190, 245, 0) 70%),
        radial-gradient(30% 40% at 18% 14%, rgba(252, 211, 44, .10) 0%, rgba(252, 211, 44, 0) 72%);
}

.avp-hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

.avp-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    align-items: center;
    gap: 40px;
    padding-bottom: 40px;
}

.avp-hero__copy {
    max-width: 620px;
}

.avp-title {
    margin: 0;
    font-size: 44px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--avp-white);
    text-shadow: 0 2px 30px rgba(2, 18, 44, .45);
}

.avp-subtitle {
    margin: 14px 0 0;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 400;
    color: rgba(255, 255, 255, .8);
}

.avp-hero__points {
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 9px;
}

.avp-hero__points li {
    position: relative;
    padding-left: 26px;
    font-size: 14.5px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .78);
}

.avp-hero__points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(252, 211, 44, .18);
    box-shadow: inset 0 0 0 1.5px rgba(252, 211, 44, .9);
}

.avp-hero__points li::after {
    content: '';
    position: absolute;
    left: 4.5px;
    top: 9.5px;
    width: 6px;
    height: 3.5px;
    border-left: 1.6px solid var(--avp-yellow);
    border-bottom: 1.6px solid var(--avp-yellow);
    transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   1.1 Иллюминатор
   -------------------------------------------------------------------------- */

.avp-window {
    position: relative;
    justify-self: center;
    width: 100%;
    max-width: 460px;
    filter: drop-shadow(0 42px 60px rgba(0, 0, 0, .55));
}

.avp-window__frame {
    position: relative;
    padding: 26px;
    border-radius: 190px / 150px;
    background: linear-gradient(158deg, #f4f6f9 0%, #e3e8ef 42%, #cdd5e0 70%, #e8ecf2 100%);
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, .95),
        inset 0 -4px 10px rgba(94, 110, 132, .35),
        0 0 0 1px rgba(255, 255, 255, .5);
}

/* Внутренний борт окна */
.avp-window__frame::after {
    content: '';
    position: absolute;
    inset: 14px;
    border-radius: 176px / 136px;
    box-shadow:
        inset 0 6px 16px rgba(40, 55, 78, .45),
        inset 0 -2px 2px rgba(255, 255, 255, .5);
    pointer-events: none;
}

.avp-window__glass {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.28 / 1;
    border-radius: 164px / 124px;
    background: linear-gradient(180deg, #1f6fd0 0%, #4f97e3 38%, #9dc6ee 72%, #d9e9f8 100%);
    box-shadow: inset 0 0 40px rgba(10, 40, 90, .35);
}

.avp-window__sun {
    position: absolute;
    top: 12%;
    right: 18%;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: radial-gradient(circle, #fffbe8 0%, #ffe9a3 45%, rgba(255, 233, 163, 0) 72%);
    filter: blur(1px);
}

.avp-window__cloud {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    filter: blur(6px);
}

.avp-window__cloud--1 {
    left: -8%;
    bottom: 12%;
    width: 62%;
    height: 26%;
    box-shadow: 40px 8px 0 -4px rgba(255, 255, 255, .75), 90px -8px 0 -10px rgba(255, 255, 255, .6);
}

.avp-window__cloud--2 {
    right: -12%;
    bottom: 26%;
    width: 52%;
    height: 20%;
    opacity: .8;
    box-shadow: -50px 10px 0 -6px rgba(255, 255, 255, .7);
}

.avp-window__cloud--3 {
    left: 12%;
    top: 22%;
    width: 34%;
    height: 13%;
    opacity: .55;
    filter: blur(9px);
}

.avp-window__plane {
    position: absolute;
    left: 26%;
    top: 34%;
    width: 86px;
    height: 86px;
    color: rgba(255, 255, 255, .92);
    transform: rotate(-14deg);
    filter: drop-shadow(0 10px 18px rgba(10, 40, 90, .35));
    animation: avp-plane-float 9s ease-in-out infinite;
}

@keyframes avp-plane-float {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(-14deg); }
    50%      { transform: translate3d(-10px, -8px, 0) rotate(-11deg); }
}

.avp-window__glare {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(118deg, rgba(255, 255, 255, .42) 0%, rgba(255, 255, 255, .12) 26%, rgba(255, 255, 255, 0) 46%),
        radial-gradient(70% 50% at 22% 8%, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   2. Карточка поиска — наезжает на низ салона
   -------------------------------------------------------------------------- */

.avp-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1130px;
    margin: 0 auto -58px;
    padding: 24px 26px 26px;
    border: 1px solid var(--avp-line);
    border-radius: 16px;
    background: var(--avp-white);
    box-shadow: 0 30px 60px -26px rgba(2, 18, 44, .55), 0 2px 6px rgba(2, 18, 44, .06);
}

.avp-card__head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.avp-card__title {
    margin: 0;
    font-size: 19px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--avp-navy);
}

.avp-card__sub {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--avp-muted);
}

/* --------------------------------------------------------------------------
   3. Строка поиска
   -------------------------------------------------------------------------- */

.avp-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.avp-field {
    position: relative;
    min-width: 0;
}

.avp-field__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Специфичность повышена намеренно (.avia-page input.avp-input): на странице
   глобально подключается css/main.css, где есть правило
   input[type="text"] { height:29px; line-height:12px; padding:0 22% 0 6% },
   которое иначе перебивает размеры полей поиска. */
.avia-page input.avp-input {
    display: block;
    width: 100%;
    height: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-radius: var(--avp-radius);
    background: #F5F7FA;
    color: var(--avp-ink);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 48px;
    box-shadow: inset 0 0 0 1px #E3E8EF;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: box-shadow .18s ease, background .18s ease;
}

.avia-page input.avp-input::placeholder {
    color: #8A8F9A;
    font-weight: 400;
    opacity: 1;
}

.avia-page input.avp-input:hover {
    background: #FFFFFF;
    box-shadow: inset 0 0 0 1px #C9D3E0;
}

.avia-page input.avp-input:focus {
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(252, 211, 44, .85), inset 0 0 0 1px #C9D3E0;
}

.avia-page .avp-field--icon input.avp-input {
    padding-right: 42px;
}

.avp-field__icon {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    color: #8A8F9A;
    pointer-events: none;
}

/* Поле даты */
.avia-page .avp-field--date input.avp-input {
    padding-right: 42px;
    cursor: pointer;
}

.avp-field--date input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    opacity: 0;
    cursor: pointer;
}

.avp-field--date input[type="date"]::-webkit-datetime-edit {
    padding: 0;
}

.avp-field--date input[type="date"]::-webkit-inner-spin-button {
    display: none;
}

/* Кнопка */
.avia-page .avp-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    margin: 0;
    padding: 0 20px;
    border: 0;
    border-radius: var(--avp-radius);
    background: var(--avp-yellow);
    color: var(--avp-ink);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s ease, box-shadow .18s ease, transform .12s ease;
}

.avia-page .avp-submit:hover {
    background: var(--avp-yellow-2);
    box-shadow: 0 12px 26px -12px rgba(252, 211, 44, .95);
}

.avia-page .avp-submit:active {
    transform: translateY(1px);
}

.avia-page .avp-submit:disabled {
    opacity: .75;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.avia-page .avp-submit:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .75);
    outline-offset: 2px;
}

.avia-page .avp-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(28, 27, 27, .3);
    border-top-color: var(--avp-ink);
    border-radius: 50%;
    animation: avp-spin .7s linear infinite;
}

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

/* --------------------------------------------------------------------------
   3.1 Пассажиры
   -------------------------------------------------------------------------- */

.avia-page .avp-field--pax input.avp-input {
    padding-right: 42px;
    cursor: pointer;
}

.avp-pax {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 45;
    width: 300px;
    max-width: min(300px, calc(100vw - 32px));
    padding: 14px;
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 24px 56px -16px rgba(2, 18, 44, .5);
}

.avp-pax[hidden] {
    display: none;
}

.avp-pax__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid #EEF1F5;
}

.avp-pax__row:first-child {
    padding-top: 0;
}

.avp-pax__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.avp-pax__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--avp-ink);
}

.avp-pax__hint {
    font-size: 11.5px;
    color: #8A8F9A;
}

.avp-pax__ctl {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.avp-pax__btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #D9DEE7;
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--avp-ink);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.avp-pax__btn:hover:not(:disabled) {
    border-color: #9AA3B2;
    background: #F7F9FC;
}

.avp-pax__btn:disabled {
    opacity: .4;
    cursor: default;
}

.avp-pax__count {
    min-width: 26px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    color: var(--avp-ink);
}

.avp-pax__note {
    margin-top: 10px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #8A8F9A;
}

.avp-pax__done {
    width: 100%;
    height: 38px;
    margin-top: 12px;
    border: 0;
    border-radius: 8px;
    background: var(--avp-navy);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s ease;
}

.avp-pax__done:hover {
    opacity: .88;
}

/* --------------------------------------------------------------------------
   4. Автокомплит
   -------------------------------------------------------------------------- */

.avia-page .autocomplete-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    display: none;
    max-height: 316px;
    overflow-y: auto;
    padding: 6px;
    border-radius: 10px;
    background: #FFFFFF;
    box-shadow: 0 18px 44px -12px rgba(2, 18, 44, .45);
    overscroll-behavior: contain;
}

.avia-page .autocomplete-list.active {
    display: block;
}

.avia-page .autocomplete-item {
    padding: 10px 12px;
    border-radius: 7px;
    color: var(--avp-ink);
    font-size: 14px;
    line-height: 1.35;
    cursor: pointer;
    transition: background .12s ease;
}

.avia-page .autocomplete-item:hover,
.avia-page .autocomplete-item.active {
    background: #F4F6FA;
}

.avia-page .autocomplete-loading,
.avia-page .autocomplete-empty {
    padding: 12px;
    color: var(--avp-muted);
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   5. Быстрые направления и уведомления
   -------------------------------------------------------------------------- */

.avia-page .avp-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.avia-page .avp-quick__label {
    font-size: 13px;
    color: var(--avp-muted);
    margin-right: 2px;
}

.avia-page .avp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #E3E8EF;
    border-radius: 999px;
    background: #FFFFFF;
    color: #25313f;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .12s ease;
}

.avia-page .avp-chip:hover {
    background: #FFF8E1;
    border-color: var(--avp-yellow);
}

.avia-page .avp-chip:active {
    transform: translateY(1px);
}

.avia-page .avp-notice {
    display: none;
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: 9px;
    background: #FFF6F6;
    border-left: 3px solid #D64545;
    color: #7A1B1B;
    font-size: 13.5px;
    line-height: 1.4;
}

.avia-page .avp-notice.is-visible {
    display: block;
}

/* --------------------------------------------------------------------------
   6. Секции: ритм и плотность
   -------------------------------------------------------------------------- */

.avp-section {
    padding: 40px 0 40px;
}

/* Полосатая подложка: белый → светло-серый → белый */
.avp-section--tint {
    background: #F0F4F9;
    border-top: 1px solid #E3EAF3;
    border-bottom: 1px solid #E3EAF3;
}

.avp-section--tint + .avp-section {
    padding-top: 40px;
}

/* Карточка наезжает на низ салона — первой секции нужен запас */
.avp-hero + .avp-section {
    padding-top: 104px;
    padding-bottom: 40px;
}

.avp-section:last-child {
    padding-bottom: 52px;
}

.avp-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.avp-h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--avp-navy);
}

.avp-section__link {
    flex: 0 0 auto;
    color: #6B7280;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
}

/* Карточки направлений */
.avp-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
    gap: 14px;
}

.avp-route-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 124px;
    padding: 18px;
    border: 1px solid #DCE3EC;
    border-radius: 12px;
    background: #F8FAFC;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(2, 18, 44, .04);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.avp-route-card:hover {
    border-color: #2F6BD6;
    background: #FFFFFF;
    box-shadow: 0 18px 34px -20px rgba(2, 18, 44, .5);
    transform: translateY(-2px);
    text-decoration: none;
}

.avp-route-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .13;
    pointer-events: none;
}

.avp-route-card__top {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--avp-navy);
}

.avp-route-card__arrow {
    color: #9AA3B2;
    font-weight: 400;
}

.avp-route-card__bottom {
    position: relative;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.avp-route-card__price {
    font-size: 16px;
    font-weight: 700;
    color: var(--avp-ink);
}

.avp-route-card__cta {
    font-size: 13px;
    font-weight: 600;
    color: #2563EB;
}

/* Преимущества */
.avp-adv {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.avp-adv__item {
    padding: 20px 18px;
    border: 1px solid #E1E7F0;
    border-radius: 12px;
    background: #FFFFFF;
    box-shadow: 0 2px 6px rgba(2, 18, 44, .05);
}

.avp-adv__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    border-radius: 11px;
    background: rgba(252, 211, 44, .32);
    color: var(--avp-navy);
    font-size: 18px;
}

.avp-adv__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--avp-navy);
}

.avp-adv__text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--avp-muted);
}

/* FAQ */
.avp-faq {
    display: grid;
    gap: 10px;
    max-width: 900px;
}

.avp-faq__item {
    border: 1px solid #DCE3EC;
    border-radius: 10px;
    background: #FFFFFF;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(2, 18, 44, .04);
    transition: border-color .16s ease, box-shadow .16s ease;
}

.avp-faq__item:hover {
    border-color: #B9C6D8;
    box-shadow: 0 8px 20px -14px rgba(2, 18, 44, .45);
}

.avp-faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 600;
    color: var(--avp-navy);
    cursor: pointer;
    list-style: none;
}

.avp-faq__item summary::-webkit-details-marker {
    display: none;
}

.avp-faq__item summary::after {
    content: '+';
    flex: 0 0 auto;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    color: #9AA3B2;
    transition: transform .18s ease;
}

.avp-faq__item[open] summary::after {
    transform: rotate(45deg);
}

.avp-faq__body {
    padding: 0 18px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #4B5563;
}

/* SEO */
.avp-seo {
    padding-top: 46px;
    background: #FAFBFD;
    border-top: 1px solid #EEF2F7;
}

.avp-seo__title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--avp-navy);
}

.avp-seo__cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 32px;
}

.avp-seo__cols p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.65;
    color: #4B5563;
}

/* --------------------------------------------------------------------------
   7. Адаптив
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
    .avp-adv {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .avp-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .avp-row .avp-submit {
        grid-column: 1 / -1;
    }

    .avp-pax {
        right: auto;
        left: 0;
    }

    .avp-hero__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        padding-bottom: 34px;
    }

    .avp-hero__copy {
        max-width: none;
    }

    .avp-window {
        max-width: 360px;
        justify-self: start;
    }

    .avp-title {
        font-size: 38px;
    }

    .avp-seo__cols {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    .avp-hero {
        padding-top: 40px;
    }

    .avp-hero__grid {
        padding-bottom: 26px;
    }

    .avp-title {
        font-size: 30px;
    }

    .avp-subtitle {
        font-size: 15px;
    }

    .avp-hero__points {
        margin-top: 16px;
        gap: 7px;
    }

    .avp-window {
        max-width: 300px;
        margin: 0 auto;
        justify-self: center;
    }

    .avp-window__frame {
        padding: 20px;
        border-radius: 150px / 120px;
    }

    .avp-window__frame::after {
        inset: 11px;
        border-radius: 140px / 110px;
    }

    .avp-window__glass {
        border-radius: 130px / 100px;
    }

    .avp-card {
        margin-bottom: -44px;
    }

    .avp-hero + .avp-section {
        padding-top: 84px;
    }

    .avp-h2 {
        font-size: 21px;
    }
}

@media (max-width: 640px) {
    .avia-page .avp-container {
        padding: 0 16px;
    }

    .avp-card {
        padding: 18px;
        border-radius: 12px;
    }

    .avp-card__title {
        font-size: 17px;
    }

    .avp-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        margin-top: 18px;
    }

    .avp-pax {
        position: absolute;
        left: 0;
        right: 0;
        width: auto;
    }

    .avp-section {
        padding-top: 40px;
    }

    .avp-section__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .avp-adv {
        grid-template-columns: minmax(0, 1fr);
    }

    .avp-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .avp-quick__label {
        width: 100%;
    }

    .avp-section:last-child {
        padding-bottom: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .avia-page *,
    .avia-page *::before,
    .avia-page *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

/* ==========================================================================
   ДИЗАЙН КАК У РЖД: цветной блок → заголовок → «стеклянная» карточка
   с белой строкой полей и жёлтой кнопкой
   ========================================================================== */

.avia-page {
    --avp-deep: #0C73FE;
    --avp-deep-2: #0C73FE;
    --avp-ink: #1C1B1B;
    --avp-muted: #767D89;
    --avp-line: #E5E7EB;
    --avp-yellow: #FCD32C;
}

.avia-page,
.avia-page input,
.avia-page select,
.avia-page button {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Inter', Roboto, Arial, sans-serif;
}

/* --- цветной блок --- */
.avp-hero {
    display: block !important;
    padding: 22px 0 30px !important;
    /* как у aviasales.ru: ровный синий #0C73FE без градиента */
    background: #0C73FE !important;
    overflow: visible !important;
    isolation: auto !important;
}

.avp-hero__sky,
.avp-hero__inner,
.avp-hero__grid,
.avp-hero__copy,
.avp-window,
.avp-title,
.avp-subtitle,
.avp-hero__points { display: none !important; }

.avp-hero__h1 {
    margin: 0 0 18px;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    color: #fff;
}

/* --- стеклянная карточка --- */
.avp-search-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 24px;
    border-radius: 8px;
    background: transparent;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    --control-height: 48px;
}

.avp-search-head { margin-bottom: 14px; }

.avp-search-title { font-size: 21px; font-weight: 700; line-height: 1.3; color: #fff; }
.avp-search-sub { margin-top: 3px; font-size: 12.5px; line-height: 1.3; color: rgba(255, 255, 255, .82); }

/* --- строка полей --- */
/* «Змейка»: поля и кнопка — равные ячейки, которые сами переносятся.
   Чем шире экран, тем больше ячеек в строке, вплоть до одной строки. */
.avp-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: flex-end;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.avp-input-field {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 140px;
    min-width: 0;
}

.avp-input-field > label {
    position: static !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 0 5px !important;
    padding: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: nowrap !important;
    border: 0 !important;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #FFFFFF;
}

.avia-page .avp-input-field .avp-input-figma,
.avia-page input.avp-input-figma {
    display: block;
    width: 100%;
    height: var(--control-height, 48px) !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0 14px !important;
    border: 0;
    border-radius: 11px;
    background: #FFFFFF !important;
    box-shadow: none !important;
    font-size: 14px;
    font-weight: 600;
    color: var(--avp-ink);
    line-height: var(--control-height, 48px);
    outline: none;
}

.avia-page .avp-input-field .avp-input-figma:focus,
.avia-page input.avp-input-figma:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .35) !important;
}

.avia-page input.avp-input-figma::placeholder { color: #9AA1AC; font-weight: 400; }
.avia-page .avp-input-figma[readonly] { cursor: pointer; }

.avia-page input.avp-input-figma[type="date"] { -webkit-appearance: none; appearance: none; }
.avia-page input.avp-input-figma[type="date"]::-webkit-datetime-edit { padding: 0; font: inherit; color: inherit; }
.avia-page input.avp-input-figma[type="date"]::-webkit-calendar-picker-indicator {
    margin: 0; padding: 0; width: 16px; height: 16px; opacity: .45; cursor: pointer;
}
.avia-page input.avp-input-figma[type="date"]::-webkit-inner-spin-button { display: none; }

.avia-page #avia-pax-label {
    padding-right: 34px !important;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.avia-page #avia-pax-field::after {
    content: '⌄';
    position: absolute;
    right: 14px;
    bottom: 15px;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    color: var(--avp-ink);
    pointer-events: none;
}

/* --- кнопка --- */
.avp-submit-btn {
    flex: 1 1 140px;
    min-width: 0;
    height: var(--control-height, 48px);
    padding: 0 12px;
    border: 0;
    border-radius: 11px;
    background: var(--avp-yellow);
    color: var(--avp-ink);
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.avp-submit-btn:hover { background: #EFC400; }
.avp-submit-btn:disabled { opacity: .7; cursor: default; }

/* --- подсказки городов --- */
.avia-page .autocomplete-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 300px;
    overflow: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(9, 20, 40, .22);
    display: none;
}

.avia-page .autocomplete-list.active { display: block; }

/* --- пассажиры --- */
.avp-pax {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 280px;
    z-index: 45;
    padding: 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(9, 20, 40, .24);
    color: var(--avp-ink);
}

.avp-pax__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 0; }
.avp-pax__title { display: block; font-size: 14px; font-weight: 600; }
.avp-pax__hint { display: block; font-size: 11.5px; color: var(--avp-muted); }
.avp-pax__ctl { display: flex; align-items: center; gap: 10px; }
.avp-pax__btn { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--avp-line); background: #fff; cursor: pointer; font-size: 17px; line-height: 1; color: var(--avp-ink); }
.avp-pax__count { min-width: 16px; text-align: center; font-size: 14px; font-weight: 700; }
.avp-pax__note { margin-top: 10px; font-size: 11.5px; color: var(--avp-muted); }
.avp-pax__done { width: 100%; height: 38px; margin-top: 10px; border: 0; border-radius: 8px; background: var(--avp-yellow); color: var(--avp-ink); font-weight: 800; font-size: 13.5px; cursor: pointer; }

/* --- популярное --- */
.avp-quick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.avp-quick__label { font-size: 12px; color: rgba(255, 255, 255, .72); }

.avp-chip {
    padding: 6px 11px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
}

.avp-chip:hover { background: rgba(255, 255, 255, .2); }

.avp-notice { flex: 1 1 100%; font-size: 12.5px; color: #FFD9D9; }
.avp-notice:empty { display: none; }

/* Планшеты (iPad портрет/ландшафт до 1000px): два поля в ряд,
   кнопка — компактная, слева, а не жёлтая плита на всю ширину */
/* от планшета и шире кнопка не растягивается, а идёт компактной */
@media (min-width: 641px) {
    .avp-submit-btn { flex: 0 0 auto; padding: 0 24px; }
}

@media (max-width: 999px) {
    .avp-input-field { flex: 1 1 135px; }
    .avp-search-card { padding: 18px; }
    .avp-search-title { font-size: 19px; }
}

@media (max-width: 640px) {
    .avp-hero { padding: 16px 0 22px !important; }

    /* контейнер и карточка строго по ширине экрана */
    .avp-hero .avp-container {
        padding-left: 14px !important;
        padding-right: 14px !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .avp-search-card {
        padding: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    .avp-hero__h1 { font-size: 19px; margin-bottom: 12px; }
    .avp-search-title { font-size: 17px; }
    .avp-search-sub { font-size: 11.5px; }

    /* змейка: на телефоне две ячейки в ряд */
    .avp-search-form { gap: 8px; }
    .avp-input-field { flex: 1 1 125px; }
    .avp-submit-btn { flex: 1 1 125px; }

    .avp-input-field > label {
        white-space: normal !important;
        font-size: 9.5px !important;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .avia-page .avp-input-figma {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 10px !important;
        font-size: 13px !important;
        height: 46px !important;
        line-height: 46px !important;
    }

    .avp-submit-btn {
        width: auto !important;
        max-width: 100% !important;
        height: 46px;
    }

    .avp-pax { min-width: 0 !important; width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
    .avp-quick { max-width: 100% !important; }
    .avp-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ==========================================================================
   Выпадающие элементы (пассажиры, подсказки городов) не должны обрезаться
   и уходить под секции «Популярные направления» — как у РЖД.
   ========================================================================== */

.avp-hero { overflow: visible !important; }

.avp-search-card {
    position: relative !important;
    z-index: 30;
}

.avp-pax,
.avp-ac,
.avia-page .autocomplete-list {
    z-index: 1000 !important;
}

.avp-section { position: relative; z-index: 1; }

/* Заголовок списка подсказок («Популярные города») */
.autocomplete-head {
    padding: 8px 14px 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #8B93A1;
    border-bottom: 1px solid #F1F4F8;
}

/* ==========================================================================
   Календарь выбора даты — как у автобусов, в оформлении авиа
   ========================================================================== */

.avp-input-field--date { position: relative; }

.avp-cal {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 1000;
    width: 300px;
    padding: 12px;
    border-radius: 14px;
    background: #FFFFFF;
    border: 1px solid #E6E9EF;
    box-shadow: 0 20px 50px rgba(12, 40, 90, .18);
    display: none;
}

.avp-cal.is-open { display: block; }

.avp-cal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #1D1E20;
}

.avp-cal__nav { display: flex; gap: 6px; }

.avp-cal__nav button {
    width: 28px;
    height: 28px;
    border: 1px solid #E6E9EF;
    border-radius: 8px;
    background: #F5F7FA;
    color: #1D1E20;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.avp-cal__nav button:hover { background: #EAF1FF; border-color: #0C73FE; color: #0C73FE; }

.avp-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.avp-cal__dow {
    font-size: 11px;
    color: #93A0AF;
    text-align: center;
    padding: 3px 0;
}

.avp-cal__day {
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: none;
    font-family: inherit;
    font-size: 13px;
    color: #1D1E20;
    cursor: pointer;
}

.avp-cal__day:hover:not(:disabled) { background: #EAF1FF; }
.avp-cal__day.is-selected { background: #0C73FE; color: #fff; font-weight: 700; }
.avp-cal__day.is-today { box-shadow: inset 0 0 0 1px #0C73FE; }
.avp-cal__day:disabled { color: #C3CBD6; cursor: default; }

.avp-cal__foot { display: flex; gap: 6px; margin-top: 10px; }

.avp-cal__foot button {
    flex: 1;
    height: 30px;
    border: 1px solid #E6E9EF;
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 12px;
    color: #1D1E20;
    cursor: pointer;
}

.avp-cal__foot button:hover { border-color: #0C73FE; color: #0C73FE; }

@media (max-width: 640px) {
    .avp-cal { width: 100%; left: 0; right: auto; }
}

/* ==========================================================================
   Глобальный services.css сайта скрывает все <aside> (aside{display:none}).
   В шагах авиа правая колонка свёрстана как <aside> — возвращаем её.
   ========================================================================== */

.avia-page aside,
.avia-page .avr-side,
.avia-page .avt-side,
.avia-page .avpg-side,
.avia-page .avpay-side,
.avia-page .avtk-side {
    display: block !important;
}
