/*
 * Раздел «Туры» (v1.9, 29.11.2026, docs/41): карточка тура и поиск на /tury/.
 * Подключается во видах tury/* после stati.css: переменные --st-*, кнопки, таблица (.st-table-wrap), фото и подписи —
 * оттуда; здесь — только то, чего нет у статей. Классы — с префиксом tu-. Цвета сайта: тёмно-красный, кремовый.
 */

/* ---------- Факты под обложкой: страна, города, длительность, заезды, цена ---------- */

.tu-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin: 0 0 32px;
    padding: 0;
    overflow: hidden;
    background: var(--st-paper);
    border: 1px solid var(--st-line);
    border-radius: var(--st-radius);
}

.tu-facts > div {
    padding: 14px 18px 16px;
    box-shadow: -1px -1px 0 var(--st-line);
}

.tu-facts dt {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.35;
    color: var(--st-muted);
}

.tu-facts dd {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--st-ink);
}

/* ---------- Разделы карточки ---------- */

.tu-section {
    margin: 40px 0 0;
    padding-top: 22px;
    border-top: 1px solid var(--st-line);
    color: var(--st-text);
    scroll-margin-top: 16px;
}

.st-page .tu-section__title {
    margin: 0 0 16px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--st-ink);
    text-transform: none;
    text-wrap: balance;
}

@media (min-width: 600px) {
    .st-page .tu-section__title {
        font-size: 28px;
    }
}

/* текст после разделов карточки: первый подзаголовок — без лишнего отступа сверху */
.tu-text {
    margin-top: 8px;
}

/* ---------- Даты и цены ---------- */

.tu-dates .st-table-wrap {
    margin: 0 0 14px;
}

.tu-table__price {
    white-space: nowrap;
    font-weight: 700;
    color: var(--st-ink);
}

/* на телефоне месяц, заезды и цена помещаются в ширину экрана: цену не прячем за прокруткой вбок
   (у таблиц статей ячейки шире — от 5,5 em; столбцы «Ночей» и «Места» по-прежнему прокручиваются) */
@media (max-width: 599px) {
    .tu-dates .tu-table {
        font-size: 15px;
    }

    .tu-dates .tu-table th,
    .tu-dates .tu-table td {
        min-width: 0;
        padding: 10px 10px;
    }

    .tu-dates .tu-table :is(th, td):first-child {
        min-width: 0;
        padding-left: 14px;
    }
}

.tu-note,
.tu-manager {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--st-muted);
}

.tu-manager {
    padding: 16px 20px;
    background: var(--st-cream);
    border: 1px solid var(--st-line);
    border-left: 4px solid var(--st-red);
    border-radius: var(--st-radius);
    font-size: 17px;
    color: var(--st-text);
}

/* ---------- Программа по дням ---------- */

.st-page .tu-days {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tu-day {
    position: relative;
    margin: 0;
    padding: 0 0 22px 28px;
    font-size: 17px;
    line-height: 1.65;
}

/* линия маршрута слева: от точки дня к следующему */
.tu-day::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--st-red);
}

.tu-day::after {
    content: "";
    position: absolute;
    top: 24px;
    bottom: 0;
    left: 9px;
    width: 2px;
    background: var(--st-line);
}

.tu-day:last-child::after {
    display: none;
}

.st-page .tu-day__title {
    margin: 0 0 6px;
    font-size: 19px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--st-ink);
    text-transform: none;
}

.tu-day__n {
    color: var(--st-red);
}

.tu-day p {
    margin: 0 0 .7em;
}

.tu-day p:last-child {
    margin-bottom: 0;
}

@media (min-width: 600px) {
    .tu-day {
        font-size: 18px;
    }

    .st-page .tu-day__title {
        font-size: 20px;
    }
}

/* ---------- Что входит / что оплачивается отдельно ---------- */

.tu-lists {
    display: grid;
    gap: 8px 32px;
}

@media (min-width: 720px) {
    .tu-lists {
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    }
}

