/* === КЕЙС ПОРТФОЛИО ===
   Использует переменные темы: --main-color, --text-main-color, font Raleway */

.case { padding: 2vw 0 1vw; }

.case__block {
    margin-bottom: 3.5vw;
}

.case__block-title {
    font-weight: 700;
    font-size: 2vw;
    line-height: 1.2;
    margin: 0 0 1.2vw;
    color: var(--text-main-color);
}

.case__block-descr {
    font-size: 1.04vw;
    line-height: 1.5;
    color: #6B7280;
    margin-bottom: 1.5vw;
    max-width: 50vw;
}

/* === 1. HERO === */
.case__hero {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 2vw;
    align-items: center;
    background: linear-gradient(135deg, #1F2937, #111827);
    border-radius: 1.563vw;
    padding: 2.6vw 2.8vw;
    color: #fff;
    margin-bottom: 3.5vw;
    position: relative;
    overflow: hidden;
}
.case__hero::before {
    content: "";
    position: absolute;
    top: -30%; right: -10%;
    width: 35vw; height: 35vw;
    background: radial-gradient(circle, color-mix(in srgb, var(--main-color) 15%, transparent) 0%, transparent 60%);
    pointer-events: none;
}
.case__hero-content { position: relative; z-index: 1; }
.case__hero-meta {
    display: inline-block;
    font-size: 0.83vw;
    color: var(--main-color);
    background: color-mix(in srgb, var(--main-color) 15%, transparent);
    padding: 0.4vw 0.8vw;
    border-radius: 0.4vw;
    margin-bottom: 1.2vw;
    font-weight: 500;
}
.case__hero-title {
    font-size: 2.4vw !important;
    line-height: 1.15;
    margin: 0 0 1vw;
    color: #fff;
    text-align: left;
}
.case__hero-subtitle {
    font-size: 1.15vw;
    line-height: 1.5;
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.6vw;
}
.case__hero-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5vw;
    padding-top: 1.5vw;
    border-top: 1px solid rgba(255,255,255,0.12);
}
.case__hero-info-item { text-decoration: none; color: inherit; }
.case__hero-link:hover .case__hero-info-value { color: var(--main-color); }
.case__hero-info-label { font-size: 0.78vw; color: rgba(255,255,255,0.5); margin-bottom: 0.25vw; text-transform: uppercase; letter-spacing: 0.05em; }
.case__hero-info-value { font-size: 1.15vw; font-weight: 600; transition: color 0.2s; }
.case__hero-image {
    position: relative;
    z-index: 1;
    border-radius: 1vw;
    overflow: hidden;
    display: block;
    aspect-ratio: 16/10;
    box-shadow: 0 1.5vw 3vw rgba(0,0,0,0.3);
}
.case__hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* === 2. ЗАДАЧА === */
/* === 12. ПРОИЗВОЛЬНЫЙ ТЕКСТ + универсальные стили для WYSIWYG-контента === */
/* Применяется ко всем местам, где админ может вставлять отформатированный текст */
.case__wysiwyg .portfolio-typical__editor,
.case__task-text,
.case__text-image-body,
.case__testimonial-quote {
    font-size: 1.04vw;
    line-height: 1.6;
    color: var(--text-main-color);
}

.case__wysiwyg { max-width: 60vw; }
.case__wysiwyg .portfolio-typical__editor { font-size: 1.1vw; }

/* Заголовки внутри WYSIWYG */
.case__wysiwyg h1,
.case__wysiwyg h2,
.case__wysiwyg h3,
.case__wysiwyg h4,
.case__task-text h2,
.case__task-text h3,
.case__text-image-body h2,
.case__text-image-body h3 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main-color);
    margin: 1.6vw 0 0.8vw;
}
.case__wysiwyg h1, .case__wysiwyg h2 { font-size: 1.8vw; margin-top: 0; }
.case__wysiwyg h3, .case__task-text h3, .case__text-image-body h3 { font-size: 1.35vw; }
.case__wysiwyg h4 { font-size: 1.15vw; }
.case__wysiwyg h2:not(:first-child),
.case__wysiwyg h3:not(:first-child) { margin-top: 1.8vw; }

