/* Робинзон Landing — styles.css */

@font-face {
    font-family: 'Tektur';
    src: url('/landing/fonts/Tektur/Tektur-VariableFont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.tektur-font {
    font-family: 'Tektur', sans-serif;
    color: #333;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: url('/landing/images/back.png') repeat;
    background-size: 200px 200px;
    background-attachment: scroll;
}

.content {
    position: relative;
    z-index: 1;
    font-size: 20px;
}

/* Верхний блок: один слой паттерна, символы синие (#007bff) */
.landing-top-pattern {
    position: relative;
    background-color: #fff;
}

.landing-top-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: rgba(0, 123, 255, 0.22);
    mask-image: url('/landing/images/back.png');
    mask-repeat: repeat;
    mask-size: 200px 200px;
    -webkit-mask-image: url('/landing/images/back.png');
    -webkit-mask-repeat: repeat;
    -webkit-mask-size: 200px 200px;
    pointer-events: none;
}

.landing-top-pattern > section {
    position: relative;
    z-index: 1;
}

/* Navbar */
.navbar {
    margin-bottom: 0;
    background-color: #007bff !important;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
}

.no-copy {
    user-select: none;
    -webkit-user-drag: none;
}

/* Hero / Jumbotron — прозрачный фон: паттерн только на body, без смещения плиток */
.jumbotron-yellow {
    padding: 100px 25px;
    color: #333;
    background: transparent;
}

.jumbotron-grey {
    background-color: #f7f7f7;
    padding: 100px 25px;
    color: #333;
}

/* Низ страницы: контакты + правовая информация — сплошной серый, без паттерна body */
.landing-bottom-grey {
    background-color: #f0f0f0;
    background-image: none;
    color: #333;
    padding: 3.5rem 1.25rem 2.5rem;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.landing-legal {
    border-top: 1px solid #c8c8c8;
}

.landing-legal__text {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    color: #5a5a5a;
    line-height: 1.6;
}

#services.jumbotron-grey {
    background-color: transparent;
    overflow-x: hidden;
}

/* Advantages */
.advantages {
    padding: 40px 20px;
    text-align: center;
    background: transparent;
}

.start-section {
    width: 100%;
    position: relative;
}

.about-section {
    padding: 45px 0 70px;
}

.about-section__items {
    display: flex;
    color: #444;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.about-section__item {
    max-width: 260px;
    min-width: 220px;
    flex: 1 1 240px;
    background-color: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    padding: 24px 18px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-section__item-text {
    font-size: 20px;
    line-height: 32px;
    margin: 0;
}

.about-section__item-img {
    object-fit: contain;
    height: auto;
    align-self: center;
    margin-bottom: 16px;
}

.advantages .about-section {
    padding: 0;
    margin: 0 auto;
    max-width: 1200px;
}

.advantages .about-section__items {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    align-items: stretch;
}

.advantages .about-section__item {
    min-width: 220px;
    max-width: 270px;
    flex: 1 1 220px;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    align-self: stretch;
}

.advantages .about-section__item-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
}

.advantages .about-section__item-text {
    font-size: 16px;
    line-height: 24px;
    color: #444;
    font-weight: 500;
}

/* Services */
#services h2, #gallery h2, #contacts h2 {
    margin-bottom: 30px;
}

.vk-posts-section {
    background: transparent;
}

.vk-posts-carousel {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 56px;
}

.vk-posts-carousel__stage {
    position: relative;
}

