/* =====================================================================
   Стили блоков, перенесённых с platform: casebook, partners, contact.
   Извлечено из /styles/template-new.css и /platform/styles/platform.css.
   Переменные и селекторы изолированы, чтобы не конфликтовать с дизайном
   лендинга (в частности .btn-dark лендинга -> здесь .pf-btn-dark).
   ===================================================================== */

:root {
    --white: #fff;
    --black: #141414;
    --btn-color-1: #6103AC;
    --btn-color-1-hover: #932CE5;
    --btn-color-3: #F93790;
    --btn-color-6: #2D2D2D;
    --btn-color-6-hover: #454545;
    --btn-disabled-text: #39396866;
    --theme-dark-text: #7B7B7B;
    --button-size: 20px;
    --h2-title: 50px;
    --h2-text: 24px;
    --h3-text: 20px;
    --case-title: 40px;
    --case-text: 22px;
}

@media (max-width: 1440px) {
    :root {
        --h2-text: 22px;
        --h2-title: 42px;
        --h3-text: 18px;
    }
}

@media (max-width: 1230px) {
    :root {
        --h2-title: 38px;
        --h2-text: 18px;
        --h3-text: 16px;
        --case-title: 32px;
        --case-text: 18px;
    }
}

@media (max-width: 964px) {
    :root {
        --h2-title: 34px;
    }
}

@media (max-width: 730px) {
    :root {
        --h2-title: 28px;
        --h2-text: 16px;
        --case-title: 28px;
    }
}

/* --- контейнер --- */

.container {
    max-width: 1470px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
}

@media (max-width: 1440px) {
    .container { max-width: 1230px; }
}

@media (max-width: 1230px) {
    .container { max-width: 964px; padding: 0 10px; }
}

@media (max-width: 964px) {
    .container { max-width: 740px; }
}

@media (max-width: 730px) {
    .container { max-width: 100%; padding: 0 10px; }
}

/* --- типографика --- */

.title-h2 {
    font-size: var(--h2-title);
    font-weight: 600;
    line-height: 1.2;
    color: var(--black);
}

.text-h2 {
    font-size: var(--h2-text);
    font-weight: 400;
    line-height: 1.2;
    color: var(--theme-dark-text);
}

.text-h3 {
    font-size: var(--h3-text);
    font-weight: 500;
    line-height: 1.2;
    color: var(--theme-dark-text);
}

.title-case {
    font-size: var(--case-title);
    line-height: 1;
    font-weight: 600;
    text-transform: uppercase;
}

.text-case {
    font-size: var(--case-text);
    line-height: 1;
    font-weight: 500;
}

/* --- секции --- */

.section {
    padding-top: 100px;
}

@media (max-width: 1230px) {
    .section { padding-top: 60px; }
}

/* --- кнопки --- */

.button {
    position: relative;
    padding: 13px 40px;
    color: var(--white);
    border-radius: 50px;
    border: 0;
    min-width: 220px;
    min-height: 50px;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: var(--button-size);
    font-weight: 500;
    transition: .3s all ease-in-out;
}

.btn-pink {
    background-color: var(--btn-color-3);
}

.pf-btn-dark {
    background-color: var(--btn-color-6);
}

.pf-btn-dark:active,
.pf-btn-dark:hover {
    background-color: var(--btn-color-6-hover);
}