/* Параграфы */
.case__wysiwyg p,
.case__task-text p,
.case__text-image-body p { margin: 0 0 0.9vw; }
.case__wysiwyg p:last-child,
.case__task-text p:last-child,
.case__text-image-body p:last-child { margin-bottom: 0; }

/* Списки */
.case__wysiwyg ul,
.case__wysiwyg ol,
.case__task-text ul,
.case__task-text ol,
.case__text-image-body ul,
.case__text-image-body ol {
    margin: 0.5vw 0 1vw;
    padding-left: 1.5vw;
}
.case__wysiwyg li,
.case__task-text li,
.case__text-image-body li {
    margin-bottom: 0.4vw;
    line-height: 1.55;
}
.case__wysiwyg ul > li,
.case__task-text ul > li,
.case__text-image-body ul > li { list-style: none; position: relative; padding-left: 0.4vw; }
.case__wysiwyg ul > li::before,
.case__task-text ul > li::before,
.case__text-image-body ul > li::before {
    content: "";
    position: absolute;
    left: -1vw;
    top: 0.65vw;
    width: 0.42vw;
    height: 0.42vw;
    background: var(--main-color);
    border-radius: 50%;
}
.case__wysiwyg ol > li,
.case__task-text ol > li,
.case__text-image-body ol > li { list-style: decimal; }

/* Ссылки и выделения */
.case__wysiwyg a,
.case__task-text a,
.case__text-image-body a {
    color: var(--main-color);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}
.case__wysiwyg a:hover,
.case__task-text a:hover,
.case__text-image-body a:hover { text-decoration: none; }
.case__wysiwyg strong, .case__wysiwyg b,
.case__task-text strong, .case__task-text b,
.case__text-image-body strong, .case__text-image-body b { font-weight: 700; }
.case__wysiwyg em, .case__wysiwyg i,
.case__task-text em, .case__task-text i { font-style: italic; }

/* Цитаты внутри WYSIWYG */
.case__wysiwyg blockquote,
.case__task-text blockquote,
.case__text-image-body blockquote {
    margin: 1vw 0;
    padding: 0.8vw 0 0.8vw 1.2vw;
    border-left: 3px solid var(--main-color);
    font-style: italic;
    color: var(--text-main-color);
}

/* Картинки внутри WYSIWYG */
.case__wysiwyg img {
    max-width: 100%;
    height: auto;
    border-radius: 0.8vw;
    margin: 1vw 0;
    display: block;
}

/* Код */
.case__wysiwyg code {
    background: #F5F7FA;
    padding: 0.15vw 0.4vw;
    border-radius: 0.3vw;
    font-family: monospace;
    font-size: 0.92em;
}

/* Горизонтальный разделитель */
.case__wysiwyg hr {
    border: 0;
    height: 1px;
    background: rgba(28,28,28,0.1);
    margin: 1.5vw 0;
}

/* === 3. ЦИФРЫ === */
.case__numbers {
    background: color-mix(in srgb, var(--main-color) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--main-color) 18%, transparent);
    border-radius: 1.563vw;
    padding: 2.5vw 2.5vw 2.2vw;
}
.case__numbers-grid {
    display: grid;
    gap: 1.5vw;
    margin-top: 0.5vw;
}
.case__numbers-grid[data-count="1"] { grid-template-columns: 1fr; }
.case__numbers-grid[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
.case__numbers-grid[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
.case__numbers-grid[data-count="4"] { grid-template-columns: repeat(4, 1fr); }
.case__numbers-grid[data-count="5"],
.case__numbers-grid[data-count="6"] { grid-template-columns: repeat(3, 1fr); }
.case__number {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4vw;
}
.case__number-value {
    font-size: 2.8vw;
    font-weight: 700;
    line-height: 1.05;
    color: var(--main-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}
.case__number-label {
    font-size: 0.94vw;
    line-height: 1.35;
    color: var(--text-main-color);
    opacity: 0.75;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* === 4. СТЕК === */
.case__stack-list { display: flex; flex-wrap: wrap; gap: 0.6vw; }
.case__stack-tag {
    display: inline-block;
    padding: 0.7vw 1.2vw;
    background: #FFFFFF;
    border: 1px solid rgba(28, 28, 28, 0.1);
    border-radius: 0.6vw;
    font-size: 1vw;
    font-weight: 500;
    color: var(--text-main-color);
    transition: all 0.2s ease;
}
.case__stack-tag:hover {
    border-color: var(--main-color);
    color: var(--main-color);
}

/* === 5. ГАЛЕРЕЯ === */
.case__gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 1vw;
    transition: transform 0.3s;
}
.case__gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}
.case__gallery-item:hover img { transform: scale(1.03); }

.case__gallery--masonry .case__gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 14vw;
    gap: 1vw;
}
.case__gallery--masonry .case__gallery-item.is-feature {
    grid-column: span 2;
    grid-row: span 2;
}
.case__gallery--grid_2 .case__gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1vw; }
.case__gallery--grid_2 .case__gallery-item { aspect-ratio: 16/10; }
.case__gallery--grid_3 .case__gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1vw; }
.case__gallery--grid_3 .case__gallery-item { aspect-ratio: 16/10; }
.case__gallery--single .case__gallery-grid { display: block; }
.case__gallery--single .case__gallery-item { aspect-ratio: 16/9; }