.st-page .tu-list ul {
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.tu-list li {
    position: relative;
    margin: 0 0 10px;
    padding-left: 30px;
    font-size: 17px;
    line-height: 1.5;
}

.tu-list li::before {
    position: absolute;
    top: .05em;
    left: 0;
    width: 20px;
    font-weight: 700;
    text-align: center;
}

.tu-list--in li::before {
    content: "✓";
    color: #2f6b2f;
}

.tu-list--out li::before {
    content: "+";
    color: var(--st-red);
}

/* ---------- Фото ---------- */

.tu-gallery__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

@media (min-width: 600px) {
    .tu-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.tu-photo {
    margin: 0;
}

.tu-photo__link {
    display: block;
    overflow: hidden;
    border-radius: var(--st-radius);
    background: #ece3bd;
    cursor: zoom-in;
}

.tu-photo__link img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform .4s var(--st-ease);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .tu-photo__link:hover img {
        transform: scale(1.03);
    }
}

.tu-photo figcaption {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.45;
    color: var(--st-muted);
}

.tu-photo figcaption a,
.tu-lightbox__caption a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.tu-photo figcaption a:hover {
    color: var(--st-red);
}

/* просмотр фото крупно */
.tu-lightbox {
    max-width: min(1200px, 100vw);
    max-height: 100vh;
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fefcdd;
    overflow: visible;
}

.tu-lightbox::backdrop {
    background: rgba(26, 14, 8, .88);
}

.tu-lightbox__figure {
    margin: 0;
    padding: 0 56px;
}

.tu-lightbox__img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 140px);
    margin: 0 auto;
    border-radius: 6px;
    background: rgba(254, 252, 221, .08);
}

.tu-lightbox__caption {
    max-width: 760px;
    margin: 12px auto 0;
    font-size: 15px;
    line-height: 1.45;
    text-align: center;
}

.tu-lightbox__caption .st-credit {
    color: rgba(254, 252, 221, .75);
}

.tu-lightbox__btn {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    margin-top: -42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(254, 252, 221, .16);
    color: #fefcdd;
    font: 700 28px/44px Arial, sans-serif;
    cursor: pointer;
    transition: background-color .2s;
}

.tu-lightbox__btn:hover,
.tu-lightbox__btn:focus-visible {
    background: rgba(254, 252, 221, .3);
    outline: 2px solid #fefcdd;
    outline-offset: 2px;
}

.tu-lightbox__prev {
    left: 4px;
}

.tu-lightbox__next {
    right: 4px;
}

.tu-lightbox__close {
    top: 0;
    right: 4px;
    margin-top: 0;
}

@media (max-width: 599px) {
    .tu-lightbox__figure {
        padding: 52px 8px 0;
    }

    .tu-lightbox__btn {
        top: auto;
        bottom: -56px;
        margin-top: 0;
    }

    .tu-lightbox__prev {
        left: calc(50% - 56px);
    }

    .tu-lightbox__next {
        right: calc(50% - 56px);
    }

    .tu-lightbox__close {
        top: 0;
        bottom: auto;
    }
}

/* ---------- Для менеджеров (видно только тем, кто вошёл в админку) ---------- */

.tu-staff {
    margin: 0 0 24px;
    padding: 14px 18px;
    background: #fff8e0;
    border: 1px dashed var(--st-line-strong);
    border-radius: var(--st-radius);
    font-size: 15px;
    line-height: 1.5;
    color: var(--st-text);
}

.tu-staff p {
    margin: 0 0 4px;
}

.tu-staff p:last-child {
    margin-bottom: 0;
}

.tu-staff__title {
    font-weight: 700;
    color: var(--st-ink);
}

.tu-staff__hint {
    font-weight: 400;
    color: var(--st-muted);
}

.tu-staff__label {
    font-weight: 700;
}

.tu-staff a {
    color: var(--st-red);
}

/* ---------- Поиск на /tury/ ---------- */

.tu-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: end;
    margin: 0 0 28px;
    padding: 18px 20px;
    background: var(--st-paper);
    border: 1px solid var(--st-line);
    border-radius: 10px;
}

@media (min-width: 720px) {
    .tu-search {
        grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto;
    }
}

.tu-search__field {
    display: block;
    margin: 0;
}

.tu-search__label {
    display: block;
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--st-ink);
}

.tu-search__select {
    display: block;
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: 10px 38px 10px 14px;
    border: 1px solid #c9bd93;
    border-radius: 6px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238f1416' stroke-width='2'/%3E%3C/svg%3E") right 14px center no-repeat;
    color: var(--st-ink);
    font: inherit;
    font-size: 17px;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.tu-search__select:focus {
    border-color: var(--st-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(143, 20, 22, .18);
}

.tu-search__submit {
    white-space: nowrap;
}

.tu-search__reset {
    align-self: center;
    color: var(--st-red);
    font-size: 16px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tu-found {
    margin: 0 0 22px;
    font-size: 17px;
    line-height: 1.5;
    color: var(--st-ink);
}

/* ---------- Карточка тура в списке ---------- */

.tu-card__facts {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 700;
    color: var(--st-red);
}

.tu-card__sep {
    color: var(--st-line-strong);
}