@media screen and (max-width: 450px) {
    .button {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* --- бегущая строка (partners) --- */

/* сброс маркеров списков (на platform берётся из глобального template.css) */
.casebook__list,
.running-line__track {
    list-style: none;
}

.running-line {
    width: 100%;
    overflow: hidden;
    position: relative;
    min-height: 60px;
    z-index: 5;
}

.running-line__track {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
    height: 100%;
}

.running-line__item {
    height: 100%;
    margin-left: 70px;
    display: flex;
    align-items: center;
}

.running-line__item img {
    display: block;
    pointer-events: none;
    max-height: 100%;
}

.partners {
    position: relative;
    z-index: 1;
}

.partners__line {
    filter: grayscale(1);
    opacity: 0.5;
}

.partners__line .running-line__item {
    margin-left: 100px;
}

@media (max-width: 1230px) {
    .partners__line { min-height: 50px; }
    .partners__line .running-line__item { margin-left: 80px; }
}

@media (max-width: 964px) {
    .partners__line { min-height: 40px; }
    .partners__line .running-line__item { margin-left: 70px; }
}

@media (max-width: 450px) {
    .partners__line { opacity: 0.2; }
}

/* --- casebook (истории клиентов) --- */

.casebook {
    overflow: hidden;
    position: relative;
    z-index: 4;
}

.casebook .title-h2 {
    margin-bottom: 40px;
}

.swiper.casebook__wrapper {
    left: 50%;
    transform: translateX(-50%);
    width: 1920px;
    margin-bottom: 40px;
    padding-left: 240px;
}

.casebook__logo {
    position: absolute;
    top: 50px;
    left: 60px;
}

.casebook__logo img {
    width: 100%;
    height: 45px;
}

.casebook__case {
    position: relative;
    color: var(--white);
    padding: 52px 60px 60px;
    min-height: 400px;
    border-radius: 50px;
    background-size: cover;
    display: flex;
    align-items: end;
    justify-content: space-between;
    overflow: hidden;
}

.casebook__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.casebook__bg img {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
}

.casebook__case.swiper-slide {
    display: flex;
    width: 950px;
    background-color: var(--btn-color-1);
}

.casebook__box {
    position: relative;
    width: 100%;
}

.casebook__text-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.casebook__tag {
    display: inline-block;
    margin-bottom: 40px;
    font-size: 20px;
    font-weight: 400;
    text-transform: uppercase;
    padding: 8px 20px;
    background-color: rgba(255, 255, 255, 0.2);
    line-height: 1;
    border-radius: 50px;
}

.casebook__title {
    margin-bottom: 20px;
}

.casebook__link {
    position: relative;
    left: -30px;
    font-weight: 500;
    line-height: 1;
    border-bottom: 2px solid var(--white);
    font-size: var(--button-size);
}

.casebook__link::before {
    content: "";
    display: inline-block;
    width: 22px;
    height: 19px;
    background-image: url('data:image/svg+xml;utf8,<svg width="22" height="19" viewBox="0 0 22 19" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.8023 0.5L21.8024 9.5L12.8023 18.5H8.48235L15.9223 11.06H0.652344V7.94H15.9223L8.48235 0.5H12.8023Z" fill="white"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    position: absolute;
    top: 50%;
    right: -30px;
    transform: translate(0, -50%);
    transition: .2s linear;
}

.casebook__link:hover::before {
    transform: translate(20%, -50%);
}

.casebook__slider-btns {
    position: relative;
    display: none;
    justify-content: center;
    align-items: center;
    gap: 70px;
    height: 40px;
    margin-top: 10px;
}

.casebook__slider-btn.swiper-button-prev,
.casebook__slider-btn.swiper-button-next {
    width: 50%;
    margin: 0;
    top: 0;
    opacity: 0.6;
}

.casebook__slider-btn.swiper-button-prev:hover,
.casebook__slider-btn.swiper-button-next:hover {
    opacity: 1;
}

.casebook__slider-btn.swiper-button-next:after,
.casebook__slider-btn.swiper-button-prev:after {
    font-size: 23px;
    color: var(--black);
    font-weight: 700;
}

@media (max-width: 1440px) {
    .swiper.casebook__wrapper { width: 1680px; }
}

@media (max-width: 1230px) {
    .swiper.casebook__wrapper { width: 1425px; }
    .casebook__case { padding: 48px 35px; border-radius: 40px; }
    .casebook__title { line-height: 1.2; }
    .casebook__tag { margin-bottom: 30px; }
    .casebook__logo { left: 35px; }
}

@media (max-width: 964px) {
    .swiper.casebook__wrapper { width: 1200px; }
    .casebook__case { min-height: 346px; padding: 25px 25px 40px; }
    .casebook__logo { top: 25px; left: 25px; }
}

@media (max-width: 730px) {
    .swiper.casebook__wrapper {
        width: 100%;
        padding-left: 0;
        left: 0;
        transform: none;
        margin-bottom: 0;
    }
    .casebook__case { padding: 20px 20px 30px; border-radius: 30px; }
    .casebook__text-box { flex-direction: column; align-items: baseline; gap: 12px; }
    .casebook__link { left: 0; font-size: 18px; }
    .casebook__link::before { width: 18px; height: 18px; right: -25px; }
    .casebook__title { margin-bottom: 10px; }
    .casebook .title-h2 { margin-bottom: 20px; }
    .casebook__slider-btns { display: flex; }
}

@media (max-width: 450px) {
    .casebook__bg { width: 170%; }
    .casebook__tag { margin-bottom: 20px; font-size: 18px; }
}

/* --- contact (форма) --- */

.contact {
    padding-bottom: 100px;
    position: relative;
    z-index: 0;
    overflow: hidden;
}

/* анимированный WebGL-градиент за секцией contact (нижний блок страницы) */
.contact__background::before {
    box-shadow: 0px 80px 100px -40px #F8F9FF inset, 0px -80px 100px -40px #F8F9FF inset;
}

#contact-remarketing-canvas {
    --gradient-color-1: #cfeda5; 
    --gradient-color-2: #9ab3f4; 
    --gradient-color-3: #F8F9FF;
    --gradient-color-4: #9ab3f4;
}

.contact__wrapper {
    position: relative;
    display: flex;
    align-items: center;
    padding: 90px 120px 70px 80px;
    border-radius: 50px;
    gap: 90px;
    min-height: 530px;
    background-color: #F8F9FF;
}

.contact__text-block {
    max-width: 560px;
    width: 100%;
}

.contact__title {
    margin-bottom: 20px;
}

.contact__form-block {
    max-width: 590px;
    width: 100%;
}

.contact-form fieldset {
    display: flex;
    flex-direction: column;
    gap: 36px;
    margin-bottom: 40px;
    border: 0;
    padding: 0;
}

.form__label {
    position: relative;
}

.form__field {
    width: 100%;
    font-size: 24px;
    color: var(--black);
    padding-bottom: 18px;
    border: 0;
    border-bottom: 1px solid var(--theme-dark-text);
    background-color: transparent;
}

.form__field::placeholder {
    color: #C3C3C3;
    line-height: 300;
}

.check__label {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--theme-dark-text);
}

.check__input,
.check__input:disabled {
    background-color: transparent;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.check__box {
    min-width: 30px;
    height: 30px;
    border-radius: 5px;
    border: 1px solid var(--theme-dark-text);
    position: relative;
    margin-left: -15px;
}

.check__box::before {
    content: '';
    display: block;
    width: 80%;
    height: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 4px;
    background: url('/images/home/svg/check-mark.svg') center var(--btn-color-1);
    background-repeat: no-repeat;
    background-size: 60%;
    transform: translate(-50%, -50%);
    transition: .1s ease-in-out;
    opacity: 0;
    box-shadow: 0px 0px 5px 0px var(--btn-color-1);
}

.check__input:checked + .check__box::before {
    opacity: 1;
}

.check__box-text {
    font-size: 16px;
    line-height: 1.2;
}

.check__box-text a {
    color: var(--btn-color-6);
}

.check__box-text a:hover {
    text-decoration: underline;
}

.form__error {
    position: absolute;
    bottom: -15px;
    left: 0;
    padding-top: 5px;
    font-size: 12px;
    color: red;
}

.footer-form__response {
    font-size: 16px;
    margin-top: 20px;
    display: none;
}

.footer-form.loading .footer-form__response {
    color: orange;
    border-color: orange;
    display: block;
}

.footer-form.success .footer-form__response {
    color: green;
    border-color: green;
    display: block;
}

.footer-form.failure .footer-form__response {
    color: red;
    border-color: red;
    display: block;
}

@media (max-width: 1440px) {
    .form__field { font-size: 20px; }
}

@media (max-width: 1230px) {
    .contact { padding-bottom: 60px; }
    .contact__wrapper {
        min-height: 860px;
        flex-direction: column;
        gap: 40px;
        padding: 140px 80px 80px;
        align-items: baseline;
        border-radius: 40px;
    }
    .check__box-text,
    .contact__text { font-size: 20px; }
    .contact-form fieldset { gap: 40px; }
    .form__send-btn { min-height: 54px; }
}

@media (max-width: 964px) {
    .contact { padding-top: 30px; }
    .contact__wrapper { min-height: 874px; padding: 118px 80px 80px; }
}

@media (max-width: 730px) {
    .contact__wrapper {
        padding: 140px 40px 90px;
        flex-direction: column;
        align-items: baseline;
        gap: 50px;
        background-color: #fff;
    }
    .check__box { min-width: 30px; height: 30px; }
    .check__box-text { font-size: 16px; }
}

@media (max-width: 450px) {
    .contact__wrapper {
        padding: 80px 20px 65px;
        min-height: 710px;
        border-radius: 30px;
        gap: 20px;
        justify-content: space-between;
    }
    .contact__text { font-size: 18px; }
    .check__box { min-width: 25px; height: 25px; }
    .check__box-text { font-size: 14px; }
    .form__send-btn { width: 100%; }
}
