.hero__wrapper {
    width: 100%;
    height: 100%;
}

.hero__bg {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hero__bg--img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: .2;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(38, 38, 38, 1);
    z-index: 0;
}

.hero {
    position: relative;
    z-index: 2;
}

.hero__content {
    padding: 120px 0 40px;
    max-width: 760px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
}

.hero__text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}

.hero__text h1 {
    font-family: var(--third-family);
    font-weight: 400;
    font-size: 39px;
    line-height: 120%;
    color: #fff;
}

.hero__text p {
    max-width: 620px;
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 19px;
    line-height: 165%;
    color: rgba(255, 255, 255, 0.75);
}

.hero__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: stretch;
    gap: 16px;
}

.hero__card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 20px;
    backdrop-filter: blur(24px);
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.hero__card:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(198, 166, 94, 0.4);
}

.hero__card h3 {
    font-family: var(--numbers-family);
    font-weight: 400;
    font-size: 32px;
    line-height: 100%;
    text-align: center;
    color: #c6a65e;
}

.hero__card p {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 12px;
    line-height: 150%;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
}

.case {
    padding: 48px 0 80px;
    background: #f7f4ee;
}

.cases__tabs {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.cases__tab {
    border: 1px solid rgba(26, 87, 61, 0.15);
    border-radius: 14px;
    background: #fff;
    padding: 13px 25px;
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    text-align: center;
    color: #1a573d;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.cases__tab:hover {
    background: #f1ecdf;
    border-color: rgba(26, 87, 61, 0.3);
}

.cases__tab.active {
    border: 1px solid #1a573d;
    background: #1a573d;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 14px;
    line-height: 150%;
    text-align: center;
    color: #fff;
}

.cases__tab.active:hover {
    background: #12402d;
}

.case__list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 40px 0 64px;
}

.case__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    border: 1px solid rgba(18, 61, 43, 0.07);
    border-radius: 16px;
    padding: 40px;
    background: #fff;
    height: 100%;
}

.case__head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}

.case__head--text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.case__head--text span {
    border-radius: 33554400px;
    padding: 6px 12px;
    background: #ede8de;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 12px;
    line-height: 100%;
    letter-spacing: 0.04em;
    color: #1a573d;
}

.case__head--text h2 {
    font-family: var(--numbers-family);
    font-weight: 400;
    font-size: 32px;
    line-height: 150%;
    color: #000;
}

.case__head--date {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.case__head--date span {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 12px;
    line-height: 150%;
    text-align: right;
    color: rgba(40, 40, 40, 0.5);
}

.case__head--date p {
    font-family: var(--third-family);
    font-weight: 400;
    font-size: 20px;
    line-height: 150%;
    text-align: right;
    color: #c6a65e;
}

.case__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
}

.case__card--section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.case__content h3 {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 14px;
    line-height: 150%;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1a573d;
}

.case__content p {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 15px;
    line-height: 170%;
    color: rgba(40, 40, 40, 0.75);
}

.case__card--result {
    border-radius: 14px;
    padding: 24px;
    background: #f7f4ee;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.case__card--result-icon {
    border-radius: 14px;
    width: 40px;
    height: 40px;
    background: #ede8de;
    display: flex;
    align-items: center;
    justify-content: center;
}

.case__card--result-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.case__card--result-text span {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 14px;
    line-height: 150%;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1a573d;
}

.case__card--result-text p {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 15px;
    line-height: 165%;
    color: #282828;
}

.case__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

.case__stat {
    border-radius: 14px;
    padding: 16px;
    background: #ede8de;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 15px;
    line-height: 150%;
    text-align: center;
    color: #1a573d;
}

.cta {
    border: 1px solid rgba(18, 61, 43, 0.07);
    border-radius: 16px;
    padding: 48px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.cta__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 830px;
}

.cta__text h2 {
    font-family: var(--third-family);
    font-weight: 400;
    font-size: 38px;
    line-height: 150%;
    text-align: center;
    color: #000;
}

.cta__text p {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 17px;
    line-height: 160%;
    text-align: center;
    color: rgba(40, 40, 40, 0.65);
}

