/* ============================================================
   Кейсы (новый) — page-cases-new.php
   ============================================================ */

.cases-new-page .site-container {
    background: #F2F7FF;
    overflow: visible;
}

.cases-new {
    background: #F2F7FF;
    padding: 0 0 100px;
    font-family: 'Hero New', sans-serif;
    color: #2C2C2C;
    overflow: visible;
}

.cases-new *,
.cases-new *::before,
.cases-new *::after {
    box-sizing: border-box;
}

.cases-new__container {
    width: min(1400px, calc(100vw - 48px));
    max-width: 1400px;
    margin: 0 auto;
}

/* ---------- Хлебные крошки ---------- */

.cases-new__breadcrumbs {
    padding: 10px 0;
}

.cases-new__breadcrumbs-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: 19px;
}

.cases-new__breadcrumbs a,
.cases-new__breadcrumbs-current {
    font-weight: 500;
    font-size: 16px;
    line-height: 120%;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.cases-new__breadcrumbs a {
    color: #2C2C2C;
}

.cases-new__breadcrumbs a:hover {
    color: #4A5FE6;
}

.cases-new__breadcrumbs-current {
    color: rgba(44, 44, 44, 0.4);
}

.cases-new__breadcrumbs-sep {
    display: inline-block;
    width: 30px;
    height: 0;
    border-top: 1px solid #2C2C2C;
    flex: 0 0 auto;
}

/* ---------- Заголовок ---------- */

.cases-new__title {
    margin: 80px 0 0;
    font-family: 'Hero New', sans-serif;
    font-weight: 800;
    font-size: 64px;
    line-height: 105%;
    letter-spacing: -0.02em;
    color: #2C2C2C;
}

.cases-new__title span {
    color: #4A5FE6;
}

.cases-new__line {
    margin-top: 40px;
    border-top: 1px solid rgba(179, 179, 179, 0.4);
}

/* ---------- Лейаут ---------- */

.cases-new__layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 12px;
}

/* ---------- Сайдбар с фильтрами ---------- */

.cases-new__sidebar {
    flex: 0 0 232px;
    width: 232px;
    background: rgba(179, 179, 179, 0.1);
    border-radius: 10px;
    padding: 30px 10px 10px;
    box-sizing: border-box;
}

.cases-new__filters-title {
    font-weight: 600;
    font-size: 28px;
    line-height: 130%;
    color: #2C2C2C;
    margin-bottom: 40px;
}

.cases-new__filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cases-new__filter-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 20px;
}

.cases-new__filter-head {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 8px 5px;
    background: rgba(74, 95, 230, 0.2);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Hero New', sans-serif;
}

.cases-new__filter-head-title {
    padding: 0 5px;
    font-weight: 600;
    font-size: 16px;
    line-height: 120%;
    letter-spacing: -0.02em;
    color: #2C2C2C;
}

.cases-new__filter-head-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transform: rotate(-90deg);
    transition: transform 0.25s ease;
}

.cases-new__filter-group.is-open .cases-new__filter-head-arrow {
    transform: rotate(0deg);
}

.cases-new__filter-body {
    display: none;
    flex-direction: column;
    gap: 14px;
}

.cases-new__filter-group.is-open .cases-new__filter-body {
    display: flex;
}

/* Чекбокс */

.cases-new__filter {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 21px;
    cursor: pointer;
}

.cases-new__filter input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.cases-new__filter-box {
    box-sizing: border-box;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    background: rgba(247, 247, 247, 0.1);
    border: 1px solid #2C2C2C;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cases-new__filter-box svg {
    width: 12px;
    height: 10px;
    visibility: hidden;
}

.cases-new__filter input:checked + .cases-new__filter-box svg {
    visibility: visible;
}

.cases-new__filter-label {
    font-weight: 400;
    font-size: 16px;
    line-height: 120%;
    letter-spacing: -0.02em;
    color: #2C2C2C;
}

/* ---------- Выбранные фильтры (чипсы) ---------- */

.cases-new__content {
    flex: 1 1 auto;
    min-width: 0;
}

