/* =============================================
   CASES SECTION — Compact Green Theme Redesign
   Overrides main.css .cases styles (lines 988-1230)
   Applied globally to all pages with cases
   ============================================= */

/* === SECTION === */
.cases {
    background: linear-gradient(180deg, #fafffe 0%, #f0fdf4 100%);
    position: relative;
}
.cases::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #d1fae5 50%, transparent 100%);
}

/* === TITLE === */
.cases__title {
    font-size: clamp(28px, 4vw, 36px) !important;
}
.cases__title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 0.85em;
    background: linear-gradient(180deg, #059669 0%, #34d399 100%);
    border-radius: 2px;
    margin-right: 14px;
    vertical-align: middle;
}

/* === BUTTON "Все кейсы" === */
.cases__btn {
    color: #059669 !important;
    border: 2px solid #059669 !important;
    border-radius: 14px !important;
    padding: 12px 28px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    background: transparent !important;
    width: auto !important;
    min-width: 160px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.cases__btn:hover {
    background: #059669 !important;
    color: #fff !important;
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.25);
    transform: translateY(-1px);
}

/* === SLIDER WRAPPER === */
.case-slider {
    gap: 16px;
}
.case-slider__wrapper:first-child,
.case-slider__wrapper.case-slider__wrapper__shadow2 {
    border-radius: 20px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05), 0 1px 6px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(209, 250, 229, 0.6);
}

/* === CARD (both .case-card and .case-page-card) === */
.case-card,
.case-page-card {
    border-radius: 20px !important;
    overflow: hidden;
    background: #fff;
}

/* === CARD CONTENT GRID — COMPACT === */
.case-card__content {
    height: 340px !important;
    grid-template-columns: 1.1fr 0.9fr !important;
}

/* === TEXT AREA — COMPACT === */
.case-card__text {
    padding: 28px 28px 24px !important;
    gap: 12px !important;
    max-width: none !important;
    justify-content: center;
}
.case-card__content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* === TITLE === */
.case-card__title {
    font-size: 22px !important;
    line-height: 1.25 !important;
    margin-bottom: 0;
}
.case-card__title a {
    color: var(--color-gray-900) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}
.case-card__title a:hover {
    color: #059669 !important;
}

/* === STATS — Green chips === */
.case-card__stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.case-card__stat {
    gap: 10px !important;
    padding: 7px 12px;
    background: #f0fdf4;
    border-radius: 10px;
    border: 1px solid #d1fae5;
    font-size: 13px !important;
    line-height: 1.35 !important;
    transition: all 0.2s ease;
}
.case-card__stat:hover {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

/* Override inline SVG checkmark color */
.case-card__stat svg path {
    stroke: #059669 !important;
}

.case-card__stat-subtitle {
    font-size: 12px !important;
    color: #6B7280;
    line-height: 1.3;
}
.case-card__stat-value {
    font-size: 17px !important;
    color: #059669 !important;
    font-weight: 700 !important;
    line-height: 1.2;
}

/* === METRICS — Green values === */
.case-card__metrics {
    gap: 16px !important;
}
.case-card__metrics span,
.case-card__metric,
.case-card__metrics.green span {
    color: #059669 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.2;
}

/* === LINK "Подробнее" — Pill button === */
.case-card__link {
    color: #059669 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 8px 18px !important;
    background: #f0fdf4;
    border-radius: 100px !important;
    border: 1px solid #d1fae5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-top: auto;
    text-decoration: none !important;
    line-height: 1.4 !important;
}
.case-card__link:hover {
    background: #059669 !important;
    color: #fff !important;
    border-color: #059669 !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
    transform: translateY(-1px);
}

/* Override inline SVG arrow color */
.case-card__link svg path {
    stroke: #059669 !important;
    transition: stroke 0.3s ease;
}
.case-card__link:hover svg path {
    stroke: #fff !important;
}
.case-card__link svg {
    width: 24px;
    height: 24px;
}

/* === IMAGE === */
.case-card__image {
    position: relative;
    overflow: hidden;
}
.case-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}
.case-card__img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.case-page-card:hover .case-card__img,
.case-card:hover .case-card__img {
    transform: scale(1.03);
}

