/* ================================================================
   cases-hero
   ================================================================ */
.cases-hero {
    background-color: var(--color-body);
    padding: calc(var(--header-height) + 40px) 0 60px;
    text-align: center;
}

.cases-hero__container {
    width: 100%;
    max-width: var(--header-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cases-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    color: var(--color-red);
    text-transform: lowercase;
}

.cases-hero__badge svg {
    flex-shrink: 0;
}

.cases-hero__title {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.15;
    color: var(--color-white);
    margin: 0;
    max-width: 700px;
}

.cases-hero__subtitle {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: clamp(13px, 1.1vw, 16px);
    line-height: 1.6;
    color: var(--color-gray-300);
    margin: 0;
    max-width: 520px;
}

/* ================================================================
   cases-archive
   ================================================================ */
.cases-archive {
    background-color: var(--color-body);
    padding: 0 0 100px;
}

.cases-archive__container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ---- filters ---- */
.cases-archive__filters {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding-bottom: 0;
}

.cases-archive__filter {
    appearance: none;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.5);
    padding: 12px 24px;
    border-radius: 100px;
    transition: color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.cases-archive__filter:hover,
.cases-archive__filter:focus,
.cases-archive__filter:active {
    outline: none;
    box-shadow: none;
    background-color: transparent;
}

@media (hover: hover) {
    .cases-archive__filter:hover {
        color: var(--color-white);
    }
}

.cases-archive__filter.is-active {
    background-color: var(--color-red);
    color: var(--color-white);
}

/* ---- grid ---- */
.cases-archive__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.cases-archive__empty {
    font-family: var(--font-primary);
    font-size: 16px;
    color: var(--color-gray-500);
    text-align: center;
    padding: 80px 0;
}

/* ================================================================
   case-card
   ================================================================ */
.case-card {
    position: relative;
    background:
        radial-gradient(90% 75% at 50% 100%, rgba(124, 16, 16, 0.18) 0%, rgba(124, 16, 16, 0) 72%),
        linear-gradient(180deg, #171719 0%, #111214 100%);
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 20px 44px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition:
        transform 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        opacity 0.28s ease;
}

.case-card.is-hidden {
    opacity: 0;
    transform: scale(0.97);
}

.case-card.is-visible {
    opacity: 1;
    transform: scale(1);
}

@media (hover: hover) {
    .case-card:hover {
        transform: translateY(-3px);
        border-color: rgba(255, 255, 255, 0.09);
        box-shadow:
            0 24px 54px rgba(0, 0, 0, 0.34),
            inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }
}

/* ---- image ---- */
.case-card__img {
    position: relative;
    width: 100%;
 
    overflow: hidden;
    background: #090909;
}

.case-card__img::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 64px;
    background: linear-gradient(180deg, rgba(9, 9, 9, 0) 0%, rgba(9, 9, 9, 0.22) 100%);
    pointer-events: none;
}

.case-card__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.45s ease;
}

@media (hover: hover) {
    .case-card:hover .case-card__img img {
        transform: scale(1.02);
    }
}

/* ---- body ---- */
.case-card__body {
    padding: 14px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ---- tags ---- */
.case-card__tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.case-card__tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.018);
    color: rgba(255, 255, 255, 0.58);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.case-card__tag img,
.case-card__tag svg {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    object-fit: contain;
}

/* ---- title ---- */
.case-card__title {
    margin: 0;
    color: var(--color-white);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 22px;
    line-height: 1.28;
    letter-spacing: -0.01em;
}

/* ---- stats ---- */
.case-card__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.case-card__stat {
    min-height: 80px;
    padding: 12px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.022) 0%, rgba(255, 255, 255, 0.01) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-align: center;
}

.case-card__stat-val {
    color: #ff3b30;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 22px;
    line-height: 1;
  
}