.cta__btns {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cta__btn {
    border-radius: 14px;
    padding: 16px 40px;
    background: #1a573d;
    border: 1px solid #1a573d;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.cta__btn:hover {
    background: transparent;
    color: #1a573d;
    box-shadow: 0 10px 24px rgba(26, 87, 61, 0.2);
}

.cta__btn span {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 16px;
    line-height: 150%;
    text-align: center;
    color: inherit;
}

.cta__btn--link {
    font-family: var(--numbers-family);
    font-weight: 400;
    font-size: 22px;
    line-height: 150%;
    text-align: center;
    color: #1a573d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cta__btn--link:hover {
    color: #c6a65e;
}


/* ==========================================================================
   991px — планшет: hero-цифры 4→2, табы скроллятся в строку (не влезают
   уже на планшете при большом числе категорий), паддинги карточек поменьше
   ========================================================================== */
@media (max-width: 991px) {

    .hero__content {
        padding: 110px 0 36px;
        max-width: 600px;
    }

    

    /* Табы фильтра — горизонтальный скролл вместо переноса */
    .cases__tabs {
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    .cases__tabs::-webkit-scrollbar {
        display: none;
    }

    .cases__tab {
        flex-shrink: 0;
    }

    /* CASE CARD — паддинг поменьше */
    .case__card {
        padding: 32px;
        gap: 20px;
    }

    .case__head--text h2 {
        font-size: 26px;
    }

    .cta {
        padding: 40px 32px;
    }
}


/* ==========================================================================
   768px — узкий планшет: заголовок кейса и срок переносятся друг под друга,
   статистика 3 → 2 колонки
   ========================================================================== */
@media (max-width: 768px) {

    .hero__content {
        padding: 100px 0 32px;
        max-width: 100%;
    }

    /* HERO — 4 → 2 колонки */
    .hero__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hero__text h1 {
        font-size: 32px;
    }

    /* CASE HEAD — заголовок и срок больше не в один ряд, срок под заголовком */
    .case__head {
        flex-wrap: wrap;
    }

    .case__head--date {
        align-items: flex-start;
    }

    .case__head--date span,
    .case__head--date p {
        text-align: left;
    }

    /* STATS — 3 → 2 колонки */
    .case__stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta {
        padding: 32px 24px;
    }

    .cta__text h2 {
        font-size: 26px;
    }
}


@media (max-width: 575px) {

    /* ===== HERO ===== */
    .hero__content {
        padding: 100px 0 32px;
        max-width: 100%;
        gap: 24px;
    }

    .hero__text {
        gap: 12px;
    }

    .hero__text h1 {
        font-size: 24px;
    }

    .hero__text p {
        font-size: 15px;
        max-width: 100%;
    }

    .hero__text p br {
        display: none;
    }

    .hero__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .hero__card {
        padding: 14px;
    }

    .hero__card h3 {
        font-size: 22px;
    }

    .hero__card p {
        font-size: 11px;
    }

    /* ===== CASE ===== */
    .case {
        padding: 32px 0 40px;
    }

    /* Табы — скролл в одну строку, чтобы не переносились уродливо */
    .cases__tabs {
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    .cases__tabs::-webkit-scrollbar {
        display: none;
    }

    .cases__tab {
        flex-shrink: 0;
        padding: 10px 18px;
        font-size: 13px;
    }

    .case__list {
        gap: 14px;
        margin: 24px 0 40px;
    }

    .case__card {
        padding: 20px;
        gap: 16px;
    }

    /* Заголовок кейса + дата — переносим друг под друга */
    /* ===== CASE HEAD — переработка верхней части карточки ===== */
    .case__head {
        gap: 14px;
    }

    .case__head--text {
        gap: 10px;
        width: 100%;
    }

    .case__head--text span {
        font-size: 11px;
        padding: 5px 12px;
    }

    .case__head--text h2 {
        font-size: 22px;
        line-height: 130%;
    }

    /* Срок теперь горизонтальный чип, а не два разрозненных блока */
    .case__head--date {
        max-width: max-content;
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        border-radius: 33554400px;
        padding: 6px 14px;
        background: #f7f4ee;
    }

    .case__head--date span {
        text-align: left;
        font-size: 12px;
        color: rgba(40, 40, 40, 0.5);
    }

    .case__head--date span::after {
        content: ":";
    }

    .case__head--date p {
        font-family: var(--numbers-family);
        text-align: left;
        font-size: 14px;
        line-height: 100%;
        color: #c6a65e;
    }

    .case__head--text {
        gap: 10px;
    }

    .case__head--text h2 {
        font-size: 22px;
    }

    .case__content {
        gap: 16px;
    }

    .case__content h3 {
        font-size: 12px;
    }

    .case__content p {
        font-size: 14px;
    }

    .case__card--result {
        padding: 16px;
        gap: 12px;
    }

    .case__card--result-icon {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .case__card--result-text p {
        font-size: 13px;
    }

    .case__stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .case__stat {
        padding: 12px;
        font-size: 13px;
    }

    /* ===== CTA ===== */
    .cta {
        padding: 28px 20px;
        gap: 20px;
    }

    .cta__text {
        gap: 8px;
    }

    .cta__text h2 {
        font-size: 22px;
    }

    .cta__text p {
        font-size: 14px;
    }

    .cta__btns {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .cta__btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
}