/* ============================================================
   СЕКЦИЯ: СКРЫТЫЕ УГРОЗЫ ПРОИЗВОДСТВА
   ============================================================ */
#factory-risks {
    padding: 60px 0 80px;
    border-top: 1px solid #eef2f6;
}

#factory-risks .section-header {
    text-align: center;
    margin-bottom: 32px;
}

#factory-risks .section-header .eyebrow {
    justify-content: center;
}

#factory-risks .section-header .sec-title {
    max-width: 700px;
    margin: 8px auto 12px;
    text-align: center;
}

#factory-risks .section-header .sec-lede {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
}

/* --- Кнопки-фильтры --- */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 24px 0 32px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 60px;
    border: 2px solid #e0e6ef;
    background: #ffffff;
    font-size: 15px;
    font-weight: 600;
    color: #2f4052;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--blue);
    background: #fefcf7;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(245, 166, 35, 0.15);
}

.filter-btn.active {
    border-color: var(--blue);
    background: var(--blue);
    color: #0b1a2b;
    box-shadow: 0 4px 20px rgba(245, 166, 35, 0.30);
}

.filter-btn.active:hover {
    border-color: var(--blue-l);
    background: var(--blue-l);
    color: #0b1a2b;
    box-shadow: 0 4px 20px rgba(245, 166, 35, 0.30);
}

.filter-btn .btn-icon {
    font-size: 20px;
}

.filter-btn .btn-count {
    font-size: 13px;
    font-weight: 400;
    color: #6a7f98;
    background: #f0f2f5;
    padding: 0 10px;
    border-radius: 30px;
    line-height: 22px;
}

.filter-btn.active .btn-count {
    background: rgba(11, 26, 43, 0.15);
    color: #0b1a2b;
}

/* --- Контейнер для активной группы --- */
.risks-content {
    position: relative;
    min-height: 300px;
}

.risk-group-display {
    display: none;
    animation: fadeSlideUp 0.4s ease forwards;
}

.risk-group-display.active {
    display: block;
}

.risk-group-display .group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eef2f6;
}

.risk-group-display .group-header .group-icon {
    font-size: 28px;
}

.risk-group-display .group-header .group-title {
    font-size: 22px;
    font-weight: 700;
    color: #0b1a2b;
}

.risk-group-display .group-header .group-sub {
    font-size: 15px;
    color: #6a7f98;
    font-weight: 400;
    margin-left: 6px;
}

/* --- Сетка карточек --- */
.risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

/* ============================================================
   КАРТОЧКА РИСКА
   ============================================================ */
.risk-card {
    background: #f8faff;
    border: 1px solid #e8edf6;
    border-radius: 16px;
    padding: 14px 18px 14px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    min-height: 72px;
}

.risk-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.10);
    border-color: var(--blue);
    background: #ffffff;
}

.risk-card:active {
    transform: scale(0.97);
}

/* --- Внутренняя обёртка (иконка + контент в строку) --- */
.risk-card .risk-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* --- Иконка с заливкой --- */
.risk-card .risk-icon-wrap {
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--blue);
    color: #ffffff;
    font-size: 20px;
    transition: transform 0.3s ease;
    margin-top: 2px;
}

.risk-card:hover .risk-icon-wrap {
    transform: scale(1.05);
}

/* --- Контент --- */
.risk-card .risk-content {
    flex: 1;
    min-width: 0;
}

.risk-card .risk-title {
    font-weight: 600;
    font-size: 15px;
    color: #0b1a2b;
    line-height: 1.25;
}

/* --- Краткое описание (вместо бейджа) --- */
.risk-card .risk-desc {
    display: block;
    font-size: 13px;
    line-height: 1.3;
    margin-top: 2px;
    font-weight: 500;
}

.risk-card .risk-desc.danger {
    color: #c0392b;
}

.risk-card .risk-desc.safety {
    color: var(--link);
}

.risk-card .risk-desc.reputation {
    color: #b8860b;
}

/* --- "Подробнее" появляется при наведении --- */
.risk-card .click-hint {
    font-size: 13px;
    font-weight: 500;
    color: var(--blue);
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.3s ease;
    margin-top: 4px;
}

.risk-card:hover .click-hint {
    opacity: 1;
    transform: translateY(0);
}