.case-card__stat-lbl {
    color: rgba(255, 255, 255, 0.42);
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 9px;
    line-height: 1.32;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ---- more ---- */
.case-card__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-top: 2px;
    text-decoration: none;
    color: #ff3b30;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.case-card__more:hover,
.case-card__more:focus,
.case-card__more:active {
    outline: none;
    box-shadow: none;
    background: transparent;
}

@media (hover: hover) {
    .case-card__more:hover {
        color: #ff554b;
        transform: translateX(2px);
    }
}

/* ================================================================
   homepage slider section
   ================================================================ */
.cases-home {
    background-color: #0D0D0D;
    padding: 62px 0 74px;
}

.cases-home__container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cases-home__heading {
    margin: 0 0 20px;
    color: var(--color-white);
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0;
}

/* ---- slider ---- */
.cases-home__slider {
    --per-view: 2;
    --gap: 24px;
    position: relative;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
}

.cases-home__viewport {
    overflow: hidden;
    border-radius: 18px;
    flex: 1 1 auto;
    min-width: 0;
}

.cases-home__track {
    display: flex;
    gap: var(--gap);
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: transform;
}

.cases-home__slide {
    flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
    min-width: 0;
}

.cases-home__slide .case-card {
    width: 100%;
    height: 100%;
}

/* ---- arrows ---- */
.cases-home__arrow {
    position: static;
    transform: none;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.78);
    appearance: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.cases-home__arrow svg {
    width: 14px;
    height: 14px;
}

.cases-home__arrow:hover,
.cases-home__arrow:focus,
.cases-home__arrow:active {
    outline: none;
    box-shadow: none;
}

@media (hover: hover) {
    .cases-home__arrow:hover {
        color: #fff;
        background: var(--color-red);
        border-color: var(--color-red);
    }
}

.cases-home__arrow:disabled {
    opacity: 0.28;
    pointer-events: none;
}

/* когда кейсов не больше, чем видно — стрелки прячем */
.cases-home__slider.is-single .cases-home__arrow {
    display: none;
}

/* ---- CTA button ---- */
.cases-home__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 11px 28px;
    border-radius: 999px;
    background: #f03a2f;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cases-home__btn:hover,
.cases-home__btn:focus,
.cases-home__btn:active {
    outline: none;
    box-shadow: none;
    color: #fff;
}

@media (hover: hover) {
    .cases-home__btn:hover {
        background: #ff463b;
        transform: translateY(-1px);
    }
}

.cases-home__arrow:disabled {
    opacity: 0.28;
    pointer-events: none;
}

.cases-home__arrow--prev {
    left: -58px;
}

.cases-home__arrow--next {
    right: -58px;
}

/* ---- CTA button ---- */
.cases-home__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 11px 28px;
    border-radius: 999px;
    background: #f03a2f;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cases-home__btn:hover,
.cases-home__btn:focus,
.cases-home__btn:active {
    outline: none;
    box-shadow: none;
    color: #fff;
}

@media (hover: hover) {
    .cases-home__btn:hover {
        background: #ff463b;
        transform: translateY(-1px);
    }
}

/* ================================================================
   TABLET — 1024px
   ================================================================ */
@media (max-width: 1024px) {
    .cases-hero {
        padding-top: calc(var(--header-height-mobile) + 32px);
        padding-bottom: 48px;
    }

    .cases-hero__title {
        font-size: clamp(26px, 5vw, 38px);
    }

    .cases-archive {
        padding-bottom: 80px;
    }

    .cases-archive__filters {
        margin-bottom: 32px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 4px;
    }

    .cases-archive__filters::-webkit-scrollbar {
        display: none;
    }

    .cases-archive__grid {
        gap: 22px;
    }

    .cases-home__container {
        max-width: 720px;
    }

    .cases-home__slider {
        max-width: 470px;
    }

    .cases-home__arrow--prev {
        left: -42px;
    }

    .cases-home__arrow--next {
        right: -42px;
    }
}

/* ================================================================
   MOBILE — 768px
   ================================================================ */
@media (max-width: 768px) {
    .cases-hero {
        padding-top: calc(var(--header-height-mobile) + 24px);
        padding-bottom: 36px;
    }

    .cases-hero__container {
        gap: 16px;
    }

    .cases-hero__title {
        font-size: clamp(22px, 7vw, 32px);
    }

    .cases-hero__subtitle {
        font-size: 13px;
    }

    .cases-archive {
        padding-bottom: 60px;
    }

    .cases-archive__filters {
        margin-bottom: 24px;
        gap: 2px;
    }

    .cases-archive__filter {
        font-size: 13px;
        padding: 10px 18px;
    }

    .cases-archive__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .case-card {
        border-radius: 16px;
    }

    .case-card__img {
     
    }

    .case-card__body {
        padding: 14px 16px 16px;
        gap: 12px;
    }

    .case-card__tags {
        gap: 7px;
    }

    .case-card__tag {
        min-height: 28px;
        padding: 6px 10px;
        font-size: 10px;
    }

    .case-card__tag img,
    .case-card__tag svg {
        width: 11px;
        height: 11px;
    }

    .case-card__title {
        font-size: 16px;
    }

    .case-card__stats {
        gap: 7px;
    }

    .case-card__stat {
        min-height: 72px;
        padding: 10px 8px;
        border-radius: 11px;
        gap: 6px;
    }

    .case-card__stat-val {
        font-size: 15px;
    }

    .case-card__stat-lbl {
        font-size: 8px;
    }

    .case-card__more {
        font-size: 12px;
    }

    .cases-home {
        padding: 48px 0 58px;
    }

    .cases-home__heading {
        font-size: clamp(24px, 7vw, 32px);
    }

    .cases-home__container {
        gap: 18px;
        padding: 0 16px;
    }

    .cases-home__slider {
        max-width: 100%;
    }

    .cases-home__arrow {
        width: 32px;
        height: 32px;
        top: 44%;
    }

    .cases-home__arrow--prev {
        left: -6px;
    }

    .cases-home__arrow--next {
        right: -6px;
    }

    .cases-home__btn {
        min-height: 38px;
        padding: 10px 24px;
        font-size: 14px;
    }
}

/* ================================================================
   SMALL — 480px
   ================================================================ */
@media (max-width: 480px) {
    .case-card__body {
        padding: 12px 14px 14px;
    }

    .case-card__stats {
        gap: 6px;
    }

    .case-card__stat {
        min-height: 66px;
        padding: 8px 6px;
    }

    .case-card__stat-val {
        font-size: 14px;
    }

    .case-card__stat-lbl {
        font-size: 7px;
    }

    .cases-home__arrow {
        width: 28px;
        height: 28px;
    }

    .cases-home__arrow--prev {
        left: -2px;
    }

    .cases-home__arrow--next {
        right: -2px;
    }
}









/* ================================================================
   CASES PAGE — exact page layout
   ================================================================ */
body.cases-page-template {
    background: #090909;
    overflow-x: hidden;
}

body.cases-page-template main.cases-page {
    width: 100%;
    min-height: 100vh;
    background:
        linear-gradient(180deg, #171719 0%, #111214 100%);
}

body.cases-page-template .cases-hero,
body.cases-page-template .cases-archive {
    width: 100%;
}

body.cases-page-template .cases-hero__container,
body.cases-page-template .cases-archive__container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ================================================================
   HERO
   ================================================================ */
.cases-page .cases-hero {
    position: relative;

    padding-bottom: 92px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(20, 20, 22, 0.98) 0%, rgba(11, 11, 12, 1) 100%);
}

.cases-page .cases-hero::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 768px;
    height: 280px;
    transform: translateX(-50%);
    border-radius: 9999px;
    background: rgba(229, 46, 46, 0.05);
    filter: blur(90px);
    pointer-events: none;
}

