/* Case Hero — кейс-страница (Figma: HERO). Breakpoints: mobile ≤767, tablet 768–1199, large ≥1200 */

.case-hero {
    --case-hero-pad-x: 16px;
    --case-hero-pad-top: 120px;
    --case-hero-pad-bottom: 80px;
    --case-hero-stack-gap: 40px;
    --case-hero-title-size: 40px;
    --case-hero-subtitle-size: 16px;
    --case-hero-text-align: center;
    --case-hero-logo-tags-gap: 20px;
    --case-hero-row-dir: column;
    --case-hero-row-align: center;
    --case-hero-tags-justify: center;
    --case-hero-media-h: 185px;

    position: relative;
    overflow: hidden;
    background: var(--black);
    padding: var(--case-hero-pad-top) var(--case-hero-pad-x) var(--case-hero-pad-bottom);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--case-hero-stack-gap);
}

.case-hero__glow {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    width: min(403px, 90vw);
    height: min(279px, 55vw);
    top: 195px;
    right: -40px;
    background: linear-gradient(128deg, rgb(0, 107, 130) 0%, rgb(145, 199, 62) 100%);
    filter: blur(200px);
    border-radius: 50%;
    opacity: 0.95;
}

.case-hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--akdev-content-max, 1440px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.case-hero__row {
    display: flex;
    flex-direction: var(--case-hero-row-dir);
    align-items: var(--case-hero-row-align);
    justify-content: space-between;
    gap: var(--case-hero-logo-tags-gap);
    width: 100%;
}

.case-hero__logo {
    flex-shrink: 0;
    max-width: 260px;
}

.case-hero__logo-img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

.case-hero__filters {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: var(--case-hero-tags-justify);
    align-items: center;
}

.case-hero__filter {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--light-gray);
    background: var(--white);
}

.case-hero__filter-text {
    font-family: Manrope, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.case-hero__filter--solution .case-hero__filter-text {
    color: var(--black);
}

.case-hero__filter--industry .case-hero__filter-text {
    color: var(--lazure-green);
}

.case-hero__title {
    margin: 0;
    max-width: 970px;
    font-family: Manrope, sans-serif;
    font-weight: 500;
    font-size: var(--case-hero-title-size);
    line-height: 1.177;
    color: var(--white);
    text-align: var(--case-hero-text-align);
}

.case-hero__subtitle {
    margin: 0;
    max-width: 800px;
    font-family: Manrope, sans-serif;
    font-weight: 500;
    font-size: var(--case-hero-subtitle-size);
    line-height: 1.3;
    color: var(--light-gray);
    text-align: var(--case-hero-text-align);
}

.case-hero__media {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--akdev-content-max, 1440px);
    margin: 0 auto;
    height: var(--case-hero-media-h);
    border-radius: 0;
    overflow: hidden;
    background: linear-gradient(225deg, #fafafa 0%, #bcbcbc 100%);
}

.case-hero__media-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Tablet 768–1199 — Figma node 776:9148 */
@media (min-width: 768px) {
    .case-hero {
        --case-hero-pad-top: 150px;
        --case-hero-pad-bottom: 120px;
        --case-hero-stack-gap: 60px;
        --case-hero-title-size: 56px;
        --case-hero-subtitle-size: 20px;
        --case-hero-text-align: left;
        --case-hero-logo-tags-gap: 0;
        --case-hero-row-dir: row;
        --case-hero-row-align: center;
        --case-hero-tags-justify: flex-end;
        --case-hero-media-h: 395px;
    }

    .case-hero__filters {
        flex: 1;
        min-width: 0;
        justify-content: flex-end;
    }

    /* Без лого — теги слева, на месте колонки логотипа */
    .case-hero--no-logo .case-hero__filters {
        flex: 0 1 auto;
        justify-content: flex-start;
    }

    .case-hero__glow {
        width: 558px;
        height: 387px;
        top: 224px;
        right: -80px;
    }

    .case-hero__title,
    .case-hero__subtitle {
        align-self: flex-start;
    }
}

/* Large desktop ≥1200 — Figma node 695:5519 */
@media (min-width: 1200px) {
    .case-hero {
        --case-hero-pad-x: 120px;
        --case-hero-pad-top: 200px;
        --case-hero-pad-bottom: 120px;
        --case-hero-title-size: 64px;
    }

    .case-hero__media {
        height: auto;
        aspect-ratio: 1200 / 625;
        max-height: none;
    }

    .case-hero__media-img {
        height: 100%;
        object-fit: cover;
        transform-origin: center bottom;
    }

    .case-hero__media-img-transform {
        transform: perspective(1400px) rotateX(5deg) rotateY(-3deg) scale(1.02);
    }

    .case-hero__glow {
        width: 658px;
        height: 457px;
        top: 298px;
        right: -120px;
    }
}

/* Laptop / narrow desktop: keep tablet-like horizontal padding until 1200 */
@media (min-width: 768px) and (max-width: 1199px) {
    .case-hero {
        --case-hero-pad-x: 16px;
    }
}

.case-hero__text {
    font-size: 14px;
    color: #fff;
}

.case-hero__text span {
    font-size: 24px;
}
