:root {
    --tour-blue: #1757d8;
    --tour-blue-dark: #0f3eaa;
    --tour-blue-soft: #edf4ff;
    --tour-orange: #ff971c;
    --tour-text: #182235;
    --tour-muted: #758198;
    --tour-line: #dbe4f1;
    --tour-bg: #f4f7fb;
    --tour-white: #fff;
    --tour-radius: 22px;
    --tour-shadow: 0 28px 80px rgba(19, 40, 82, .22);
}

.tour-picker,
.tour-picker * { box-sizing: border-box; }
.tour-picker button,
.tour-picker input,
.tour-picker select,
.tour-picker textarea { font: inherit; }
.tour-picker button { cursor: pointer; }
.tour-picker { color: var(--tour-text); }

.tour-picker__heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 42px;
    align-items: end;
    margin-bottom: 28px;
}
.tour-picker__eyebrow {
    display: inline-flex;
    margin-bottom: 9px;
    color: var(--tour-blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.tour-picker__heading h2 {
    margin: 0;
    font-size: clamp(28px, 3.2vw, 46px);
    line-height: 1.08;
    letter-spacing: -.03em;
}
.tour-picker__heading p {
    margin: 0;
    color: var(--tour-muted);
    font-size: 16px;
    line-height: 1.55;
}

.tour-picker__featured {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px;
}
.tour-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--tour-radius);
    background: #24334a;
    isolation: isolate;
    outline: none;
    transform: translateZ(0);
}
.tour-card--large { grid-column: span 4; min-height: 410px; }
.tour-card--small { grid-column: span 3; min-height: 210px; }
.tour-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(10, 19, 36, .02) 25%, rgba(10, 19, 36, .84) 100%);
    transition: background .35s ease;
}
.tour-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: var(--tour-image);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: transform .65s cubic-bezier(.2,.7,.2,1);
}
.tour-card:hover::after,
.tour-card:focus-visible::after { transform: scale(1.055); }
.tour-card:hover::before,
.tour-card:focus-visible::before { background: linear-gradient(180deg, rgba(10, 19, 36, .05) 20%, rgba(10, 19, 36, .9) 100%); }
.tour-card__content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 46%;
    padding: 28px;
    color: #fff;
}
.tour-card--small .tour-card__content { padding: 24px; }
.tour-picker button.tour-card__title {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.1;
    text-align: left;
    text-shadow: 0 2px 18px rgba(0,0,0,.28);
}
.tour-card--small .tour-card__title { font-size: 22px; }
.tour-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 16px;
}
.tour-card__links button {
    padding: 0 0 3px;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.35);
    background: none;
    color: #fff;
    font-size: 15px;
    line-height: 1.35;
    transition: border-color .2s ease, opacity .2s ease;
}
.tour-card__links button:hover { border-color: #fff; opacity: .82; }

.tour-regions {
    position: relative;
    height: 170px;
    margin-top: 34px;
    overflow: hidden;
    transition: height .55s cubic-bezier(.2,.7,.2,1);
}
.tour-regions__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 30px;
}
.tour-picker button.tour-region-link {
    position: relative;
    display: flex;
    align-items: flex-start;
    min-width: 0;
    padding: 0 0 0 17px;
    border: 0;
    background: none;
    color: var(--tour-blue);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    transition: color .2s ease, transform .2s ease;
}
.tour-region-link::before {
    content: "";
    position: absolute;
    top: .57em;
    left: 1px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.tour-region-link:hover { color: var(--tour-blue-dark); transform: translateX(3px); }
.tour-regions__fade {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 74px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.95) 62%, #fff);
    transition: opacity .25s ease;
}
.tour-regions.is-expanded .tour-regions__fade { opacity: 0; }
.tour-regions-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px dashed #9aa6ba;
    background: none;
    color: #4e5869;
    font-size: 14px;
    font-weight: 700;
}
.tour-regions-toggle svg {
    width: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform .3s ease;
}
.tour-regions-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.tour-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 26px;
    visibility: hidden;
    opacity: 0;
    transition: opacity .28s ease, visibility .28s ease;
}
.tour-modal.is-open { visibility: visible; opacity: 1; }
.tour-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 18, 36, .76);
    backdrop-filter: blur(5px);
}
.tour-modal__dialog {
    position: relative;
    width: min(1080px, 100%);
    max-height: calc(100vh - 52px);
    overflow: auto;
    border-radius: 26px;
    background: var(--tour-white);
    box-shadow: var(--tour-shadow);
    transform: translateY(22px) scale(.985);
    transition: transform .36s cubic-bezier(.2,.75,.2,1);
}
.tour-modal.is-open .tour-modal__dialog { transform: translateY(0) scale(1); }
.tour-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 5;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    background: rgba(255,255,255,.13);
    color: #fff;
    transition: transform .2s ease, background .2s ease;
}
.tour-modal__close:hover { transform: rotate(7deg); background: rgba(255,255,255,.23); }
.tour-modal__close svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 2; }
.tour-modal__header {
    padding: 30px 74px 28px 34px;
    border-radius: 26px 26px 0 0;
    background: linear-gradient(125deg, #1659dc, #0e3fae);
    color: #fff;
}
.tour-modal__label {
    display: block;
    margin-bottom: 7px;
    color: rgba(255,255,255,.72);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.tour-modal__header h3 { margin: 0; font-size: clamp(27px, 4vw, 42px); line-height: 1.05; }
.tour-modal__header p { margin: 10px 0 0; color: rgba(255,255,255,.82); }
.tour-modal__header strong { color: #fff; }

.tour-form__body { padding: 30px 34px 34px; }
.tour-form__grid { display: grid; gap: 20px; }
.tour-form__grid--trip { grid-template-columns: 1.35fr 1fr 1.15fr .85fr; align-items: start; }
.tour-form__grid--contacts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tour-field { position: relative; min-width: 0; }
.tour-field--full { grid-column: 1 / -1; }
.tour-field label {
    display: block;
    margin-bottom: 8px;
    color: #69758a;
    font-size: 13px;
    font-weight: 700;
}
.tour-field label span { color: #e54444; }
.tour-field input,
.tour-field textarea,
.tour-field select,
.tour-control {
    width: 100%;
    min-height: 54px;
    border: 1px solid var(--tour-line);
    border-radius: 12px;
    background: #fff;
    color: var(--tour-text);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.tour-field input,
.tour-field textarea,
.tour-field select { padding: 14px 15px; }
.tour-field textarea { min-height: 112px; resize: vertical; }
.tour-field input::placeholder,
.tour-field textarea::placeholder { color: #a5afbf; }
.tour-field input:focus,
.tour-field textarea:focus,
.tour-field select:focus,
.tour-control:focus-visible {
    border-color: var(--tour-blue);
    box-shadow: 0 0 0 4px rgba(23,87,216,.1);
}
.tour-select-wrap { position: relative; }
.tour-select-wrap select { appearance: none; padding-right: 42px; }
.tour-select-wrap > svg {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 19px;
    transform: translateY(-50%);
    pointer-events: none;
    fill: none;
    stroke: #7a879a;
    stroke-width: 2;
}
.tour-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    text-align: left;
}
.tour-control > svg:first-child { width: 21px; flex: 0 0 21px; fill: none; stroke: var(--tour-blue); stroke-width: 1.8; }
.tour-control > span { min-width: 0; overflow: hidden; flex: 1; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.tour-control__chevron { width: 18px; flex: 0 0 18px; fill: none; stroke: #8c98aa; stroke-width: 2; transition: transform .2s ease; }
.tour-control[aria-expanded="true"] .tour-control__chevron { transform: rotate(180deg); }
.tour-field__error { display: block; min-height: 0; margin-top: 6px; color: #d63939; font-size: 12px; line-height: 1.35; }
.tour-field__error:empty { display: none; }

.tour-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 20;
    width: max(100%, 330px);
    padding: 18px;
    border: 1px solid var(--tour-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 22px 55px rgba(22,43,84,.18);
}
.tour-popover[hidden] { display: none !important; }
.tour-guests { width: 370px; }
.tour-guests__counter,
.tour-child-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.tour-guests__counter strong,
.tour-child-row strong { display: block; font-size: 15px; }
.tour-guests__counter small,
.tour-child-row small { display: block; margin-top: 2px; color: var(--tour-muted); font-size: 12px; }
.tour-counter { display: flex; align-items: center; gap: 13px; }
.tour-counter button,
.tour-child-row__remove {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    padding: 0;
    border: 1px solid #d9e3f2;
    border-radius: 9px;
    background: var(--tour-blue-soft);
    color: var(--tour-blue);
    font-size: 22px;
    line-height: 1;
}
.tour-counter span { min-width: 22px; font-weight: 800; text-align: center; }
.tour-guests__children { display: grid; gap: 12px; margin-top: 15px; }
.tour-child-row { padding-top: 12px; border-top: 1px solid #edf1f6; }
.tour-child-row__remove { font-size: 18px; }
.tour-add-child {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding: 13px 14px;
    border: 1px solid #d8e3f3;
    border-radius: 10px;
    background: #f7f9fd;
    color: #506078;
    font-weight: 700;
}
.tour-add-child svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s ease; }
.tour-add-child.is-open svg { transform: rotate(180deg); }
.tour-age-picker { margin-top: 14px; }
.tour-age-picker > span { display: block; margin-bottom: 10px; color: var(--tour-muted); font-size: 13px; }
.tour-age-picker__grid,
.tour-nights__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.tour-age-picker__grid button,
.tour-nights__grid button {
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid #d6e1f2;
    border-radius: 8px;
    background: #fff;
    color: var(--tour-blue);
    font-weight: 700;
}
.tour-age-picker__grid button:hover,
.tour-nights__grid button:hover,
.tour-nights__grid button.is-selected { border-color: var(--tour-orange); background: var(--tour-orange); color: #fff; }
.tour-nights { right: 0; left: auto; width: 360px; }
.tour-nights > strong { display: block; margin-bottom: 14px; font-size: 14px; }

.tour-calendar {
    left: 50%;
    width: min(680px, calc(100vw - 70px));
    transform: translateX(-50%);
}
.tour-calendar__nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.tour-calendar__nav span { font-size: 13px; font-weight: 800; text-align: center; }
.tour-calendar__nav button {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    padding: 0;
    border: 1px solid #dbe4f1;
    border-radius: 9px;
    background: #fff;
    color: var(--tour-blue);
}
.tour-calendar__nav button:disabled { opacity: .35; cursor: default; }
.tour-calendar__nav svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.tour-calendar__months { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.tour-calendar__month + .tour-calendar__month { padding-left: 22px; border-left: 1px solid #e7edf5; }
.tour-calendar__month-title { margin-bottom: 11px; font-size: 14px; font-weight: 800; text-align: center; text-transform: capitalize; }
.tour-calendar__weekdays,
.tour-calendar__days { display: grid; grid-template-columns: repeat(7, 1fr); }
.tour-calendar__weekdays span { padding: 7px 0; color: #8793a5; font-size: 10px; font-weight: 800; text-align: center; text-transform: uppercase; }
.tour-calendar__weekdays span:nth-child(6),
.tour-calendar__weekdays span:nth-child(7) { color: #d64a4a; }
.tour-calendar__day {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 37px;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #253044;
    font-size: 13px;
}
.tour-calendar__day::before { content: ""; position: absolute; inset: 3px; z-index: -1; border-radius: 9px; }
.tour-calendar__day:hover::before { background: var(--tour-blue-soft); }
.tour-calendar__day.is-disabled { color: #c1c9d5; cursor: default; }
.tour-calendar__day.is-disabled:hover::before { background: transparent; }
.tour-calendar__day.is-in-range { background: #edf4ff; }
.tour-calendar__day.is-start::before,
.tour-calendar__day.is-end::before { background: var(--tour-orange); }
.tour-calendar__day.is-start,
.tour-calendar__day.is-end { color: #fff; font-weight: 800; }
.tour-calendar__hint { margin-top: 14px; padding: 10px 12px; border-radius: 9px; background: #f5f7fb; color: #69758a; font-size: 12px; text-align: center; }

.tour-calendar__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e7edf5;
}

.tour-calendar__apply {
    min-width: 138px;
    min-height: 43px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: var(--tour-orange);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(255, 151, 28, 0.23);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.tour-calendar__apply:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(255, 151, 28, 0.32);
}

.tour-calendar__apply:disabled {
    opacity: 0.45;
    cursor: default;
    box-shadow: none;
}

.tour-form__divider { display: flex; align-items: center; gap: 12px; margin: 28px 0 21px; color: #6b778c; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tour-form__divider::before,
.tour-form__divider::after { content: ""; height: 1px; flex: 1; background: #e4eaf2; }
.tour-consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; cursor: pointer; }
.tour-consent input { position: absolute; opacity: 0; pointer-events: none; }
.tour-consent > span { position: relative; width: 20px; height: 20px; flex: 0 0 20px; border: 1px solid #cbd7e8; border-radius: 6px; background: #fff; }
.tour-consent input:checked + span { border-color: var(--tour-blue); background: var(--tour-blue); }
.tour-consent input:checked + span::after { content: ""; position: absolute; top: 3px; left: 6px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tour-consent em { color: #657187; font-size: 13px; font-style: normal; line-height: 1.45; }
.tour-form__footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 26px; }
.tour-form__footer p { max-width: 560px; margin: 0; color: var(--tour-muted); font-size: 13px; line-height: 1.5; }
.tour-submit {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 24px;
    border: 0;
    border-radius: 12px;
    background: var(--tour-orange);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(255,151,28,.27);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.tour-submit:hover { transform: translateY(-2px); box-shadow: 0 15px 32px rgba(255,151,28,.36); }
.tour-submit:disabled { opacity: .6; cursor: wait; transform: none; }
.tour-submit svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.tour-success { padding: 60px 34px 64px; text-align: center; }
.tour-success__icon { display: grid; width: 72px; height: 72px; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: #e8f8ee; color: #1e9f56; }
.tour-success__icon svg { width: 36px; fill: none; stroke: currentColor; stroke-width: 2; }
.tour-success h4 { margin: 0; font-size: 28px; }
.tour-success p { margin: 10px 0 24px; color: var(--tour-muted); }
body.tour-modal-open { overflow: hidden; }

@media (max-width: 1100px) {
    .tour-card--large { min-height: 350px; }
    .tour-form__grid--trip { grid-template-columns: 1fr 1fr; }
    .tour-calendar { left: 0; transform: none; }
    .tour-nights { right: auto; left: 0; }
}
@media (max-width: 820px) {
    .tour-picker__heading { grid-template-columns: 1fr; gap: 15px; }
    .tour-card--large { grid-column: span 6; }
    .tour-card--large:nth-child(3) { grid-column: span 12; }
    .tour-card--small { grid-column: span 6; }
    .tour-regions__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tour-form__grid--contacts { grid-template-columns: 1fr 1fr; }
    .tour-field--full { grid-column: 1 / -1; }
    .tour-calendar__months { grid-template-columns: 1fr; }
    .tour-calendar__month + .tour-calendar__month { display: none; }
}
@media (max-width: 620px) {
    .tour-picker__featured { gap: 14px; }
    .tour-card--large,
    .tour-card--large:nth-child(3),
    .tour-card--small { grid-column: 1 / -1; min-height: 290px; }
    .tour-card--small { min-height: 190px; }
    .tour-card__content { padding: 22px; }
    .tour-card__title { font-size: 22px; }
    .tour-regions__list { grid-template-columns: 1fr; gap: 11px; }
    .tour-regions { height: 245px; }
    .tour-modal { padding: 0; align-items: end; }
    .tour-modal__dialog { width: 100%; max-height: 94vh; border-radius: 23px 23px 0 0; }
    .tour-modal__header { padding: 26px 66px 23px 21px; border-radius: 23px 23px 0 0; }
    .tour-modal__close { top: 14px; right: 14px; }
    .tour-form__body { padding: 22px 20px 26px; }
    .tour-form__grid--trip,
    .tour-form__grid--contacts { grid-template-columns: 1fr; }
    .tour-popover,
    .tour-guests,
    .tour-nights,
    .tour-calendar { position: fixed; right: 12px; bottom: 12px; left: 12px; top: auto; width: auto; max-height: 72vh; overflow: auto; transform: none; border-radius: 18px; }
    .tour-form__footer { align-items: stretch; flex-direction: column; }
    .tour-submit { width: 100%; }
}
