/* ==========================================================================
   Styles for Case Study (Клиенты) - FULL FINAL VERSION
   ========================================================================== */

/* --- 1. Общие контейнеры и ПК-отступы --- */
@media (min-width: 992px) {
    .case-container {
        padding-left: calc(var(--bs-gutter-x, 1.5rem) * .5 + 40px);
        padding-right: calc(var(--bs-gutter-x, 1.5rem) * .5 + 40px);
    }
    .breadcrumbs { padding-top: 24px !important; } /* Тот самый отступ 54px */
}

/* --- 2. Хлебные крошки --- */
.breadcrumbs { padding-top: 0; margin-bottom: 44px; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; gap: 12px; row-gap: 8px; }
.breadcrumbs li { font-family: 'Lato', sans-serif; font-size: 14px; color: #7C8498; display: flex; align-items: center; white-space: nowrap; }
.breadcrumbs a { color: #7C8498; text-decoration: none; transition: 0.2s; }
.breadcrumbs a:hover { color: var(--header-accent); }
.breadcrumbs .separator { width: 4px; height: 4px; border-radius: 50%; background-color: var(--header-accent); display: inline-block; }

/* --- 3. Главный экран (Hero) --- */
.case-hero__row { gap: 87px; flex-wrap: nowrap; }
.case-hero__h1 { font-size: 38px; font-weight: 400; line-height: 1.2; text-transform: uppercase; color: var(--header-dark); font-family: var(--header-font-primary); }

/* Блок отзыва и кавычки */
.expandable-block { display: flex; align-items: flex-start; gap: 20px; } /* Кавычка слева, текст справа */
.case-quote-icon { margin-top: -2px !important; flex-shrink: 0; width: 24px; height: auto; }
.patients__card-review-body { flex: 1; display: flex; flex-direction: column; gap: 10px; text-align: left; }

/* Кнопка "Развернуть" */
.case-hero__expand { align-self: flex-end; background: transparent; border: none; font-family: 'Inter', sans-serif; font-weight: 500; font-size: 14px; color: #407CFF; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.case-hero__expand .expand-icon { transition: transform 0.3s ease; }

.case-hero__patient { font-family: 'Lato', sans-serif; font-style: italic; font-size: 14px; color: var(--header-gray); margin: 0 0 40px 40px; }

/* Большая кнопка CTA */
.btn-primary-large { 
    align-self: flex-start; 
    padding: 28px 40px; 
    border-radius: 100px; 
    border: none; 
    background: linear-gradient(90deg, #F44847 0%, #F19E57 100%); 
    font-family: 'Inter', sans-serif; 
    font-size: 21px; 
    color: #FFFFFF; 
    cursor: pointer; 
    box-shadow: 0 4px 16px rgba(244, 72, 71, 0.25); 
    white-space: nowrap; /* Всегда в одну строку */
    transition: 0.3s;
}
.btn-primary-large:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(244, 72, 71, 0.35); }

.case-hero__img-col { width: 530px; flex-shrink: 0; }
.ba-slider--hero { height: 590px; border-radius: 25px; width: 100%; position: relative; overflow: hidden; }

/* --- 4. Отзывы в соцсетях --- */
.case-reviews__screenshot { width: 100%; border-radius: 20px; transition: 0.3s; cursor: pointer; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.case-reviews__screenshot:hover { transform: translateY(-4px); }

/* Подсказка "листать": серая */
.mobile-swipe-hint { font-family: 'Inter', sans-serif; font-size: 14px; color: #7C8498; }
.mobile-swipe-hint img { filter: grayscale(1) opacity(0.6); }

/* --- 5. Комментарий доктора --- */
.case-comment__wrapper { display: flex; flex-direction: column; gap: 20px; }
.case-comment__box { background: linear-gradient(90deg, #FFFFFF 0%, #EFF4F7 100%); border-radius: 20px; padding: 40px; display: flex; align-items: flex-start; gap: 20px; }
.case-comment__text { flex: 1; }

@media (min-width: 992px) {
    .case-comment__wrapper { flex-direction: row; }
    .case-comment__left { flex: 1; }
    .case-comment__right { width: 380px; flex-shrink: 0; }
    #gallery-track { flex-wrap: nowrap !important; overflow-x: hidden; scroll-behavior: smooth; }
    #gallery-track .gallery-slide { flex: 0 0 25% !important; max-width: 25% !important; }
}

/* Соцсети справа */
.case-social-box { padding: 26px 33px; display: flex; flex-direction: column; }
.case-social-box__btn { display: flex; align-items: center; gap: 15px; background-color: #D9D9D9; border-radius: 100px; padding: 10px 20px 10px 10px; text-decoration: none; font-size: 16px; color: var(--header-dark); margin-bottom: 15px; width: fit-content; transition: 0.2s; }
.case-social-box__btn:hover { background-color: #c0c0c0; }
.case-social-box__icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.case-social-box__icon--tg { background-color: #55AEE9; }
.case-social-box__icon--ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }

/* Мета дисклеймер: серый */
.case-social-box__disclaimer { font-family: 'Inter', sans-serif; font-weight: 400; font-size: 12px; line-height: 19px; color: #7C8498; margin: 20px 0 0 0; }

/* --- 6. Галерея (Фотосессия) --- */
.case-gallery__item { width: 100%; aspect-ratio: 263 / 500; border-radius: 20px; overflow: hidden; transition: 0.3s; cursor: pointer; box-shadow: 0 4px 16px rgba(41, 43, 50, 0.06); }
.case-gallery__item:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(41, 43, 50, 0.12); }
.case-gallery__item img { width: 100%; height: 100%; object-fit: cover; }

/* --- 7. МОБИЛЬНЫЕ ФИКСЫ --- */
@media (max-width: 991.98px) {
    /* Хлебные крошки в одну строку с троеточием */
    .breadcrumbs ol { flex-wrap: nowrap !important; }
    .breadcrumb-item-current { flex: 1; min-width: 0; }
    .breadcrumb-text-truncate { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
    
    .case-hero__row { flex-direction: column; gap: 20px; }
    
    /* Сокращаем расстояние от фото ДО/ПОСЛЕ до тега */
    .case-hero__img-col { width: 100%; margin-bottom: 5px; }
    .case-hero__text-col { padding-top: 0; }
    .patients__card-tags { margin-top: 0 !important; margin-bottom: 15px !important; }
    
    .ba-slider--hero { height: 450px; }
    .case-hero__h1 { font-size: 28px; }
    
    /* Кнопка: текст в одну строку на любом смартфоне */
    .btn-primary-large { 
        font-size: clamp(14px, 4.2vw, 18px); 
        padding: 18px 20px; 
        width: 100%; 
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    /* Отступы между секциями на 1/3 меньше */
    .case-study section.mb-5 { margin-bottom: 30px !important; }
    .case-study .py-5, .case-study .pb-5 { padding-top: 0 !important; padding-bottom: 0 !important; }

    /* Нативный свайп для мобилок */
    .mobile-scroll-row { 
        display: flex; 
        flex-wrap: nowrap !important; 
        overflow-x: auto; 
        scroll-snap-type: x mandatory; 
        -webkit-overflow-scrolling: touch; 
        gap: 15px; 
    }
    .mobile-scroll-row::-webkit-scrollbar { display: none; }
    .scroll-item { flex: 0 0 85% !important; max-width: 85% !important; scroll-snap-align: start; }
    .mobile-scroll-row img { pointer-events: none; }
}

@media (max-width: 575.98px) {
    .ba-slider--hero { height: 400px; }
    .case-comment__box { padding: 24px; flex-direction: column; gap: 15px; }
    .case-social-box { padding: 20px 0; }
}
/* --- Выравнивание текста вправо, а блока влево (для ДОКТОРА) --- */

.header-align-right {
    width: fit-content; /* Сужаем весь блок по ширине самого длинного текста */
    margin-left: 0; /* Гарантируем, что блок остается слева */
}

/* Превращаем H2 в колонку и прижимаем её содержимое к правому краю */
.header-align-right .section-header__title {
    display: flex;
    flex-direction: column;
    align-items: flex-end; 
}

/* Сбрасываем лишнее растяжение строк, если оно было */
.header-align-right .section-header__row-top,
.header-align-right .section-header__row-bottom {
    width: fit-content;
    justify-content: flex-end; 
}