/* === 6. ТЕКСТ + ФОТО === */
.case__text-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5vw;
    align-items: center;
}
.case__text-image--left { direction: rtl; }
.case__text-image--left > * { direction: ltr; }
.case__text-image-body {
    font-size: 1.04vw;
    line-height: 1.6;
    color: var(--text-main-color);
}
.case__text-image-img {
    display: block;
    border-radius: 1vw;
    overflow: hidden;
    aspect-ratio: 4/3;
}
.case__text-image-img img { width: 100%; height: 100%; object-fit: cover; }

/* === 7. ЭТАПЫ (стиль clientsc) === */
.case__stages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.case__stage {
    padding: 1.5rem;
    border-radius: var(--brad-regular, 1rem);
    background: rgba(255, 255, 255, 0.6);
    transition: box-shadow 0.3s;
}
.case__stage:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
.case__stage-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--main-color, #31B939);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.case__stage-name {
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.35;
    margin-bottom: 0.75rem;
    color: var(--text-main-color, #1C1C1C);
}
.case__stage-term {
    font-size: 0.85rem;
    color: #6B7280;
    margin-bottom: 0.5rem;
}
.case__stage-descr {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #555;
}

/* === 8. ПРЕВЬЮ НА УСТРОЙСТВАХ === */
.case__devices-stage {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1.5vw;
    padding: 2vw;
    background: #F5F7FA;
    border-radius: 1.563vw;
    min-height: 25vw;
}
.case__device-frame {
    background: #1F2937;
    border-radius: 0.8vw;
    padding: 0.6vw 0.4vw 0.4vw;
    box-shadow: 0 1.5vw 3vw rgba(0,0,0,0.15);
}
.case__device-bar {
    display: flex;
    gap: 0.3vw;
    padding: 0 0.4vw 0.4vw;
}
.case__device-bar span {
    width: 0.5vw; height: 0.5vw;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
}
.case__device-screen {
    display: block;
    overflow: hidden;
    border-radius: 0.4vw;
}
.case__device-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }

.case__device--desktop { flex: 1.7; max-width: 60%; }
.case__device--desktop .case__device-screen { aspect-ratio: 16/10; }
.case__device--tablet { flex: 0.85; max-width: 22%; }
.case__device--tablet .case__device-frame { padding: 0.6vw 0.4vw; border-radius: 1vw; }
.case__device--tablet .case__device-screen { aspect-ratio: 4/5; }
.case__device--mobile { flex: 0.6; max-width: 14%; }
.case__device--mobile .case__device-frame {
    padding: 1.2vw 0.3vw 0.3vw;
    border-radius: 1.5vw;
    position: relative;
}
.case__device--mobile .case__device-notch {
    position: absolute;
    top: 0.4vw; left: 50%;
    transform: translateX(-50%);
    width: 30%; height: 0.5vw;
    background: rgba(255,255,255,0.15);
    border-radius: 0 0 0.5vw 0.5vw;
}
.case__device--mobile .case__device-screen { aspect-ratio: 9/19; }