.cases-page .cases-hero__container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cases-page .cases-hero__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 6px 12px;
    margin-bottom: 24px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.62);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cases-page .cases-hero__title {
    margin: 0;
    max-width: 768px;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(44px, 5vw, 64px);
    line-height: 0.98;
    letter-spacing: -0.03em;
    text-align: center;
}

.cases-page .cases-hero__subtitle {
    max-width: 660px;
    margin-top: 26px;
    color: rgba(255,255,255,0.62);
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.45;
    text-align: center;
}

/* ================================================================
   ARCHIVE SECTION
   ================================================================ */
.cases-page .cases-archive {
    padding: 0 0 110px;
    background: #090909;
}

.cases-page .cases-archive__container {
    max-width: 1280px;
}

/* filters */
.cases-page .cases-archive__filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.cases-page .cases-archive__filter {
    appearance: none;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    min-height: 40px;
    padding: 11px 18px;
    border-radius: 999px;
    color: rgba(255,255,255,0.74);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 15px;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.cases-page .cases-archive__filter:hover,
.cases-page .cases-archive__filter:focus,
.cases-page .cases-archive__filter:active {
    outline: none;
    box-shadow: none;
    background: transparent;
}

@media (hover: hover) {
    .cases-page .cases-archive__filter:hover {
        color: #fff;
    }
}

.cases-page .cases-archive__filter.is-active {
    background: #f03a2f;
    color: #fff;
}

/* grid */
.cases-page .cases-archive__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.cases-page .cases-archive__empty {
    padding: 60px 0;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-family: var(--font-primary);
    font-size: 16px;
}

/* make cards page-sized */
.cases-page .cases-archive .case-card {
    width: 100%;
    border-radius: 18px;
}

.cases-page .cases-archive .case-card__img {
    height: 260px;
    min-height: 280px;
    max-height: 280px;
    background: #050505;
    overflow: hidden;
}

.cases-page .cases-archive .case-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.cases-page .cases-archive .case-card__body {
    padding: 14px 18px 18px;
    gap: 14px;
}

.cases-page .cases-archive .case-card__tag {
    min-height: 28px;
    padding: 6px 10px;
    font-size: 11px;
}

.cases-page .cases-archive .case-card__title {
    font-size: 18px;
    line-height: 1.25;
}

.cases-page .cases-archive .case-card__stats {
    gap: 8px;
}

.cases-page .cases-archive .case-card__stat {
    min-height: 74px;
    padding: 10px 8px;
    border-radius: 12px;
}

.cases-page .cases-archive .case-card__stat-val {
    font-size: 16px;
}

.cases-page .cases-archive .case-card__stat-lbl {
    font-size: 8px;
    line-height: 1.3;
}

.cases-page .cases-archive .case-card__more {
    font-size: 13px;
}

/* ================================================================
   TABLET
   ================================================================ */
@media (max-width: 1024px) {
    .cases-page .cases-hero {
        padding-top: 35px;
        padding-bottom: 72px;
    }

    .cases-page .cases-hero::before {
        width: 640px;
        height: 280px;
    }

    .cases-page .cases-hero__title {
        max-width: 680px;
        font-size: clamp(38px, 6vw, 54px);
    }

    .cases-page .cases-hero__subtitle {
        max-width: 620px;
        font-size: 15px;
    }

    .cases-page .cases-archive__grid {
        gap: 20px;
    }
}

/* ================================================================
   MOBILE
   ================================================================ */
@media (max-width: 768px) {
    body.cases-page-template .cases-hero__container,
    body.cases-page-template .cases-archive__container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cases-page .cases-hero {
        padding-top: 40px;
        padding-bottom: 48px;
    }

    .cases-page .cases-hero::before {
        width: 420px;
        height: 360px;
        filter: blur(70px);
    }

    .cases-page .cases-hero__badge {
        margin-bottom: 18px;
        min-height: 26px;
        padding: 6px 10px;
        font-size: 10px;
    }

    .cases-page .cases-hero__title {
        max-width: 100%;
        font-size: clamp(30px, 8vw, 42px);
        line-height: 1.02;
    }

    .cases-page .cases-hero__subtitle {
        max-width: 100%;
        margin-top: 18px;
        font-size: 14px;
        line-height: 1.45;
    }

    .cases-page .cases-archive {
        padding-bottom: 72px;
    }

    .cases-page .cases-archive__filters {
        gap: 8px;
        margin-bottom: 20px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .cases-page .cases-archive__filters::-webkit-scrollbar {
        display: none;
    }

    .cases-page .cases-archive__filter {
        min-height: 36px;
        padding: 10px 16px;
        font-size: 14px;
        white-space: nowrap;
    }

    .cases-page .cases-archive__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .cases-page .cases-archive .case-card__title {
        font-size: 17px;
    }
}



/* ================================================================
   CASES HERO — visual fix
   ================================================================ */
.cases-page .cases-hero {
    position: relative;
    overflow: hidden;
    padding-top: 30px;
    padding-bottom: 96px;
    background:
        linear-gradient(180deg, #141416 0%, #090909 100%);
    isolation: isolate;
}

.cases-page .cases-hero::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 22px;
    width: 860px;
    height: 280px;
    transform: translateX(-50%);
    border-radius: 999px;
    background:
        radial-gradient(circle at center, rgba(229, 46, 46, 0.18) 0%, rgba(229, 46, 46, 0.10) 28%, rgba(229, 46, 46, 0.04) 52%, rgba(229, 46, 46, 0) 74%);
    filter: blur(42px);
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}

.cases-page .cases-hero::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 84px;
    width: 560px;
    height: 420px;
    transform: translateX(-50%);
    border-radius: 999px;
    background:
        radial-gradient(circle at center, rgba(229, 46, 46, 0.16) 0%, rgba(229, 46, 46, 0.08) 38%, rgba(229, 46, 46, 0) 72%);
    filter: blur(60px);
    opacity: 0.95;
    pointer-events: none;
    z-index: 0;
}

.cases-page .cases-hero__container {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cases-page .cases-hero__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 30px;
    padding: 6px 12px;
    margin-bottom: 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.62);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cases-page .cases-hero__badge-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

.cases-page .cases-hero__title {
    margin: 0;
    max-width: 970px;
    color: #fff;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 800!important;
    font-size: clamp(52px, 5vw, 54px);
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.cases-page .cases-hero__subtitle {
    max-width: 760px;
    margin-top: 28px;
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.45;
}

@media (max-width: 1024px) {
    .cases-page .cases-hero {
        padding-top: 132px;
        padding-bottom: 76px;
    }

    .cases-page .cases-hero::before {
        width: 720px;
        height: 540px;
    }

    .cases-page .cases-hero::after {
        width: 460px;
        height: 340px;
    }

    .cases-page .cases-hero__title {
        max-width: 720px;
        font-size: clamp(42px, 7vw, 60px);
    }
}

@media (max-width: 768px) {
    .cases-page .cases-hero {
        padding-top: 54px;
    
        padding-bottom: 54px;
    }

    .cases-page .cases-hero::before {
        width: 480px;
        height: 360px;
        top: 30px;
        filter: blur(34px);
    }

    .cases-page .cases-hero::after {
        width: 300px;
        height: 220px;
        top: 98px;
        filter: blur(42px);
    }

    .cases-page .cases-hero__container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cases-page .cases-hero__badge {
        margin-bottom: 18px;
        min-height: 28px;
        padding: 6px 10px;
        font-size: 10px;
    }

    .cases-page .cases-hero__badge-icon {
        width: 11px;
        height: 11px;
    }

    .cases-page .cases-hero__title {
        max-width: 100%;
        font-size: clamp(34px, 9vw, 46px);
        line-height: 0.98;
    }

    .cases-page .cases-hero__subtitle {
        max-width: 100%;
        margin-top: 18px;
        font-size: 14px;
        line-height: 1.42;
    }
}







/* ================================================================
   CASES PAGE HERO — smooth center glow + seamless transition
   ================================================================ */

body.cases-page-template {
    background: #090909;
    overflow-x: hidden;
}

body.cases-page-template main.cases-page {
    width: 100%;
    min-height: 100vh;
    background:
        linear-gradient(180deg, #141416 0%, #0d0d0f 34%, #090909 100%);
    position: relative;
    overflow: hidden;
}

/* hero */
.cases-page .cases-hero {
    position: relative;
    overflow: hidden;
    padding-top: 30px;
    padding-bottom: 118px;
    background: transparent;
    isolation: isolate;
}

/* главное центральное красное пятно */
.cases-page .cases-hero::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 18px;
    width: 980px;
    height: 280px;
    transform: translateX(-50%);
    border-radius: 999px;
    background:
        radial-gradient(circle at center,
            rgba(229, 46, 46, 0.20) 0%,
            rgba(229, 46, 46, 0.14) 24%,
            rgba(229, 46, 46, 0.08) 46%,
            rgba(229, 46, 46, 0.03) 62%,
            rgba(229, 46, 46, 0.00) 78%);
    filter: blur(54px);
    pointer-events: none;
    z-index: 0;
}

/* мягкое внутреннее усиление по центру */
.cases-page .cases-hero::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 120px;
    width: 620px;
    height: 420px;
    transform: translateX(-50%);
    border-radius: 999px;
    background:
        radial-gradient(circle at center,
            rgba(229, 46, 46, 0.16) 0%,
            rgba(229, 46, 46, 0.08) 38%,
            rgba(229, 46, 46, 0.00) 74%);
    filter: blur(72px);
    pointer-events: none;
    z-index: 0;
}

.cases-page .cases-hero__container {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cases-page .cases-hero__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 30px;
    padding: 6px 12px;
    margin-bottom: 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.62);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cases-page .cases-hero__badge-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

.cases-page .cases-hero__title {
    margin: 0;
    max-width: 820px;
    color: #fff;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(52px, 5vw, 54px);
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.cases-page .cases-hero__subtitle {
    max-width: 760px;
    margin-top: 28px;
    color: rgba(255, 255, 255, 0.62);
    text-align: center;
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.45;
}

/* archive section без резкого фона */
.cases-page .cases-archive {
    position: relative;
    padding: 0 0 110px;
    background: transparent;
    z-index: 2;
}

.cases-page .cases-archive__container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 20px;
        padding-top: 40px;
    padding-right: 20px;
}

/* фильтры чуть ближе к hero, как в макете */
.cases-page .cases-archive__filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    margin-top: 0;
}