/* --- Анимация карточек --- */
.risk-card {
    opacity: 0;
    animation: fadeSlideUp 0.4s ease forwards;
}

.risk-group-display.active .risk-card:nth-child(1) { animation-delay: 0.05s; }
.risk-group-display.active .risk-card:nth-child(2) { animation-delay: 0.10s; }
.risk-group-display.active .risk-card:nth-child(3) { animation-delay: 0.15s; }
.risk-group-display.active .risk-card:nth-child(4) { animation-delay: 0.20s; }
.risk-group-display.active .risk-card:nth-child(5) { animation-delay: 0.25s; }
.risk-group-display.active .risk-card:nth-child(6) { animation-delay: 0.30s; }
.risk-group-display.active .risk-card:nth-child(7) { animation-delay: 0.35s; }
.risk-group-display.active .risk-card:nth-child(8) { animation-delay: 0.40s; }

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Адаптив --- */
@media (max-width: 920px) {
    .filter-buttons {
        gap: 10px;
    }
    .filter-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    .risk-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .risk-group-display .group-header .group-title {
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    #factory-risks {
        padding: 40px 0 60px;
    }

    .filter-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }

    .risk-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .risk-card {
        padding: 12px 14px 12px 12px;
    }
    .risk-card .risk-title {
        font-size: 13px;
    }
    .risk-card .risk-icon-wrap {
        width: 38px;
        height: 38px;
        font-size: 17px;
        flex: 0 0 38px;
    }
    .risk-card .risk-desc {
        font-size: 12px;
    }
    .risk-card .click-hint {
        font-size: 12px;
    }

    .risk-group-display .group-header .group-title {
        font-size: 18px;
    }
    .risk-group-display .group-header .group-sub {
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .risk-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Общие стили для .container, .eyebrow, .sec-title, .sec-lede --- */
#factory-risks .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#factory-risks .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 8px;
}

#factory-risks .eyebrow i {
    font-size: 18px;
}

#factory-risks .sec-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #0b1a2b;
    margin: 12px 0 16px;
}

#factory-risks .sec-lede {
    font-size: 17px;
    line-height: 1.65;
    color: rgba(10, 6, 3, 0.75);
    max-width: 560px;
    margin-bottom: 24px;
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО
   ============================================================ */
.risk-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.60);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 50;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.risk-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.risk-modal-content {
    background: #ffffff;
    border-radius: 24px;
    max-width: 766px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    padding: 32px 36px 36px;
    position: relative;
    box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.40);
    animation: riskModalSlideIn 0.35s ease forwards;
}

@keyframes riskModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.risk-modal-close {
    position: relative;
    top: 0;
    float: right;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #9aabbf;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 4px 8px;
    border-radius: 8px;
    z-index: 10;
}

.risk-modal-close:hover {
    color: #0b1a2b;
    transform: rotate(90deg);
    background: rgba(0, 0, 0, 0.04);
}

/* ============================================================
   ЗАГОЛОВОК С КНОПКОЙ "ЗАКАЗАТЬ АУДИТ"
   ============================================================ */
.risk-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    clear: both;
    padding-top: 4px;
}

.risk-modal-header .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.risk-modal-header .header-left .modal-icon {
    font-size: 28px;
    color: #f5a623;
}

.risk-modal-header .header-left h3 {
    width: 390px;
    font-size: 26px;
    font-weight: 700;
    color: #0b1a2b;
    line-height: 1.2;
}

/* ============================================================
   КНОПКА "ЗАКАЗАТЬ АУДИТ" — НОВАЯ
   ============================================================ */

/* --- Общий стиль для обеих кнопок --- */
.risk-header-cta,
.risk-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f5a623;
    color: #0b1a2b;
    padding: 10px 24px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.3s ease, transform 0.25s ease;
    /* Анимация свечения по бокам */
    animation: glowSides 3s ease-in-out infinite;
    will-change: transform, box-shadow;
}