/* === SLIDER DOTS — Green pills === */
.case-slider-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}
.case-slider__dot {
    width: 8px !important;
    height: 8px !important;
    background: #d1fae5 !important;
    border: none;
    border-radius: 100px !important;
    transition: all 0.3s ease !important;
}
.case-slider__dot--active {
    width: 28px !important;
    height: 8px !important;
    background: #059669 !important;
    border-radius: 100px !important;
}

/* === SLIDER ARROWS === */
.case-slider-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0fdf4;
    border-radius: 50%;
    border: 1px solid #d1fae5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.case-slider-arrow:hover {
    background: #059669;
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    transform: translateY(-1px);
}
.case-slider-arrow svg,
.case-slider-arrow i {
    transition: all 0.3s ease;
}
.case-slider-arrow:hover svg path,
.case-slider-arrow:hover i svg path {
    stroke: #fff;
    fill: #fff;
}

/* === RESPONSIVE — 1200px === */
@media (max-width: 1200px) {
    .case-card__content {
        height: 320px !important;
    }
    .case-card__text {
        padding: 24px !important;
        gap: 10px !important;
    }
    .case-card__title {
        font-size: 20px !important;
    }
    .case-card__stat-value {
        font-size: 16px !important;
    }
    .case-card__metrics span,
    .case-card__metric {
        font-size: 15px !important;
    }
}

/* === RESPONSIVE — 992px === */
@media (max-width: 992px) {
    .case-card__content {
        height: 300px !important;
    }
    .case-card__text {
        padding: 20px !important;
    }
    .case-card__title {
        font-size: 19px !important;
    }
    .case-card__stat {
        padding: 5px 10px;
        font-size: 12px !important;
    }
    .case-card__stat-subtitle {
        font-size: 12px !important;
    }
    .case-card__stat-value {
        font-size: 15px !important;
    }
}

/* === RESPONSIVE — 768px === */
@media (max-width: 768px) {
    .cases {
        padding: 40px 0;
    }
    .cases__title::before {
        width: 3px;
        margin-right: 10px;
    }
    .case-card__content {
        grid-template-columns: 1fr !important;
        height: auto !important;
    }
    .case-card__image {
        height: 200px;
        order: -1;
    }
    .case-card__text {
        padding: 24px 20px !important;
        gap: 14px !important;
        max-width: none !important;
    }
    .case-card__title {
        font-size: 20px !important;
    }
    .case-card__stat {
        padding: 6px 10px;
        font-size: 13px !important;
    }
    .case-card__stat-value {
        font-size: 16px !important;
    }
    .case-card__metrics {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 12px !important;
    }
    .case-card__metrics span,
    .case-card__metric {
        font-size: 15px !important;
        white-space: nowrap;
    }
    .case-slider__wrapper:first-child,
    .case-slider__wrapper.case-slider__wrapper__shadow2 {
        border-radius: 16px !important;
    }
    .case-card,
    .case-page-card {
        border-radius: 16px !important;
    }
    .cases__btn {
        width: 100% !important;
        max-width: 280px;
    }
    .case-slider-arrow {
        width: 36px;
        height: 36px;
    }
}

/* === RESPONSIVE — 480px === */
@media (max-width: 480px) {
    .cases {
        padding: 32px 0;
    }
    .case-card__text {
        padding: 20px 16px !important;
        gap: 10px !important;
    }
    .case-card__title {
        font-size: 18px !important;
    }
    .case-card__stat {
        padding: 5px 8px;
        font-size: 12px !important;
        gap: 8px !important;
    }
    .case-card__stat-subtitle {
        font-size: 12px !important;
    }
    .case-card__stat-value {
        font-size: 14px !important;
    }
    .case-card__metrics span,
    .case-card__metric {
        font-size: 14px !important;
    }
    .case-card__link {
        font-size: 13px !important;
        padding: 6px 14px !important;
    }
    .case-card__image {
        height: 170px;
    }
    .case-slider__dot {
        width: 6px !important;
        height: 6px !important;
    }
    .case-slider__dot--active {
        width: 22px !important;
        height: 6px !important;
    }
}
