/* Страница тура (шаблон 58) */

/* Шапка */

/* Высота как у прежней шапки, но растёт, если контент не помещается */
.main-image.tour-hero,
#container .main-image.tour-hero {
    position: relative;
    height: auto;
    min-height: 360px;
}

.tour-hero .container,
.tour-hero .main-image__content {
    min-height: inherit;
}

.tour-hero .bg-image:after {
    background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .6) 50%, rgba(0, 0, 0, .8) 100%);
}

.tour-hero__body {
    padding-top: 40px;
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "main info"
        "actions info";
    column-gap: 150px;
    align-items: start;
}

.tour-hero__main {
    grid-area: main;
    margin: 0;
}

.tour-hero__info {
    grid-area: info;
    margin: 0;
}

.tour-hero__actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 32px;
}

.tour-hero__annotation {
    margin-top: 24px;
    color: var(--color-white);
    font-size: 16px;
    line-height: 1.5em;
}

.tour-hero .tour-data .it {
    display: flex;
    align-items: center;
    margin: 0 0 14px;
}

.tour-hero .tour-data .it:last-child {
    margin-bottom: 0;
}

.tour-hero .tour-data .ic {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    line-height: normal;
    margin-right: 14px;
}

.tour-hero .tour-data .ic img {
    width: 18px;
    height: 18px;
}

.tour-hero__text {
    line-height: 1.35em;
}

.tour-hero__text a {
    color: var(--color-white);
}

.tour-hero .top_old_price {
    position: static;
    margin-right: 8px;
    opacity: .7;
}

/* Преимущества и маршрут */

@media only screen and (min-width: 768px) {
    .advantages .adv_tour_row {
        --bs-gutter-x: 80px;
    }
}

@media only screen and (min-width: 1200px) {
    .advantages .adv_tour_row {
        --bs-gutter-x: 120px;
    }
}

.adv_tour_row--single .adv_tour:first-child {
    border-right: none;
}

.adv_tour--route {
    margin-top: 60px;
}

/* Фото */

.tour-gallery {
    padding-top: 0;
}

.tour-gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    border-radius: 6px;
    overflow: hidden;
}

.tour-gallery__item {
    aspect-ratio: 1 / 1;
}

.tour-gallery__item:first-child {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.tour-gallery__item:nth-child(n+6) {
    display: none;
}

.tour-gallery__grid--few {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tour-gallery__grid--few .tour-gallery__item:first-child {
    grid-column: auto;
    grid-row: auto;
}

.tour-gallery__item a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: #f2f2f2;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    color: var(--color-white);
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
}

.tour-gallery__item:nth-child(5) a:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 5;
}

.tour-gallery__item:nth-child(5):last-child a:after {
    display: none;
}

/* Кнопки с красной обводкой */

.btn-outline-red {
    background: transparent;
    border: 2px solid var(--color-red);
    color: var(--color-red);
    transition: background-color .2s, color .2s;
}

.btn-outline-red:hover,
.btn-outline-red:focus-visible,
.btn-outline-red.active {
    background: var(--color-red);
    color: var(--color-white);
}

/* Бронирование: отступ над заголовком в 1,5 раза больше, чем под ним (margin-bottom у .h3 — 70px, на мобильном 40px) */

.booking-new#booking_info {
    padding-top: 105px;
    padding-bottom: 80px;
}

@media only screen and (max-width: 767px) {
    .booking-new#booking_info {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

/* Бронирование: важная информация рядом с календарём */

.booking-notes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.col-lg-8 .booking-notes {
    margin-top: 48px;
}

@media only screen and (min-width: 992px) {
    #tourBookingForm > .row > .col-lg-4 {
        padding-left: calc(var(--bs-gutter-x) * .5 + 48px);
    }
}

