/* ============================================================
   Страница «Наши работы» (/nashi-raboty)
   Своя подача, не шаблон lp-*: мозаика фото в hero, кейс-маршрут
   с «кабельной» линией, истории с чередованием сторон, мозаичная галерея.
   Классы — в зоне .wp-shell. Шапка, подвал, модалки и лайтбокс — из main.css.
   ============================================================ */

.wp-shell {
    color: #FFF;
    background: #0E1A2E;
    overflow-x: clip;
}

.wp-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.wp-eyebrow {
    margin-bottom: 14px;
    color: #FFF;
    font-family: MOSCOW2024, sans-serif;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

.wp-section-head {
    max-width: 760px;
    margin-bottom: 48px;
}

.wp-section-title {
    color: #FFF;
    font-family: Oswald, sans-serif;
    font-size: clamp(30px, 3.6vw, 48px);
    font-weight: 500;
    line-height: 110%;
    text-transform: uppercase;
}

.wp-section-title span {
    color: #00B2FF;
}

.wp-section-lead {
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 17px;
    line-height: 1.55;
}

.wp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    border-radius: 50px;
    font-family: Oswald, sans-serif;
    font-size: 17px;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}

.wp-btn--primary {
    border: 1px solid #00B2FF;
    background: #00B2FF;
    color: #0E1A2E;
}

.wp-btn--primary:hover {
    border-color: #B2E0FF;
    background: #B2E0FF;
}

.wp-btn--ghost {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(14, 26, 46, 0.5);
    color: #FFF;
}

.wp-btn--ghost:hover {
    border-color: #00B2FF;
    color: #B2E0FF;
}

/* ===== Hero: мозаика фото на всю ширину ===== */

.wp-hero {
    position: relative;
    min-height: min(86vh, 820px);
    display: flex;
    align-items: flex-end;
    padding: 120px 30px 64px;
    overflow: hidden;
    isolation: isolate;
}