/* === 9. SEO === */
.case__seo-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1.5vw;
    background: #FFFFFF;
    border: 1px solid rgba(28,28,28,0.06);
    border-radius: 1.5vw;
    padding: 2vw;
}
.case__seo-traffic {
    background: color-mix(in srgb, var(--main-color) 7%, transparent);
    border-radius: 1vw;
    padding: 1.5vw;
}
.case__seo-label { font-size: 0.83vw; color: #6B7280; margin-bottom: 0.6vw; text-transform: uppercase; letter-spacing: 0.04em; }
.case__seo-value { font-size: 3.5vw; font-weight: 700; color: var(--main-color); line-height: 1; margin-bottom: 0.5vw; }
.case__seo-period { font-size: 1vw; color: var(--text-main-color); opacity: 0.6; }
.case__seo-keywords > .case__seo-label { margin-bottom: 1vw; }
.case__seo-kw {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.7vw 0;
    border-bottom: 1px solid rgba(28,28,28,0.07);
    font-size: 1vw;
}
.case__seo-kw:last-child { border-bottom: 0; }
.case__seo-kw-q { color: var(--text-main-color); }
.case__seo-kw-p { color: var(--main-color); font-weight: 700; }

/* === 10. ОТЗЫВ === */
.case__testimonial {
    background: #FFFFFF;
    border: 1px solid rgba(28,28,28,0.06);
    border-radius: 1.5vw;
    padding: 2.2vw 2.4vw;
}
.case__testimonial-quote {
    font-size: 1.4vw;
    line-height: 1.5;
    color: var(--text-main-color);
    padding-left: 1.5vw;
    border-left: 3px solid var(--main-color);
    margin-bottom: 1.5vw;
    font-style: italic;
}
.case__testimonial-quote p { margin: 0 0 0.6vw; }
.case__testimonial-quote p:last-child { margin: 0; }
.case__testimonial-author { display: flex; align-items: center; gap: 1vw; }
.case__testimonial-photo {
    width: 3.5vw; height: 3.5vw;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.case__testimonial-photo img { width: 100%; height: 100%; object-fit: cover; }
.case__testimonial-name { font-size: 1.1vw; font-weight: 600; color: var(--text-main-color); }
.case__testimonial-pos { font-size: 0.88vw; color: #6B7280; margin-top: 0.2vw; }

/* === 13. CTA === */
.case__cta {
    background: linear-gradient(135deg, #1F2937, #111827);
    color: #fff;
    border-radius: 1.563vw;
    padding: 2.2vw 2.5vw;
    display: flex; align-items: center; justify-content: space-between;
    gap: 2vw;
    position: relative; overflow: hidden;
}
.case__cta::before {
    content: ""; position: absolute;
    top: -50%; right: -10%;
    width: 30vw; height: 30vw;
    background: radial-gradient(circle, color-mix(in srgb, var(--main-color) 12%, transparent) 0%, transparent 60%);
    pointer-events: none;
}
.case__cta-content { position: relative; z-index: 1; }
.case__cta-title { font-size: 1.5vw; font-weight: 600; margin-bottom: 0.3vw; }
.case__cta-descr { font-size: 1vw; color: rgba(255,255,255,0.7); }
.case__cta-btn { width: auto; height: 4vw; padding: 0 2.4vw; flex-shrink: 0; position: relative; z-index: 1; }
.case__cta-btn span { font-size: 1.1vw; font-weight: 600; }
.case__cta-btn::after, .case__cta-btn::before { display: none !important; }

.case__back-link { margin-top: 2.5vw; }

/* === АДАПТИВ — планшет === */
@media (max-width: 992px) {
    .case__block { margin-bottom: 6vw; }
    .case__block-title { font-size: 3.5vw; margin-bottom: 2.2vw; }
    .case__block-descr { font-size: 1.8vw; max-width: 100%; margin-bottom: 2.5vw; }

    .case__hero {
        grid-template-columns: 1fr;
        padding: 4vw;
        border-radius: 2.5vw;
        gap: 3vw;
        margin-bottom: 6vw;
    }
    .case__hero-meta { font-size: 1.5vw; padding: 0.7vw 1.4vw; margin-bottom: 2vw; border-radius: 0.8vw; }
    .case__hero-title { font-size: 4.4vw !important; }
    .case__hero-subtitle { font-size: 2vw; margin-bottom: 3vw; }
    .case__hero-info { gap: 3vw; padding-top: 3vw; }
    .case__hero-info-label { font-size: 1.4vw; }
    .case__hero-info-value { font-size: 2vw; }
    .case__hero-image { border-radius: 2vw; }

    .case__task-text { font-size: 1.95vw; max-width: 100%; }

    .case__numbers { padding: 4vw; border-radius: 2.5vw; }
    .case__numbers-grid,
    .case__numbers-grid[data-count="3"],
    .case__numbers-grid[data-count="4"],
    .case__numbers-grid[data-count="5"],
    .case__numbers-grid[data-count="6"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 3vw;
    }
    .case__number-value { font-size: 5vw; }
    .case__number-label { font-size: 1.7vw; }

    /* WYSIWYG на планшете — !important перебивает наследуемые стили темы */
    .case__wysiwyg { max-width: 100%; }
    .case__wysiwyg .portfolio-typical__editor,
    .case__task-text,
    .case__text-image-body { font-size: 1.95vw !important; line-height: 1.55 !important; }
    .case__wysiwyg p, .case__task-text p, .case__text-image-body p { font-size: 1.95vw !important; line-height: 1.55 !important; }
    .case__wysiwyg li, .case__task-text li, .case__text-image-body li { font-size: 1.95vw !important; line-height: 1.55 !important; }
    .case__wysiwyg h1, .case__wysiwyg h2 { font-size: 3vw !important; }
    .case__wysiwyg h3, .case__task-text h3, .case__text-image-body h3 { font-size: 2.3vw !important; }
    .case__wysiwyg h4 { font-size: 2vw !important; }
    .case__wysiwyg ul, .case__wysiwyg ol,
    .case__task-text ul, .case__task-text ol,
    .case__text-image-body ul, .case__text-image-body ol { padding-left: 3vw; }
    .case__wysiwyg ul > li::before,
    .case__task-text ul > li::before,
    .case__text-image-body ul > li::before {
        left: -1.8vw; top: 1vw; width: 0.8vw; height: 0.8vw;
    }

    .case__stack-list { gap: 1.2vw; }
    .case__stack-tag { padding: 1.4vw 2.4vw; font-size: 1.85vw; border-radius: 1vw; }

    .case__gallery--masonry .case__gallery-grid { grid-auto-rows: 28vw; }
    .case__gallery-item { border-radius: 1.8vw; }

    .case__text-image { grid-template-columns: 1fr; gap: 3vw; }
    .case__text-image--left, .case__text-image--right { direction: ltr; }
    .case__text-image-body { font-size: 1.85vw; }
    .case__text-image-img { border-radius: 2vw; }

    .case__stages-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .case__stage { padding: 3vw; border-radius: 2vw; }
    .case__stage-num { font-size: 1.7vw; margin-bottom: 1vw; }
    .case__stage-name { font-size: 2vw; }
    .case__stage-term { font-size: 1.6vw; }
    .case__stage-descr { font-size: 1.6vw; }

    .case__devices-stage { padding: 3vw; min-height: 40vw; gap: 2.5vw; border-radius: 2.5vw; }
    .case__device-frame { border-radius: 1.4vw; padding: 1vw 0.7vw 0.7vw; }
    .case__device-bar span { width: 0.9vw; height: 0.9vw; }
    .case__device--mobile .case__device-frame { padding: 2.2vw 0.5vw 0.5vw; border-radius: 2.5vw; }
    .case__device--mobile .case__device-notch { top: 0.7vw; height: 1vw; }

    .case__seo-grid { grid-template-columns: 1fr; padding: 4vw; border-radius: 2.5vw; gap: 3vw; }
    .case__seo-traffic { padding: 3vw; border-radius: 2vw; }
    .case__seo-label { font-size: 1.5vw; }
    .case__seo-value { font-size: 6vw; }
    .case__seo-period { font-size: 1.8vw; }
    .case__seo-kw { padding: 1.4vw 0; font-size: 1.85vw; }

    .case__testimonial { padding: 4vw; border-radius: 2.5vw; }
    .case__testimonial-quote { font-size: 2.4vw; padding-left: 3vw; margin-bottom: 3vw; }
    .case__testimonial-photo { width: 6.5vw; height: 6.5vw; }
    .case__testimonial-name { font-size: 2vw; }
    .case__testimonial-pos { font-size: 1.55vw; }

    .case__cta { padding: 4vw; border-radius: 2.5vw; gap: 3vw; }
    .case__cta-title { font-size: 2.6vw; }
    .case__cta-descr { font-size: 1.8vw; }
    .case__cta-btn { height: 7vw; padding: 0 3.5vw; }
    .case__cta-btn span { font-size: 1.95vw; }
}

/* === АДАПТИВ — мобильный === */
@media (max-width: 600px) {
    .case__block { margin-bottom: 10vw; }
    .case__block-title { font-size: 6vw; margin-bottom: 4vw; }
    .case__block-descr { font-size: 3.6vw; }

    .case__hero { padding: 6vw 5vw; border-radius: 4vw; }
    .case__hero-meta { font-size: 3vw; padding: 1.2vw 2.4vw; margin-bottom: 4vw; }
    .case__hero-title { font-size: 7vw !important; }
    .case__hero-subtitle { font-size: 3.8vw; margin-bottom: 5vw; }
    .case__hero-info { gap: 5vw; padding-top: 5vw; }
    .case__hero-info-label { font-size: 2.8vw; }
    .case__hero-info-value { font-size: 4vw; }

    .case__task-text { font-size: 4vw; }

    .case__numbers { padding: 6vw 5vw; }
    .case__numbers-grid,
    .case__numbers-grid[data-count="3"],
    .case__numbers-grid[data-count="4"],
    .case__numbers-grid[data-count="5"],
    .case__numbers-grid[data-count="6"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 5vw;
    }
    .case__number-value { font-size: 8vw; }
    .case__number-label { font-size: 3.4vw; }

    /* WYSIWYG на мобильном — !important перебивает наследуемые стили темы */
    .case__wysiwyg .portfolio-typical__editor,
    .case__task-text,
    .case__text-image-body { font-size: 4.2vw !important; line-height: 1.55 !important; }
    .case__wysiwyg .portfolio-typical__editor *,
    .case__task-text *,
    .case__text-image-body * { font-size: inherit; line-height: inherit; }
    .case__wysiwyg h1, .case__wysiwyg h2 { font-size: 5.5vw !important; line-height: 1.2 !important; }
    .case__wysiwyg h3, .case__task-text h3, .case__text-image-body h3 { font-size: 4.8vw !important; line-height: 1.25 !important; }
    .case__wysiwyg h4 { font-size: 4.4vw !important; line-height: 1.3 !important; }
    .case__wysiwyg p, .case__task-text p, .case__text-image-body p { font-size: 4.2vw !important; line-height: 1.55 !important; }
    .case__wysiwyg li, .case__task-text li, .case__text-image-body li { font-size: 4.2vw !important; line-height: 1.55 !important; }
    .case__wysiwyg ul, .case__wysiwyg ol,
    .case__task-text ul, .case__task-text ol,
    .case__text-image-body ul, .case__text-image-body ol { padding-left: 5vw; }
    .case__wysiwyg ul > li::before,
    .case__task-text ul > li::before,
    .case__text-image-body ul > li::before {
        left: -3.5vw; top: 2.4vw; width: 1.5vw; height: 1.5vw;
    }

    .case__stack-tag {
        padding: 2.5vw 4vw;
        font-size: 3.6vw;
        border-radius: 1.8vw;
    }

    .case__gallery--masonry .case__gallery-grid,
    .case__gallery--grid_2 .case__gallery-grid,
    .case__gallery--grid_3 .case__gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .case__gallery--masonry .case__gallery-item.is-feature { grid-column: auto; grid-row: auto; }
    .case__gallery-item { aspect-ratio: 16/10; border-radius: 3vw; }

    .case__text-image-body { font-size: 3.8vw; }

    .case__stages-grid { grid-template-columns: 1fr; gap: 1rem; }
    .case__stage { padding: 5vw; border-radius: 3vw; }
    .case__stage-num { font-size: 3.2vw; }
    .case__stage-name { font-size: 4.2vw; }
    .case__stage-term { font-size: 3.2vw; }
    .case__stage-descr { font-size: 3.4vw; }

    .case__devices-stage {
        flex-direction: column;
        align-items: stretch;
        gap: 4vw;
        padding: 4vw;
        min-height: auto;
        border-radius: 4vw;
    }
    .case__device--desktop, .case__device--tablet, .case__device--mobile { max-width: 100%; flex: none; }
    .case__device-frame { border-radius: 2.5vw; padding: 1.8vw 1.2vw 1.2vw; }
    .case__device-bar span { width: 1.6vw; height: 1.6vw; }
    .case__device--mobile { max-width: 60%; margin: 0 auto; }
    .case__device--mobile .case__device-frame { padding: 4vw 1vw 1vw; border-radius: 5vw; }

    .case__seo-grid { padding: 6vw 5vw; border-radius: 4vw; }
    .case__seo-traffic { padding: 5vw; }
    .case__seo-label { font-size: 3vw; }
    .case__seo-value { font-size: 11vw; }
    .case__seo-period { font-size: 3.4vw; }
    .case__seo-kw { font-size: 3.6vw; padding: 2.5vw 0; }

    .case__testimonial { padding: 6vw 5vw; border-radius: 4vw; }
    .case__testimonial-quote { font-size: 4.4vw; padding-left: 4vw; margin-bottom: 5vw; }
    .case__testimonial-photo { width: 12vw; height: 12vw; }
    .case__testimonial-name { font-size: 4vw; }
    .case__testimonial-pos { font-size: 3.2vw; }

    .case__cta {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        padding: 6vw 5vw;
        border-radius: 4vw;
        gap: 4vw;
    }
    .case__cta-title { font-size: 5vw; }
    .case__cta-descr { font-size: 3.6vw; }
    .case__cta-btn { width: 100%; height: 14vw; padding: 0; }
    .case__cta-btn span { font-size: 4vw; }
}

/* === 14. ДО/ПОСЛЕ === */
.case__ba-grid { display: flex; flex-direction: column; gap: 2rem; }
.case__ba-label { font-weight: 600; font-size: 1.1rem; margin-bottom: 0.75rem; color: var(--text-main-color); }
.case__ba-images { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.case__ba-side { position: relative; border-radius: 1rem; overflow: hidden; }
.case__ba-side img { width: 100%; display: block; }
.case__ba-badge {
    position: absolute; top: 0.75rem; left: 0.75rem;
    padding: 0.3rem 0.8rem; border-radius: 2rem;
    font-size: 0.8rem; font-weight: 600; color: #fff;
}
.case__ba-badge--before { background: #EF4444; }
.case__ba-badge--after { background: var(--main-color, #31B939); }
@media (max-width: 600px) { .case__ba-images { grid-template-columns: 1fr; } }

/* === 15. СЛОЖНОСТИ === */
.case__ch-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.case__ch-card {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.5rem; align-items: center;
    background: #fff; border: 1px solid rgba(0,0,0,0.06); border-radius: 1rem; padding: 1.5rem;
}
.case__ch-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.case__ch-problem .case__ch-label { color: #EF4444; }
.case__ch-solution .case__ch-label { color: var(--main-color, #31B939); }
.case__ch-problem p, .case__ch-solution p { margin: 0; font-size: 0.95rem; line-height: 1.5; }
.case__ch-arrow { font-size: 1.5rem; color: #D1D5DB; font-weight: 300; }
@media (max-width: 768px) {
    .case__ch-card { grid-template-columns: 1fr; gap: 0.75rem; }
    .case__ch-arrow { text-align: center; transform: rotate(90deg); }
}
/* === Похожие кейсы === */
.related-cases {
    padding: 4rem 0 3rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.related-cases__title {
    text-align: center;
    margin-bottom: 2.5rem;
}
.related-cases__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
@media (max-width: 1024px) {
    .related-cases__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .related-cases__grid { grid-template-columns: 1fr; }
}