.booking-notes__btn {
    height: auto;
    min-height: 60px;
    line-height: 1.3em;
    padding: 18px 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Программа тура */

.tour-program {
    padding-top: 0;
    padding-bottom: 80px;
}

.tour-program__title {
    margin-bottom: 32px;
}

.tour-program__days {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
}

.tour-program__day {
    height: 48px;
    padding: 0 28px;
    border: 2px solid var(--color-red);
    border-radius: 24px;
    background: transparent;
    color: var(--color-red);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.tour-program__day:hover,
.tour-program__day.active {
    background: var(--color-red);
    color: var(--color-white);
}

/* Пункты программы — по образцу аккордеона Тильды: 10 из 12 колонок по центру, линии-разделители.
   Даты поездок и кнопки — в той же колонке */
.tour-program__stages,
.tour-program .stages_desc,
.tour-program .tour-schedule__buttons {
    max-width: calc(100% * 10 / 12);
    margin-left: auto;
    margin-right: auto;
}

.tour-program__stage {
    display: none;
    border-bottom: 1px solid #eee;
}

.tour-program__stage.active {
    display: block;
}

.tour-point {
    border-top: 1px solid #eee;
}

.tour-point__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 27px 0;
    outline: none;
}

.tour-point__head[role="button"] {
    cursor: pointer;
}

.tour-point__info {
    min-width: 0;
}

.tour-point__meta {
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.3em;
    text-transform: uppercase;
}

.tour-point__label {
    color: var(--color-red);
    margin-right: 12px;
}

.tour-point__time {
    color: #a1a1a1;
}

.tour-point__title {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    line-height: 1.3em;
    transition: color .2s;
}

.tour-point__head[role="button"]:hover .tour-point__title,
.tour-point__head:focus-visible .tour-point__title {
    color: var(--color-red);
}

.tour-point__toggle {
    position: relative;
    flex: 0 0 50px;
    height: 50px;
    border-radius: 50%;
    transition: background-color .2s, transform .2s;
}

.tour-point__toggle:before,
.tour-point__toggle:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 1px;
    margin-left: -11px;
    background: #222;
}

.tour-point__toggle:after {
    transform: rotate(90deg);
}

.tour-point__head[role="button"]:hover .tour-point__toggle,
.tour-point__head:focus-visible .tour-point__toggle {
    background: #eee;
}

.tour-point.open .tour-point__toggle {
    transform: rotate(45deg);
}

.tour-point__body {
    display: none;
    padding: 0 82px 27px 0;
}

.tour-point.open .tour-point__body {
    display: block;
}

/* Расписание и кнопки */

.tour-program .stages_desc {
    margin-top: 60px;
}

.tour-schedule__buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 20px 32px;
    margin-top: 48px;
}

/* Ссылка «Скачать программу» с иконкой Word: текст на одной базовой линии с кнопкой */

.tour-schedule__download {
    color: var(--color-red);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.tour-schedule__download:before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 10px;
    vertical-align: -7px;
    background: url('../i/ic-word.svg') no-repeat center / contain;
}

.tour-schedule__download:hover,
.tour-schedule__download:focus-visible {
    color: var(--color-red);
    text-decoration: none;
}

@media only screen and (max-width: 1199px) {
    .main-image.tour-hero,
    #container .main-image.tour-hero {
        min-height: 400px;
    }
}

@media only screen and (min-width: 992px) and (max-width: 1199px) {
    .tour-hero__body {
        column-gap: 100px;
    }
}

@media only screen and (max-width: 991px) {
    .tour-hero__body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas:
            "main"
            "info"
            "actions";
    }
    .main-image.tour-hero,
    #container .main-image.tour-hero {
        min-height: 460px;
    }
    .tour-hero__info {
        margin-top: 28px;
    }
    .tour-program__stages,
    .tour-program .stages_desc,
    .tour-program .tour-schedule__buttons {
        max-width: none;
    }
}

@media only screen and (max-width: 767px) {
    .tour-hero .main-image__content {
        padding-bottom: 32px;
    }
    .tour-hero__annotation {
        margin-top: 16px;
    }
    .tour-hero .sub-icons .tour-data .it {
        margin-bottom: 10px;
    }
    .tour-hero .tour-data .ic {
        width: 32px;
        height: 32px;
        margin-right: 12px;
    }
    .tour-hero .tour-data .ic img {
        width: 16px;
        height: 16px;
    }
    .tour-hero__actions .btn {
        flex: 1 1 100%;
    }
    .tour-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .tour-gallery__grid--few .tour-gallery__item:first-child {
        grid-column: 1 / 3;
    }
    .tour-program__days {
        gap: 8px;
        margin-bottom: 32px;
    }
    .tour-program__day {
        height: 40px;
        padding: 0 16px;
        font-size: 13px;
    }
    .tour-point__head {
        gap: 16px;
        padding: 20px 0;
    }
    .tour-point__meta {
        font-size: 14px;
    }
    .tour-point__title {
        font-size: 18px;
    }
    .tour-point__toggle {
        flex-basis: 36px;
        height: 36px;
    }
    .tour-point__toggle:before,
    .tour-point__toggle:after {
        width: 18px;
        margin-left: -9px;
    }
    .tour-point__body {
        padding: 0 0 20px;
    }
    .tour-program {
        padding-bottom: 48px;
    }
    .tour-schedule__buttons .btn {
        flex: 1 1 100%;
    }
}