/* --- Иконка внутри кнопки --- */
.risk-header-cta .cta-icon,
.risk-nav-cta .cta-icon {
    font-size: 16px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* --- Текст всегда виден --- */
.risk-header-cta .cta-text,
.risk-nav-cta .cta-text {
    display: inline;
    opacity: 1;
    max-width: none;
    margin-left: 0;
    overflow: visible;
    white-space: nowrap;
}

/* ============================================================
   ПРИ НАВЕДЕНИИ: ПОДНЯТИЕ + ВИБРАЦИЯ
   ============================================================ */
.risk-header-cta:hover,
.risk-nav-cta:hover {
    background: #e09515;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 166, 35, 0.35);
    /* Анимация вибрации (короткая) */
    animation: vibrate 0.4s ease 1, glowSides 3s ease-in-out infinite;
}

/* --- Вибрация иконки при наведении --- */
.risk-header-cta:hover .cta-icon,
.risk-nav-cta:hover .cta-icon {
    animation: vibrateIcon 0.4s ease 1;
}

/* ============================================================
   АНИМАЦИИ
   ============================================================ */

/* --- Свечение по бокам (основная анимация) --- */
@keyframes glowSides {
    0% {
        box-shadow:
            -3px 0 12px 2px rgba(245, 166, 35, 0.3),
            3px 0 12px 2px rgba(245, 166, 35, 0.3);
    }
    25% {
        box-shadow:
            -5px 0 20px 4px rgba(245, 166, 35, 0.5),
            5px 0 20px 4px rgba(200, 50, 30, 0.3);
    }
    50% {
        box-shadow:
            -6px 0 28px 6px rgba(200, 50, 30, 0.4),
            6px 0 28px 6px rgba(245, 166, 35, 0.5);
    }
    75% {
        box-shadow:
            -5px 0 20px 4px rgba(245, 166, 35, 0.5),
            5px 0 20px 4px rgba(200, 50, 30, 0.3);
    }
    100% {
        box-shadow:
            -3px 0 12px 2px rgba(245, 166, 35, 0.3),
            3px 0 12px 2px rgba(245, 166, 35, 0.3);
    }
}

/* --- Вибрация всей кнопки (короткая) --- */
@keyframes vibrate {
    0% { transform: translateY(-3px) rotate(0deg); }
    20% { transform: translateY(-3px) rotate(-2deg); }
    40% { transform: translateY(-3px) rotate(2deg); }
    60% { transform: translateY(-3px) rotate(-1.5deg); }
    80% { transform: translateY(-3px) rotate(1.5deg); }
    100% { transform: translateY(-3px) rotate(0deg); }
}

/* --- Вибрация иконки (короткая) --- */
@keyframes vibrateIcon {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-12deg) scale(1.1); }
    50% { transform: rotate(12deg) scale(1.1); }
    75% { transform: rotate(-8deg) scale(1.05); }
    100% { transform: rotate(0deg) scale(1); }
}

/* ============================================================
   ОСТАЛЬНЫЕ СТИЛИ МОДАЛКИ (без изменений)
   ============================================================ */
.risk-modal-sub {
    font-size: 15px;
    color: #6a7f98;
    margin-bottom: 20px;
    line-height: 1.4;
    clear: both;
}

/* --- Блок фото --- */
.risk-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0 20px;
}

.risk-photos .photo-item {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: #f0f2f5;
    border: 1px solid #e8edf6;
    transition: all 0.3s ease;
    cursor: pointer;
}

.risk-photos .photo-item:hover {
    border-color: #f5a623;
    transform: scale(1.02);
    box-shadow: 0 8px 24px -8px rgba(0,0,0,0.15);
}

.risk-photos .photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.risk-photos .photo-item:hover img {
    transform: scale(1.03);
}

.risk-photos .photo-item .photo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-photos .photo-item .photo-label.before {
    background: linear-gradient(transparent, rgba(192, 57, 43, 0.7));
}

.risk-photos .photo-item .photo-label.after {
    background: linear-gradient(transparent, rgba(26, 122, 74, 0.7));
}

.risk-photos .photo-item .photo-zoom-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 500;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.risk-photos .photo-item:hover .photo-zoom-hint {
    opacity: 1;
}

/* --- Модалка для увеличенного фото --- */
.photo-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    z-index: 50;
    justify-content: center;
    align-items: center;
    padding: 30px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.photo-modal-overlay .photo-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    animation: photoZoomIn 0.35s ease forwards;
}

@keyframes photoZoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.photo-modal-overlay .photo-modal-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 40px 80px -24px rgba(0,0,0,0.8);
    display: block;
}