.wp-hero__mosaic {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 0.9fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.wp-hero__tile {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: cover;
    filter: saturate(0.8) brightness(0.75);
}

.wp-hero__tile--1 { grid-column: 1; grid-row: 1 / span 2; }
.wp-hero__tile--2 { grid-column: 2 / span 2; grid-row: 1; }
.wp-hero__tile--3 { grid-column: 4; grid-row: 1; }
.wp-hero__tile--4 { grid-column: 2; grid-row: 2; }
.wp-hero__tile--5 { grid-column: 3; grid-row: 2; }
.wp-hero__tile--6 { grid-column: 4; grid-row: 2; }

/* Затемнение снизу-слева, чтобы заголовок читался поверх фото */
.wp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(0deg, #0E1A2E 0%, rgba(14, 26, 46, 0.82) 32%, rgba(14, 26, 46, 0.2) 70%, rgba(14, 26, 46, 0.45) 100%),
        linear-gradient(90deg, rgba(14, 26, 46, 0.85) 0%, rgba(14, 26, 46, 0) 65%);
}

.wp-hero__content {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.wp-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.wp-crumbs a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.wp-crumbs a:hover {
    color: #00B2FF;
}

.wp-hero__title {
    max-width: 900px;
    color: #FFF;
    font-family: Oswald, sans-serif;
    font-size: clamp(40px, 5.4vw, 76px);
    font-weight: 500;
    line-height: 100%;
    text-transform: uppercase;
}

.wp-hero__title span {
    display: block;
    margin-top: 10px;
    color: #B2E0FF;
    font-size: 0.5em;
    line-height: 115%;
}

.wp-hero__lead {
    max-width: 620px;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.55;
}

.wp-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

/* ===== Кейс-маршрут: щитовая → трасса → машиноместо ===== */

.wp-route,
.wp-stories,
.wp-gallery,
.wp-final {
    padding: clamp(64px, 8vw, 110px) 30px;
}

.wp-route {
    background: #141D2E;
}

.wp-route__line {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 56px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Сама «кабельная» линия по центру */
.wp-route__line::before {
    content: '';
    position: absolute;
    top: 24px;
    bottom: 24px;
    left: 50%;
    width: 0;
    border-left: 3px dashed rgba(0, 178, 255, 0.55);
    transform: translateX(-50%);
}

.wp-route__stop {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0 96px;
}

.wp-route__node {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 3px solid #00B2FF;
    border-radius: 50%;
    background: #0E1A2E;
    color: #00B2FF;
    font-family: Oswald, sans-serif;
    font-size: 18px;
    font-weight: 500;
    transform: translate(-50%, -50%);
}

.wp-route__photo {
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.wp-route__text h3 {
    margin-bottom: 12px;
    color: #FFF;
    font-family: Oswald, sans-serif;
    font-size: 30px;
    font-weight: 500;
    line-height: 110%;
    text-transform: uppercase;
}

.wp-route__text p {
    max-width: 440px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 17px;
    line-height: 1.55;
}

/* Чётные остановки: фото справа, текст слева (у линии) */
.wp-route__stop--right .wp-route__photo {
    grid-column: 2;
    grid-row: 1;
}

.wp-route__stop--right .wp-route__text {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    text-align: right;
}

/* ===== Истории: ситуация → что сделали → итог ===== */

.wp-story {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: 56px;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wp-story:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.wp-story--flip .wp-story__media {
    order: 2;
}

.wp-story__media {
    display: grid;
    gap: 10px;
    aspect-ratio: 5 / 4;
}

.wp-story__media--2 {
    grid-template-columns: 1.4fr 1fr;
}

.wp-story__media img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.wp-tags li {
    padding: 7px 12px 6px;
    border: 1px solid rgba(0, 178, 255, 0.45);
    border-radius: 30px;
    color: #B2E0FF;
    font-family: MOSCOW2024, sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wp-story__title {
    margin-bottom: 26px;
    color: #FFF;
    font-family: Oswald, sans-serif;
    font-size: clamp(26px, 2.6vw, 36px);
    font-weight: 500;
    line-height: 110%;
    text-transform: uppercase;
}

.wp-story__flow {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
    padding-left: 26px;
}

/* Тонкая линия-связка ситуация → решение → итог */
.wp-story__flow::before {
    content: '';
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 5px;
    width: 2px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), #00B2FF);
}

.wp-story__flow > div {
    position: relative;
}

.wp-story__flow > div::before {
    content: '';
    position: absolute;
    top: 5px;
    left: -26px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #0E1A2E;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.wp-story__flow > div:last-child::before {
    border-color: #00B2FF;
    background: #00B2FF;
}

.wp-story__flow dt {
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.55);
    font-family: MOSCOW2024, sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wp-story__flow dd {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
    line-height: 1.5;
}

.wp-story__flow > div:last-child dd {
    color: #FFF;
    font-weight: 500;
}

/* ===== Галерея: мозаика (переопределяет 3 колонки с главной) ===== */

.wp-gallery {
    background: #141D2E;
}

.wp-gallery .works-filters {
    margin-bottom: 28px;
}

.wp-gallery .works-grid--mosaic {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 210px;
    grid-auto-flow: dense;
    gap: 12px;
}

.wp-gallery .works-grid--mosaic .works-grid__tile {
    aspect-ratio: auto;
    border-radius: 14px;
}

.wp-gallery .works-grid--mosaic .works-grid__tile:nth-child(6n + 1):not(:nth-last-child(-n + 3)) {
    grid-column: span 2;
    grid-row: span 2;
}

.wp-gallery .works-grid--mosaic .works-grid__tile:nth-child(6n + 4) {
    grid-row: span 2;
}

/* ===== Финальный CTA ===== */

.wp-final__inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
    gap: 40px;
    padding: 48px;
    border: 1px solid rgba(0, 178, 255, 0.35);
    border-radius: 24px;
    background: linear-gradient(120deg, rgba(0, 178, 255, 0.12), rgba(0, 178, 255, 0) 60%), #141D2E;
}

.wp-final__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== Липкая кнопка ===== */

.wp-sticky-cta {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border: 0;
    border-radius: 50px;
    background: #00B2FF;
    color: #0E1A2E;
    font-family: Oswald, sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.25s;
}

.wp-sticky-cta[hidden] {
    display: inline-flex;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    visibility: hidden;
}

.wp-sticky-cta:hover {
    background: #B2E0FF;
}

.wp-sticky-cta__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0E1A2E;
}

/* ===== Адаптив ===== */

@media (max-width: 1100px) {
    .wp-story {
        gap: 36px;
    }

    .wp-gallery .works-grid--mosaic {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .wp-hero {
        min-height: 640px;
        padding: 96px 16px 44px;
    }

    .wp-hero__mosaic {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(3, minmax(0, 1fr));
    }

    .wp-hero__tile--1 { grid-column: 1; grid-row: 1 / span 2; }
    .wp-hero__tile--2 { grid-column: 2; grid-row: 1; }
    .wp-hero__tile--3 { grid-column: 2; grid-row: 2; }
    .wp-hero__tile--4 { grid-column: 1; grid-row: 3; }
    .wp-hero__tile--5 { grid-column: 2; grid-row: 3; }
    .wp-hero__tile--6 { display: none; }

    .wp-hero__lead {
        font-size: 16px;
    }

    .wp-route,
    .wp-stories,
    .wp-gallery,
    .wp-final {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Маршрут: линия слева, остановки списком */
    .wp-route__line {
        gap: 40px;
        padding-left: 44px;
    }

    .wp-route__line::before {
        left: 17px;
        transform: none;
    }

    .wp-route__stop,
    .wp-route__stop--right {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .wp-route__node {
        top: 0;
        left: -44px;
        width: 38px;
        height: 38px;
        font-size: 14px;
        transform: none;
    }

    .wp-route__stop--right .wp-route__photo,
    .wp-route__stop--right .wp-route__text {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
        text-align: left;
    }

    .wp-route__text h3 {
        font-size: 24px;
    }

    .wp-story,
    .wp-story--flip {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .wp-story--flip .wp-story__media {
        order: 0;
    }

    .wp-gallery .works-grid--mosaic {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 170px;
    }

    .wp-final__inner {
        grid-template-columns: 1fr;
        padding: 28px 20px;
    }

    .wp-sticky-cta {
        left: 16px;
        right: 16px;
        bottom: 16px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .wp-gallery .works-grid--mosaic {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 150px;
    }

    .wp-gallery .works-grid--mosaic .works-grid__tile figcaption {
        font-size: 13px;
        padding: 30px 10px 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wp-sticky-cta {
        transition: none;
    }
}
