.case-hero {
    position: relative;
    padding: 170px 0 80px;
    background: linear-gradient(180deg, #ffffff 0%, rgba(0, 173, 139, 0.06) 100%);
    overflow: visible;
}

.case-hero::after {
    content: "";
    position: absolute;
    right: 4%;
    bottom: -10%;
    width: 720px;
    height: 720px;
    background: radial-gradient(60% 60% at 50% 50%, rgba(0, 240, 193, 0.28) 0%, rgba(0, 240, 193, 0) 70%);
    filter: blur(0.5px);
    pointer-events: none
}

.case-hero__container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 24px
}

.case-hero__content {
    position: relative;
    z-index: 2
}

.case-hero__badge {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 9999px;
    background: rgba(0, 173, 139, 0.10);
    color: #00b894;
    font-weight: 600;
    font-size: 14px;
    gap: 8px;
    margin-bottom: 6px
}

.case-hero__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #00b894;
    display: inline-block
}

.case-hero__title {
    margin: 12px 0 6px 0;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(2rem, 3.6vw, 66px);
    line-height: 78px;
    letter-spacing: .66px;
    font-weight: 700;
    color: #020817
}

.case-hero__em {
    position: relative;
    display: inline-block;
    color: #00b894;
    z-index: 0
}

/* Ellipse behind the word using a pseudo-element, mirroring features__title-accent::before */
.case-hero__em::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 55%;
    transform: translate(-50%, -50%);
    width: 225px;
    height: 90px;
    background: url('../../images/case/ellipse23.png') no-repeat center / contain;
    z-index: -2;
    pointer-events: none
}


.case-hero__subtitle {
    max-width: 585px;
    color: rgba(0, 0, 0, .7);
    font-size: 18px;
    line-height: 28px;
    margin: 10px 0 26px 0
}

.case-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 18px;
    border-radius: 6px;
    background: #00b894;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px
}

.case-hero__arrows {
    position: absolute;
    left: 190px;
    bottom: 10px;
}

.case-hero__cta img {
    width: 16px;
    height: 16px
}

.case-hero__scribble {
    position: absolute;
    left: 270px;
    top: 260px;
    width: 54px;
    height: auto;
    transform: translateY(0)
}

.case-hero__visual {
    position: relative;
    z-index: 1;
    justify-self: end
}

.case-hero__image-card {
    width: min(660px, 44vw);
    height: auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px -12px rgba(0, 173, 139, .25);
    position: relative;
    overflow: visible;
}

.case-hero__image {
    display: block;
    width: 100%;
    height: 390px;
    border-radius: 16px;
    object-fit: cover
}

/* Decorative green lines around the image card */
.case-hero__decor {
    position: absolute;
    width: 120px;
    height: auto;
    pointer-events: none
}

.case-hero__decor--bl {
    left: -45px;
    bottom: -45px;
    width: 60px;
    height: auto;
}

.case-hero__decor--tr {
    right: -45px;
    top: -45px;
    width: 60px;
    height: auto;
    transform: scaleY(-1) scaleX(-1);
}

@media (max-width:1024px) {
    .case-hero {
        padding: 96px 0 56px
    }

    .case-hero__container {
        grid-template-columns: 1fr;
        gap: 28px
    }

    .case-hero__visual {
        justify-self: center
    }

    .case-hero__scribble {
        left: 220px;
        top: 250px
    }
}

@media (max-width:768px) {
    .case-hero__image-card {
        width: 100%;
        max-width: 640px
    }

    .case-hero__image {
        height: 300px
    }

    .case-hero__ellipse {
        left: -8px;
        top: -18px;
        width: 220px;
        height: 70px
    }
}

@media (max-width:600px) {
    .case-hero {
        padding: 100px 0 40px
    }

    .case-hero__title {
        line-height: 1.15;
        text-align: center;
    }

    .case-hero__content {
        text-align: center;
    }

    .case-hero__subtitle {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .case-hero__ellipse {
        display: none
    }

    .case-hero__em::before {
        display: none;
    }

    .case-hero__arrows {
        display: none;
    }

    /* Hide decorative lines on mobile */
    .case-hero__decor,
    .case-hero__decor--bl,
    .case-hero__decor--tr {
        display: none;
    }
}

/* Case Stories Grid (Figma node 55:8) */
.case-stories {
    padding: 56px 0 80px;
    position: relative
}

.case-stories__container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding)
}

.case-stories__card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    padding: 28px;
}

.case-stories__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px 24px
}

.case-stories__item {
    margin: 0
}

.case-stories__img-wrap {
    width: 100%;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f7f9
}

.case-stories__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.case-stories__caption {
    margin-top: 10px;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 22px;
    color: #333
}

.case-stories__caption a {
    text-decoration: none;
    color: inherit;
}

.case-stories__caption a:hover {
    color: #00b894;
    text-decoration: none;
}

@media (max-width: 1024px) {
    .case-stories__grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media (max-width: 640px) {
    .case-stories__grid {
        grid-template-columns: 1fr
    }

    .case-stories__img-wrap {
        height: 220px
    }
}