.photo-modal-overlay .photo-modal-close {
    position: absolute;
    top: -50px;
    right: -10px;
    background: none;
    border: none;
    font-size: 36px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 4px 8px;
    border-radius: 8px;
    opacity: 0.7;
}

.photo-modal-overlay .photo-modal-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.photo-modal-overlay .photo-modal-label {
    position: absolute;
    bottom: -44px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.photo-modal-overlay .photo-modal-label.before {
    color: rgba(255, 100, 80, 0.9);
}

.photo-modal-overlay .photo-modal-label.after {
    color: rgba(80, 255, 120, 0.9);
}

/* --- Остальные блоки модалки --- */
.risk-modal-block {
    background: #f8faff;
    border-radius: 14px;
    padding: 16px 20px;
    margin-top: 14px;
}

.risk-modal-block.danger {
    background: #fef6f5;
    border-left: 4px solid #c0392b;
}

.risk-modal-block.real-case {
    background: #f5f8ff;
    border-left: 4px solid var(--link);
}

.risk-modal-block.solution {
    background: #f0faf4;
    border-left: 4px solid #1a7a4a;
}

.risk-modal-block h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2f4052;
    margin-bottom: 6px;
}

.risk-modal-block p {
    font-size: 15px;
    line-height: 1.6;
    color: #1f2c3a;
}

.risk-modal-block ul {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
}

.risk-modal-block ul li {
    padding: 4px 0 4px 24px;
    position: relative;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2c3a;
}

.risk-modal-block.danger ul li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: #c0392b;
    font-weight: 700;
}

.risk-modal-block.real-case ul li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: var(--link);
    font-weight: 700;
}

.risk-modal-block.solution ul li::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: #1a7a4a;
    font-weight: 700;
}

.risk-source-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--link);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed var(--link);
    transition: all 0.2s ease;
}

.risk-source-link:hover {
    border-bottom: 1px solid var(--link);
    color: #0d3d7a;
}

.risk-modal-math {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 20px;
    border: 1px solid #e8edf6;
}

.risk-modal-math .math-item {
    font-size: 14px;
    color: #2f4052;
    display: flex;
    align-items: center;
    gap: 6px;
}

.risk-modal-math .math-item strong {
    color: #0b1a2b;
    font-size: 16px;
    font-weight: 700;
}

.risk-modal-math .math-item.loss strong {
    color: #c0392b;
}

.risk-modal-math .math-item.gain strong {
    color: #1a7a4a;
}

.risk-modal-cta-wrapper {
    margin-top: 22px;
    display: flex;
    justify-content: center;
}





/* ===== СЛАЙДЕР "ДО/ПОСЛЕ" ===== */
.before-after-slider {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px 0;
}

.ba-slider {
    position: relative;
    width: 100%;
    max-width: 100%; /* ← Убираем ограничение 600px */
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    user-select: none;
    touch-action: none;
    background: #f0f0f0;
    aspect-ratio: 4 / 3; /* ← Задаём пропорции, чтобы слайдер не схлопывался */
}

/* Оба изображения занимают одну область */
.ba-slider img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* ← Важно! Заполняет контейнер без искажений */
    pointer-events: none;
}

.ba-before,
.ba-after {
    position: relative;
}

/* "До" — фоновый слой */
.ba-before {
    width: 100%;
    height: 100%;
}

.ba-before img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* "После" накладывается поверх "До" и обрезается */
.ba-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%; /* Начальное положение — ровно посередине */
    height: 100%;
    overflow: hidden;
    background: #f0f0f0;
}

.ba-after img {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    height: 100%;
    min-width: 100%;
    object-fit: cover;
    object-position: left center; /* ← Фиксируем позицию, чтобы при обрезке фото не смещалось */
}

/* Убираем лишние отступы внутри модалки */
.risk-modal-content .before-after-slider {
    padding: 0;
}

/* Метки внутри слайдера */
.ba-before .photo-label,
.ba-after .photo-label {
    position: absolute;
    bottom: 20px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    pointer-events: none;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    letter-spacing: 0.3px;
    z-index: 5;
}

.ba-before .photo-label {
    left: 20px;
}

.ba-after .photo-label {
    right: 20px;
}

.ba-before .photo-label.before {
    background: rgba(200, 50, 50, 0.8);
}

.ba-after .photo-label.after {
    background: rgba(50, 180, 80, 0.8);
}

