/* Страница «Онлайн камеры» — вёрстка по Figma (узлы 155:9815 / 155:9857 / 155:9875) */

body.cameras-page {
    background: #F5F5F5;
}

/* ---- Баннер ---- */

.cameras-banner-block .block-content {
    padding-top: 0;
    padding-bottom: 0;
}

.cameras-banner {
    display: flex;
    gap: 16px;
    height: 270px;
    width: 100%;
}

.cameras-banner__info {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 16px;
    align-items: center;
    overflow: hidden;
    border-radius: 4px;
    background: var(--Surface-White, #FFFFFF);
}

.cameras-banner__illustration {
    flex-shrink: 0;
    width: 319px;
    height: 270px;
    object-fit: cover;
    object-position: 100% 50%;
    display: block;
}

.cameras-banner__text {
    width: 410px;
    max-width: 100%; /* на узких планшетах текст сжимается вместо переполнения */
    min-width: 0;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.cameras-banner__title {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    line-height: 24px;
    color: var(--Text-Primary, #1E2433);
}

.cameras-banner__desc {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    color: var(--Text-Primary, #1E2433);
}

.cameras-banner__excursion {
    position: relative;
    flex: 0 0 446.67px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 8px 22px 12px;
    border-radius: 4px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0) 56.116%, rgba(0, 0, 0, 0.88) 100%),
        url('../../image/web/cameras/banner-excursion.webp') center / cover no-repeat;
}

.cameras-banner__excursion-label {
    font-size: 24px;
    font-weight: 500;
    line-height: 20px;
    color: #FFFFFF;
}

/* ---- Основная сетка ---- */

.cameras-block .block-content {
    padding-top: 40px;
    padding-bottom: 80px;
}

.cameras-layout {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    width: 100%;
}

.cameras-side {
    flex: 0 0 406px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cameras-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ---- Статичная карточка-«визир» ---- */

.cameras-static-card {
    position: relative;
    height: 321px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--Gray-400, #565563);
}

.cameras-static-card__inner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 362px;
    height: 277px;
    border-radius: 14.8px;
    background: #FFFFFF;
    opacity: 0.1;
}

.cameras-static-card__text {
    position: absolute;
    left: 50%;
    top: calc(50% - 7.5px);
    transform: translate(-50%, -50%);
    width: 284px;
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    text-transform: uppercase;
    text-align: center;
    color: #FFFFFF;
}

.cameras-static-card__corner {
    position: absolute;
    width: 38px;
    height: 40px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.cameras-static-card__corner--lt { left: 21px; top: 21px; }
.cameras-static-card__corner--rt { right: 21px; top: 21px; }
.cameras-static-card__corner--lb { left: 21px; bottom: 21px; }
.cameras-static-card__corner--rb { right: 21px; bottom: 21px; }

.cameras-static-card__cam {
    position: absolute;
    right: -5px;
    bottom: -34px;
    width: 137px;
    height: 137px;
    display: block;
}

/* ---- Карточка «Экскурсия» в левой колонке ---- */

.cameras-side-excursion {
    position: relative;
    height: 321px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 9px;
    padding: 16px 22px;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0) 56.116%, rgba(0, 0, 0, 0.88) 100%),
        url('../../image/web/cameras/side-excursion.webp') center / cover no-repeat;
}

.cameras-side-excursion__label {
    font-size: 22px;
    font-weight: 500;
    line-height: 24px;
    text-align: center;
    color: #FFFFFF;
}

.cameras-side-excursion__btn {
    width: 100%;
}

/* Правка по фидбеку: текст в кнопках «Записаться» жирнее. */
.cameras-banner__excursion .btn,
.cameras-side-excursion .btn {
    font-weight: 700;
}

/* ---- Сетка карточек ---- */

.cameras-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.camera-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--Surface-White, #FFFFFF);
}