.cases-page .cases-archive__filter {
    appearance: none;
    border: none;
    background: none;
    cursor: pointer;
    min-height: 40px;
    padding: 11px 18px;
    border-radius: 999px;
    color: rgba(255,255,255,0.74);
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 15px;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cases-page .cases-archive__filter:hover,
.cases-page .cases-archive__filter:focus,
.cases-page .cases-archive__filter:active {
    outline: none;
    box-shadow: none;
    background: transparent;
}

@media (hover: hover) {
    .cases-page .cases-archive__filter:hover {
        color: #fff;
    }
}

.cases-page .cases-archive__filter.is-active {
    background: #f03a2f;
    color: #fff;
}

.cases-page .cases-archive__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .cases-page .cases-hero {
        padding-top: 132px;
        padding-bottom: 88px;
    }

    .cases-page .cases-hero::before {
        width: 760px;
        height: 260px;
        top: 24px;
        filter: blur(48px);
    }

    .cases-page .cases-hero::after {
        width: 500px;
        height: 360px;
        top: 126px;
        filter: blur(62px);
    }

    .cases-page .cases-hero__title {
        max-width: 720px;
        font-size: clamp(42px, 7vw, 60px);
    }
}

@media (max-width: 768px) {
    .cases-page .cases-hero {
        padding-top: 54px;
        padding-bottom: 54px;
    }

    .cases-page .cases-hero::before {
        width: 520px;
        height: 380px;
        top: 34px;
        filter: blur(34px);
    }

    .cases-page .cases-hero::after {
        width: 320px;
        height: 230px;
        top: 120px;
        filter: blur(42px);
    }

    .cases-page .cases-hero__container,
    .cases-page .cases-archive__container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cases-page .cases-hero__badge {
        margin-bottom: 18px;
        min-height: 28px;
        padding: 6px 10px;
        font-size: 10px;
    }

    .cases-page .cases-hero__badge-icon {
        width: 14px;
        height: 14px;
    }

    .cases-page .cases-hero__title {
        max-width: 100%;
        font-size: clamp(34px, 9vw, 46px);
        line-height: 0.98;
    }

    .cases-page .cases-hero__subtitle {
        max-width: 100%;
        margin-top: 18px;
        font-size: 14px;
        line-height: 1.42;
    }

    .cases-page .cases-archive__filters {
        gap: 8px;
        margin-bottom: 20px;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .cases-page .cases-archive__filters::-webkit-scrollbar {
        display: none;
    }

    .cases-page .cases-archive__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}












/* ================================================================
   CASES PAGE CARDS — final polish to match mockup
   ================================================================ */

.cases-page .cases-archive__grid {
    gap: 28px;
    align-items: start;
}

.cases-page .cases-archive .case-card {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background:
        radial-gradient(85% 60% at 50% 100%, rgba(229, 46, 46, 0.12) 0%, rgba(229, 46, 46, 0.00) 72%),
        linear-gradient(180deg, #131416 0%, #0b0b0c 100%);
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.cases-page .cases-archive .case-card__img {
  
    background: #050505;
}

.cases-page .cases-archive .case-card__img img {
    object-fit: cover;
    object-position: center;
}

.cases-page .cases-archive .case-card__body {
    padding: 16px 18px 18px;
    gap: 14px;
}

.cases-page .cases-archive .case-card__tags {
    gap: 8px;
    margin: 0;
}

.cases-page .cases-archive .case-card__tag {
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.015);
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
    line-height: 1;
    letter-spacing: 0.04em;
}

.cases-page .cases-archive .case-card__tag img,
.cases-page .cases-archive .case-card__tag svg {
    width: 12px;
    height: 12px;
}

.cases-page .cases-archive .case-card__title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: -0.01em;
}

.cases-page .cases-archive .case-card__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.cases-page .cases-archive .case-card__stat {
    min-height: 76px;
    padding: 12px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: #1A1A1A;
       
    gap: 7px;
}

.cases-page .cases-archive .case-card__stat-val {
    font-size: 18px;
    line-height: 1;
    letter-spacing: -0.02em;
}

.cases-page .cases-archive .case-card__stat-lbl {
    font-size: 8px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.42);
}