/* ===== ПОЛЗУНОК ===== */
.ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #fff;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    transition: box-shadow 0.2s;
}

.ba-handle:hover {
    box-shadow: 0 0 20px rgba(255,255,255,0.6);
}

/* Центральная линия ползунка */
.ba-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #fff;
    transform: translateX(-50%);
}

/* Стрелки по бокам ползунка */
.ba-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none;
    transition: background 0.2s;
}

.ba-arrow-left {
    left: -15px;
}

.ba-arrow-right {
    right: -15px;
}

.ba-handle:hover .ba-arrow {
    background: #fff;
}

/* Подсказка под слайдером */
.ba-hint {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-top: 12px;
    letter-spacing: 0.5px;
}

/* ===== Адаптив для модалки ===== */
@media (max-width: 768px) {
    .ba-slider {
        aspect-ratio: 4 / 3;
        border-radius: 8px;
    }
    
    .ba-before .photo-label,
    .ba-after .photo-label {
        font-size: 12px;
        padding: 4px 12px;
        bottom: 14px;
    }
    
    .ba-arrow {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .ba-arrow-left {
        left: -10px;
    }
    
    .ba-arrow-right {
        right: -10px;
    }
}

@media (max-width: 480px) {
    .ba-slider {
        aspect-ratio: 4 / 3;
        border-radius: 6px;
    }
    
    .ba-before .photo-label,
    .ba-after .photo-label {
        font-size: 10px;
        padding: 3px 10px;
        bottom: 10px;
    }
    
    .ba-arrow {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .ba-arrow-left {
        left: -8px;
    }
    
    .ba-arrow-right {
        right: -8px;
    }
    
    .ba-hint {
        font-size: 11px;
        margin-top: 8px;
    }
}






/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 768px) {
    .risk-modal-content {
        padding: 24px 20px 24px;
        border-radius: 20px;
        max-width: 100%;
        margin: 10px;
    }

    .risk-modal-header .header-left h3 {
        font-size: 22px;
        width: auto;
    }

    .risk-header-cta,
    .risk-nav-cta {
        font-size: 13px;
        padding: 8px 18px;
        gap: 8px;
    }

    .risk-header-cta .cta-icon,
    .risk-nav-cta .cta-icon {
        font-size: 14px;
    }

    .risk-photos {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .risk-photos .photo-item img {
        height: 150px;
    }

    .risk-modal-close {
        font-size: 24px;
    }

    .photo-modal-overlay .photo-modal-close {
        top: -40px;
        right: 0;
        font-size: 30px;
    }

    .photo-modal-overlay .photo-modal-label {
        bottom: -36px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {

    .risk-modal-content {
        padding: 16px 14px 18px;
        border-radius: 16px;
    }

    .risk-modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .risk-modal-header .header-left h3 {
        font-size: 20px;
        width: auto;
    }

    .risk-header-cta,
    .risk-nav-cta {
        font-size: 13px;
        padding: 8px 16px;
        gap: 8px;
        align-self: flex-start;
    }

    .risk-header-cta .cta-icon,
    .risk-nav-cta .cta-icon {
        font-size: 14px;
    }

    .risk-photos {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .risk-photos .photo-item img {
        height: 180px;
    }

    .risk-modal-block {
        padding: 12px 14px;
        margin-top: 10px;
    }

    .risk-modal-block p,
    .risk-modal-block ul li {
        font-size: 14px;
    }

    .risk-modal-math {
        flex-direction: column;
        gap: 6px;
        padding: 12px 14px;
    }

    .risk-modal-cta-wrapper .risk-nav-cta {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .photo-modal-overlay {
        padding: 16px;
    }

    .photo-modal-overlay .photo-modal-close {
        top: -34px;
        right: 0;
        font-size: 26px;
    }

    .photo-modal-overlay .photo-modal-label {
        bottom: -32px;
        font-size: 13px;
    }
}

/* --- Скроллбар --- */
.risk-modal-content::-webkit-scrollbar {
    width: 6px;
}

.risk-modal-content::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 8px;
    margin: 12px 0;
}

.risk-modal-content::-webkit-scrollbar-thumb {
    background: #c8d0da;
    border-radius: 8px;
}

.risk-modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8b2c0;
}

.risk-modal-content {
    scrollbar-width: thin;
    scrollbar-color: #c8d0da #f0f2f5;
}