.vk-posts-carousel__viewport {
    height: 420px;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

.vk-posts-carousel__viewport .carousel-item {
    height: 100%;
}

.vk-post-slide {
    display: flex;
    flex-direction: row;
    height: 100%;
    overflow: hidden;
}

.vk-post-slide__media {
    flex: 0 0 42%;
    max-width: 42%;
    background: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vk-post-slide__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.vk-post-slide__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007bff 0%, #5aa9ff 100%);
    color: #fff;
    font-size: 26px;
}

.vk-post-slide__content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 22px 26px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vk-post-slide__title {
    font-size: 22px;
    line-height: 1.3;
    margin: 0 0 12px;
    flex-shrink: 0;
}

.vk-post-slide__text {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    padding-right: 4px;
}

.vk-post-slide__text::-webkit-scrollbar {
    width: 6px;
}

.vk-post-slide__text::-webkit-scrollbar-thumb {
    background: rgba(0, 123, 255, 0.35);
    border-radius: 3px;
}

.vk-post-slide__footer {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    gap: 12px;
}

.vk-posts-carousel__side {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, transform 0.2s;
}

.vk-posts-carousel__side:hover,
.vk-posts-carousel__side:focus {
    background: #0056b3;
    color: #fff;
    text-decoration: none;
    transform: translateY(-50%) scale(1.05);
}

.vk-posts-carousel__side--prev {
    left: -56px;
}

.vk-posts-carousel__side--next {
    right: -56px;
}

.vk-posts-carousel__dots {
    position: static;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vk-posts-carousel__dots li {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 0;
    background-color: rgba(0, 123, 255, 0.25);
    border: none;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.vk-posts-carousel__dots li.active {
    background-color: #007bff;
    transform: scale(1.25);
}

@media (max-width: 768px) {
    .vk-posts-carousel__viewport {
        height: 520px;
    }

    .vk-post-slide {
        flex-direction: column;
    }

    .vk-post-slide__media {
        flex: 0 0 200px;
        max-width: 100%;
    }

    .vk-post-slide__content {
        padding: 16px 18px 18px;
    }

    .vk-post-slide__title {
        font-size: 18px;
    }

    .vk-post-slide__text {
        font-size: 15px;
    }
}

/* Услуги: 3–5 штук — симметричный ряд без слайдера */
.services-static--fullwidth {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 24px 20px 32px;
    box-sizing: border-box;
}

.services-static__grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    max-width: 1680px;
    margin: 0 auto;
}

.services-static__grid .service-card {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: 320px;
    min-height: 400px;
    opacity: 1;
    transform: none;
    scroll-snap-align: unset;
}

.services-static--3 .services-static__grid .service-card {
    max-width: 380px;
}

.services-static--4 .services-static__grid .service-card {
    max-width: 340px;
}

.services-static--5 .services-static__grid .service-card {
    max-width: 300px;
}

.services-static__grid .service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 80, 160, 0.18);
}

@media (max-width: 1199px) {
    .services-static__grid {
        flex-wrap: wrap;
    }

    .services-static--3 .services-static__grid .service-card {
        flex: 0 1 calc(33.333% - 14px);
        max-width: none;
    }

    .services-static--4 .services-static__grid .service-card {
        flex: 0 1 calc(50% - 12px);
        max-width: none;
    }

    .services-static--5 .services-static__grid .service-card {
        flex: 0 1 calc(33.333% - 14px);
        max-width: none;
    }
}

@media (max-width: 767px) {
    .services-static--3 .services-static__grid .service-card,
    .services-static--4 .services-static__grid .service-card,
    .services-static--5 .services-static__grid .service-card {
        flex: 0 1 100%;
        max-width: 360px;
    }
}