.cases-page .cases-archive .case-card__more {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 400;
    gap: 6px;
}

@media (hover: hover) {
    .cases-page .cases-archive .case-card:hover {
        transform: translateY(-2px);
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow:
            0 22px 48px rgba(0, 0, 0, 0.24),
            inset 0 1px 0 rgba(255, 255, 255, 0.025);
    }

    .cases-page .cases-archive .case-card:hover .case-card__img img {
        transform: scale(1.015);
    }
}

@media (max-width: 1024px) {
    .cases-page .cases-archive__grid {
        gap: 22px;
    }

    .cases-page .cases-archive .case-card__body {
        padding: 15px 16px 16px;
    }

    .cases-page .cases-archive .case-card__title {
        font-size: 16px;
    }

    .cases-page .cases-archive .case-card__stat {
        min-height: 72px;
        padding: 10px 8px;
    }
}

@media (max-width: 768px) {
    .cases-page .cases-archive__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .cases-page .cases-archive .case-card__img {
    
    }

    .cases-page .cases-archive .case-card__body {
        padding: 14px 14px 16px;
        gap: 12px;
    }

    .cases-page .cases-archive .case-card__tag {
        min-height: 28px;
        padding: 6px 10px;
        font-size: 10px;
    }

    .cases-page .cases-archive .case-card__title {
        font-size: 16px;
    }

    .cases-page .cases-archive .case-card__stats {
        gap: 7px;
    }

    .cases-page .cases-archive .case-card__stat {
        min-height: 68px;
        padding: 9px 7px;
        border-radius: 11px;
    }

    .cases-page .cases-archive .case-card__stat-val {
        font-size: 15px;
    }

    .cases-page .cases-archive .case-card__stat-lbl {
        font-size: 7px;
    }
}