.cases-new__selected {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    min-height: 39px;
    margin-top: 28px;
    margin-bottom: 40px;
}

.cases-new__chips {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cases-new__chip {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px 14px;
    gap: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #2C2C2C;
    backdrop-filter: blur(25px);
    border-radius: 25px;
    font-weight: 500;
    font-size: 16px;
    line-height: 120%;
    letter-spacing: -0.02em;
    color: #2C2C2C;
}

.cases-new__chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.cases-new__chip-remove svg {
    width: 10px;
    height: 10px;
}

.cases-new__reset {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: 'Hero New', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 120%;
    letter-spacing: -0.02em;
    color: #2C2C2C;
    transition: opacity 0.2s ease;
}

.cases-new__reset:hover {
    opacity: 0.6;
}

/* hidden не должен проигрывать display: flex */
.cases-new__selected[hidden],
.cases-new__empty[hidden] {
    display: none;
}

/* ---------- Список кейсов ---------- */

.cases-new__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cases-new__case {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: stretch;
    width: 100%;
    min-height: 554px;
    filter: drop-shadow(-1px -1px 12.5px rgba(0, 54, 246, 0.1));
}

/* Левая часть — картинка */

.cases-new__case-media {
    position: relative;
    flex: 0 0 418px;
    width: 418px;
    min-height: 554px;
    border-radius: 30px;
    background-color: #edeeff;
    background-image:
        linear-gradient(0deg, rgba(0, 35, 231, 0.1), rgba(0, 35, 231, 0.1)),
        var(--case-media-image, url('../img/case-card-bg.png'));
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.cases-new__case-chip {
    box-sizing: border-box;
    position: absolute;
    left: 20px;
    top: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(25px);
    border-radius: 25px;
    font-weight: 500;
    font-size: 16px;
    line-height: 120%;
    letter-spacing: -0.04em;
    color: #2C2C2C;
    white-space: nowrap;
}

/* Правая часть — белая карточка */

.cases-new__case-card {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin-left: -130px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 40px;
    gap: 40px;
    background: #FFFFFF;
    border-radius: 30px;
}

.cases-new__case-title {
    margin: 0;
    font-weight: 600;
    font-size: 24px;
    line-height: 120%;
    letter-spacing: -0.02em;
    color: #2C2C2C;
}

/* Метрики */

.cases-new__case-stats {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    align-self: stretch;
}

.cases-new__stat {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
}

.cases-new__stat-value {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 4px;
    max-width: 100%;
    overflow: visible;
    white-space: nowrap;
}

.cases-new__stat-plus,
.cases-new__stat-num,
.cases-new__stat-percent {
    background: linear-gradient(180deg, #3F79FF 0%, #004DFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    white-space: nowrap;
}

.cases-new__stat-plus {
    font-weight: 600;
    font-size: 22px;
    line-height: 105%;
    letter-spacing: -0.02em;
}

.cases-new__stat-num {
    font-weight: 700;
    font-size: 40px;
    line-height: 105%;
    letter-spacing: -0.09em;
    padding: 0.06em 0.03em 0.08em;
}

.cases-new__stat-percent {
    font-weight: 600;
    font-size: 26px;
    line-height: 105%;
    letter-spacing: -0.02em;
}

.cases-new__stat-label {
    font-weight: 400;
    font-size: 18px;
    line-height: 108%;
    letter-spacing: -0.03em;
    color: #2C2C2C;
}

/* Разделитель */

.cases-new__case-divider {
    align-self: stretch;
    border-top: 1px solid rgba(179, 179, 179, 0.4);
}

/* Проблема / Решение */

.cases-new__case-cols {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 50px;
    align-self: stretch;
}

.cases-new__case-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cases-new__case-col-title {
    font-weight: 700;
    font-size: 18px;
    line-height: 120%;
    letter-spacing: -0.05em;
}

.cases-new__case-col-title--problem {
    color: #FF0000;
}

.cases-new__case-col-title--solution {
    color: #009A12;
}

.cases-new__case-col-text {
    margin: 0;
    font-weight: 400;
    font-size: 14px;
    line-height: 120%;
    letter-spacing: -0.02em;
    color: rgba(44, 44, 44, 0.6);
}

/* Низ карточки */

.cases-new__case-footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 31px;
    align-self: stretch;
    margin-top: auto;
}

.cases-new__case-person {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.cases-new__case-photo {
    width: 63px;
    height: 63px;
    border-radius: 100px;
    object-fit: cover;
}

.cases-new__case-person-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cases-new__case-person-name {
    font-weight: 600;
    font-size: 16px;
    line-height: 120%;
    color: #2C2C2C;
}

.cases-new__case-person-role {
    font-weight: 400;
    font-size: 14px;
    line-height: 120%;
    letter-spacing: -0.02em;
    color: rgba(44, 44, 44, 0.6);
}

.cases-new__case-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 30px;
    min-height: 51px;
    background: linear-gradient(180deg, #FFE588 0%, #FFC702 100%);
    border-radius: 40px;
    font-weight: 500;
    font-size: 16px;
    line-height: 120%;
    letter-spacing: -0.02em;
    color: #2C2C2C;
    text-decoration: none;
    white-space: nowrap;
    transition: filter 0.2s ease;
}

.cases-new__case-btn:hover {
    filter: brightness(0.97);
}

/* Пустой результат */

.cases-new__empty {
    padding: 60px 0;
    text-align: center;
    font-weight: 500;
    font-size: 20px;
    line-height: 130%;
    color: rgba(44, 44, 44, 0.6);
}

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

@media (max-width: 1100px) {
    .cases-new__layout {
        flex-direction: column;
    }

    .cases-new__sidebar {
        flex: none;
        width: 100%;
    }

    .cases-new__case {
        flex-direction: column;
        min-height: 0;
    }

    .cases-new__case-media {
        flex: none;
        width: 100%;
        min-height: 280px;
    }

    .cases-new__case-card {
        flex: none;
        width: 100%;
        margin: -60px 0 0;
    }
}

@media (max-width: 768px) {
    .cases-new {
        padding: 0 0 60px;
    }

    .cases-new__title {
        margin-top: 32px;
        font-size: 32px;
    }

    .cases-new__breadcrumbs a,
    .cases-new__breadcrumbs-current {
        font-size: 14px;
    }

    .cases-new__breadcrumbs-sep {
        width: 20px;
    }

    .cases-new__line {
        margin-top: 24px;
    }

    /* Сайдбар */

    .cases-new__sidebar {
        padding: 20px 10px 10px;
    }

    .cases-new__filters-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    /* Выбранные фильтры */

    .cases-new__selected {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 25px;
    }

    /* Карточка кейса */

    .cases-new__case-media {
        min-height: 220px;
        border-radius: 24px;
    }

    .cases-new__case-chip {
        left: 15px;
        top: 15px;
        padding: 8px 12px;
        font-size: 14px;
    }

    .cases-new__case-card {
        width: 100%;
        margin: -70px 0 0;
        padding: 20px 16px;
        gap: 16px;
        border-radius: 20px;
    }

    .cases-new__case-title {
        font-size: 16px;
    }

    /* Метрики — всегда в одну строку */

    .cases-new__case-stats {
        gap: 8px;
        flex-wrap: nowrap;
    }

    .cases-new__stat {
        flex: 1 1 0;
        min-width: 0;
    }

    .cases-new__stat-plus {
        font-size: 12px;
    }

    .cases-new__stat-num {
        font-size: 18px;
    }

    .cases-new__stat-percent {
        font-size: 12px;
    }

    .cases-new__stat-label {
        font-size: 11px;
    }

    /* Проблема / Решение */

    .cases-new__case-cols {
        flex-direction: column;
        gap: 16px;
    }

    /* Низ карточки */

    .cases-new__case-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .cases-new__case-photo {
        width: 44px;
        height: 44px;
    }

    .cases-new__case-btn {
        width: 100%;
        box-sizing: border-box;
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .cases-new__container {
        width: calc(100vw - 32px);
    }
}

@media (max-width: 400px) {
    .cases-new__stat-num {
        font-size: 16px;
    }

    .cases-new__stat-label {
        font-size: 10px;
    }
}