/* Услуги: горизонтальная лента-слайдер на всю ширину экрана */
.services-slider {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.services-slider--fullwidth {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0 72px;
    box-sizing: border-box;
}

.services-slider__stage {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.services-slider__track {
    --services-card-width: 300px;
    --services-gap: 24px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: var(--services-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 24px calc(50% - var(--services-card-width) / 2) 24px;
    justify-content: flex-start;
}

.services-slider__track::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.services-slider__track--single {
    justify-content: center;
    padding-left: 16px;
    padding-right: 16px;
}

.services-slider__side {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #007bff;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, transform 0.2s;
}

.services-slider__side:hover,
.services-slider__side:focus {
    background: #0056b3;
    color: #fff;
    outline: none;
    transform: translateY(-50%) scale(1.05);
}

.services-slider__side--prev {
    left: 16px;
}

.services-slider__side--next {
    right: 16px;
}

.services-slider__side:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: translateY(-50%);
    pointer-events: none;
}

.service-card {
    box-sizing: border-box;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 123, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0, 60, 120, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.services-slider__track .service-card {
    flex: 0 0 var(--services-card-width);
    width: var(--services-card-width);
    min-height: 400px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card__media {
    flex: 0 0 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: linear-gradient(180deg, #f0f6ff 0%, #fff 100%);
}

.services-slider__track .service-img,
.services-static__grid .service-img {
    width: auto;
    max-width: 100%;
    max-height: 170px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.service-card__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 22px;
    gap: 16px;
}

.service-card__title {
    font-size: 1.2rem;
    line-height: 1.35;
    margin: 0;
    color: #222;
}

.service-card__btn {
    margin: 0;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 140px;
}

@media (max-width: 768px) {
    .vk-posts-carousel {
        padding: 0 44px;
    }

    .vk-posts-carousel__side {
        width: 40px;
        height: 40px;
    }

    .vk-posts-carousel__side--prev {
        left: -44px;
    }

    .vk-posts-carousel__side--next {
        right: -44px;
    }
}

@media (min-width: 1400px) {
    .services-slider__track {
        --services-card-width: 320px;
    }
}

@media (max-width: 767px) {
    .services-slider__track {
        --services-card-width: 280px;
    }

    .services-slider__track .service-card {
        min-height: 380px;
    }

    .services-slider__track .service-card__media {
        flex-basis: 190px;
    }
}

@media (max-width: 576px) {
    .services-slider--fullwidth {
        padding: 0 52px;
    }

    .services-slider__track {
        --services-card-width: min(300px, 78vw);
    }

    .services-slider__side {
        width: 40px;
        height: 40px;
    }

    .services-slider__side--prev {
        left: 8px;
    }

    .services-slider__side--next {
        right: 8px;
    }
}

.services-slider__track .service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 80, 160, 0.18);
}

.service-img {
    display: block;
    margin: 0 auto;
    width: 250px;
    height: auto;
}

.service-card button {
    margin-bottom: 15px;
}

/* Gallery */
.gallery-section {
    background: #007bff;
    padding: 80px 20px;
    color: #fff;
    text-align: center;
}

.gallery-section h2 {
    font-size: 48px;
    margin-bottom: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.fade-in {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Map */
#map {
    margin-top: 20px;
}

/* Ссылки на документы — одна линия */
.landing-legal__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.landing-legal__links li {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
}

.landing-legal__links li + li::before {
    content: "·";
    margin: 0 0.65rem;
    color: #888;
    font-weight: bold;
}

.landing-legal__links a {
    color: #0056b3;
    text-decoration: underline;
    white-space: nowrap;
}

.landing-legal__links a:hover {
    color: #003d82;
}

/* Modal */
.modal {
    z-index: 1050 !important;
}

.modal-backdrop {
    z-index: 1040 !important;
}

.modal-body p {
    font-size: 16px;
}

/* Container override */
.container {
    max-width: 1400px;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid img:nth-last-child(1):nth-child(odd) {
        grid-column: 1 / -1;
    }
}

@media only screen and (max-width: 639px) {
    .advantages {
        display: none;
    }
}

@media only screen and (max-width: 1279px) {
    .advantages .about-section__items {
        justify-content: center;
    }

    .advantages .about-section__item {
        max-width: 200px;
    }

    .advantages .about-section__item-text {
        font-size: 14px;
        line-height: 20px;
    }
}

@media only screen and (max-width: 639px) {
    .advantages .about-section__items {
        flex-direction: column;
        gap: 30px;
    }

    .advantages .about-section__item {
        max-width: 100%;
    }

    .advantages .about-section__item-img {
        width: 80px;
        height: 80px;
    }

    .advantages .about-section__item-text {
        font-size: 14px;
        line-height: 20px;
    }
}