/* ================================================================
   CASES PROBLEMS SECTION
   ================================================================ */
.cases-problems {
    position: relative;
    padding: 0px 0 46px;
    background: transparent;
}

.cases-problems__container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.cases-problems__badge {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.cases-problems__badge > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #141414;
    border: 2px solid rgba(219, 43, 43, 0.20);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.02),
        0 0 0 1px rgba(219, 43, 43, 0.04);
}

.cases-problems__badge-icon {
    width: 16px;
    height: 16px;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}

.cases-problems__badge-text {
    color: rgba(255, 255, 255, 0.72);
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.cases-problems__title {
    margin: 0 auto 54px;
    max-width: 760px;
    text-align: center;
    color: #fff;
    font-family: var(--font-primary);
    font-size: clamp(34px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.35;
   
    text-transform: uppercase;
}

.cases-problems__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.cases-problems__card {
    position: relative;
    min-height: 206px;
    padding: 38px 26px 38px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(12, 12, 13, 0.98) 0%, rgba(8, 8, 9, 1) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.cases-problems__card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.20;
}

.cases-problems__card--1::before {
    background: radial-gradient(circle at 84% 12%, #e52e2e 0%, rgba(255, 101, 101, 0) 72%);
}

.cases-problems__card--2::before {
    background: radial-gradient(circle at 10% 10%, #e52e2e 0%, rgba(255, 101, 101, 0) 72%);
}

.cases-problems__card--3::before {
    background: radial-gradient(circle at 88% 10%, #e52e2e 0%, rgba(255, 101, 101, 0) 72%);
}

.cases-problems__icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    width: auto;
    height: auto;
    margin-bottom: 22px;
    border: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.cases-problems__icon img {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.cases-problems__card-title {
    position: relative;
    z-index: 2;
    margin: 0 0 14px;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.22;
}

.cases-problems__card-text {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.62);
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.5;
}

.cases-problems__card-text p {
    margin: 0;
}

@media (max-width: 1024px) {
    .cases-problems {
        padding: 0px 0 80px;
    }

    .cases-problems__grid {
        gap: 18px;
    }

    .cases-problems__card {
        min-height: 196px;
        padding: 24px 22px 22px;
    }

    .cases-problems__card-title {
        font-size: 17px;
    }

    .cases-problems__card-text {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .cases-problems {
        padding: 56px 0 64px;
    }

    .cases-problems__container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .cases-problems__title {
        margin-bottom: 28px;
        font-size: clamp(28px, 8vw, 28px);
    }

    .cases-problems__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cases-problems__card {
        min-height: auto;
        padding: 22px 18px 20px;
    }

    .cases-problems__icon {
     
        margin-bottom: 18px;
    }

    .cases-problems__icon img {
        width: 48px;
        height: 48px;
    }

    .cases-problems__card-title {
        font-size: 17px;
        margin-bottom: 12px;
    }

    .cases-problems__card-text {
        font-size: 14px;
    }
}

/* ---- stretched link (кликабельная вся карточка) ---- */
.case-card__stretched-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.case-card__more {
    position: relative;
    z-index: 2;
    pointer-events: none;
}


@media (max-width: 768px) {
    .cases-home__slider {
        --per-view: 1;
        --gap: 14px;
        max-width: 100%;
        gap: 8px;
    }

    .cases-home__viewport {
        width: 100%;
        max-width: 100%;
        border-radius: 16px;
    }

    .cases-home__track {
        gap: var(--gap);
    }

    .cases-home__slide {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .cases-home__slide .case-card {
        width: 100%;
    }
}