.camera-card__preview {
    position: relative;
    height: 261px;
    background: var(--Surface-Dark, #33333A);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.camera-card__play {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

/* Ховер play — затемнение до Brand-Primary-600 (Figma 207:44484); иконка растровая, темним фильтром. */
.camera-card__play:hover img {
    filter: brightness(0.94);
}

.camera-card__play img {
    width: 68px;
    height: 68px;
    display: block;
}

.camera-card__hint {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translate(-50%, 50%);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    color: #FFFFFF;
}

.camera-card__preview.is-on .camera-card__play,
.camera-card__preview.is-on .camera-card__hint {
    display: none;
}

.camera-card__preview.is-on {
    cursor: default;
}

.camera-card__iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.camera-card__title {
    margin: 0;
    padding: 0 10px;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    color: var(--Text-Primary, #1E2433);
}

.camera-card__photo {
    width: 100%;
    height: 261px;
}

.camera-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.camera-card__footer {
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
}

.camera-card__price-btn {
    width: 100%;
}

/* ---- CTA-блок внутри колонки контента ---- */

.cameras-content .cta-block .block-content {
    padding: 0;
}

/* Узкая версия CTA-карточки (десктоп-раскладка, колонка 812px по Figma):
   вместо цельной картинки — композиция «подложка + фото + бейдж» (.cta-compact-visual) */

.cta-block--compact .cta-compact-visual {
    display: none;
}

@media (min-width: 1280px) {
    .cameras-content .cta-block--compact .content {
        padding: 10px 40px;
        overflow: hidden;
    }

    .cameras-content .cta-block--compact .column {
        width: 396px;
        /* по Figma визуал заходит на зону текстовой колонки (его левая часть прозрачна) */
        margin-right: -111px;
    }

    .cameras-content .cta-block--compact picture {
        display: none;
    }

    .cta-block--compact .cta-compact-visual {
        display: block;
        position: relative;
        flex-shrink: 0;
        width: 447px;
        height: 384px;
    }

    /* повёрнутая полупрозрачная подложка за фото */
    .cta-block--compact .cta-compact-visual::before {
        content: '';
        position: absolute;
        left: 122.7px;
        top: 6.4px;
        width: 341.94px;
        height: 345.54px;
        border-radius: 3.58px;
        background: rgba(255, 255, 255, 0.06);
        transform: rotate(-9.89deg) skewX(-3.15deg);
    }

    .cta-block--compact .cta-compact-visual img {
        position: absolute;
        left: 132px;
        top: 19px;
        width: 336px;
        height: 346px;
        border-radius: 3.58px;
        object-fit: cover;
        object-position: 42.3% 50%;
    }

    .cta-block--compact .cta-compact-visual span {
        position: absolute;
        left: 132px;
        top: 297.2px;
        width: 189px;
        height: 68px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        gap: 6.3px;
        padding: 11.6px 15.2px 12.5px 12.5px;
        border-radius: 0 3.58px 0 3.58px;
        background: var(--Brand-Secondary, #454452);
    }

    .cta-block--compact .cta-compact-visual .card-name {
        margin: 0;
        font-size: 12.54px;
        font-weight: 700;
        line-height: 1;
        text-transform: uppercase;
        white-space: nowrap;
        color: #FFFFFF;
    }

    .cta-block--compact .cta-compact-visual .card-role {
        margin: 0;
        font-size: 10.75px;
        font-weight: 400;
        line-height: 1.2;
        color: #FFFFFF;
    }
}

/* ---- Laptop (Figma-фрейм 990; десктоп-раскладка требует контент 1240 → порог 1280) ---- */

@media (max-width: 1279px) {
    .cameras-banner__illustration {
        display: none;
    }

    .cameras-banner__info {
        padding: 0 30px;
        min-width: 280px;
    }

    /* на планшетах карточка экскурсии сжимается, чтобы не душить текстовую */
    .cameras-banner__excursion {
        flex-shrink: 1;
        min-width: 360px;
    }

    .cameras-block .block-content {
        padding-top: 30px;
        padding-bottom: 60px;
    }

    .cameras-side {
        display: none;
    }
}

/* CTA-партиал переключается на свой мобильный вид на ≤989 — вертикальные поля за ним */
@media (max-width: 989px) {
    .cameras-content .cta-block .block-content {
        padding: 22px 0 60px;
    }
}

/* ---- Mobile (Figma-фрейм 360; порог 768 — как в эталоне, планшеты держат 2 колонки) ---- */

@media (max-width: 768px) {
    .cameras-banner-block {
        display: none;
    }

    /* без баннера верхний отступ сетки задают сами хлебные крошки */
    .cameras-block .block-content {
        padding-top: 0;
    }

    .cameras-grid {
        grid-template-columns: 1fr;
    }

    .camera-card {
        gap: 8px;
        padding-bottom: 8px;
    }

    .camera-card--promo {
        gap: 10px;
        padding-bottom: 10px;
    }

    .camera-card__preview {
        height: 190px;
    }

    .camera-card__hint {
        bottom: 18px;
    }

    .camera-card__title {
        padding: 0 8px;
        font-size: 14px;
    }

    .camera-card__photo {
        height: 190px;
    }
}
