/* Stories page. Fedoseev breakpoints: desktop >= 960px; adaptive 375–959.98px; compact < 375px. */
.page-stories main { overflow: hidden; }
.page-stories .clinic-container,
.page-stories .treatment-container,
.page-stories .appointment-section .clinic-container {
    width: min(calc(100% - 72px), 1420px);
    max-width: none;
}
.stories-page,
.stories-lower { color: #27313d; background: #fff; }

.stories-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 13px;
    height: 61px;
    border-top: 1px solid #7d8288;
    border-bottom: 1px solid #7d8288;
    font-size: 18px;
    line-height: 1;
}
.stories-breadcrumbs a { color: #a7aaad; }
.stories-breadcrumbs a:hover { color: #27313d; }

.stories-patients { padding: 0 0 128px; }
.stories-patients h1 {
    margin: clamp(34px, calc(34px + (100vw - 960px) * .05639), 64px) 0 clamp(50px, calc(50px + (100vw - 960px) * .0072917), 57px);
    font-size: clamp(40px, calc(40px + (100vw - 960px) * .003125), 43px);
    font-weight: 400;
    line-height: 1.1;
    text-transform: uppercase;
}
.stories-patients__list { border-top: 0; }
.stories-patient {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    min-height: 0;
    padding: 0 0 34px;
    border-bottom: 1px solid #899096;
}
.stories-patient + .stories-patient { padding-top: clamp(34px, calc(34px + (100vw - 960px) * .003125), 37px); }
.stories-patient__copy {
    min-width: 0;
    padding-top: 3px;
    padding-right: 34px;
    font-size: clamp(14px, calc(14px + (100vw - 960px) * .0010417), 15px);
    line-height: 1.46;
}
.stories-patient__copy h2 {
    margin: 0 0 22px;
    font-size: clamp(16px, calc(16px + (100vw - 960px) * .0020833), 18px);
    font-weight: 700;
    line-height: 1.35;
}
.stories-patient__text p { margin: 0 0 22px; }
.stories-patient__text p:last-child { margin-bottom: 0; }
.stories-patient__text ol,
.stories-patient__text ul { margin: 0 0 22px; padding-left: 25px; }
.stories-patient__text li { padding-left: 1px; }
.stories-patient:nth-child(2) .stories-patient__copy {
    line-height: clamp(18.2px, calc(18.2px + (100vw - 960px) * .002333), 20.44px);
}
.stories-patient__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 700 / 390;
    overflow: hidden;
    background: #e7e4e1;
}

.stories-patient__media-image,
.stories-before-after__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stories-before-after {
    --stories-before-after-position: 50%;
    cursor: ew-resize;
    touch-action: none;
    user-select: none;
}

.stories-before-after__before {
    position: absolute;
    inset: 0;
    overflow: hidden;
    clip-path: inset(0 calc(100% - var(--stories-before-after-position)) 0 0);
}

.stories-before-after__before img,
.stories-before-after__image--after {
    position: absolute;
    inset: 0;
}

.stories-before-after__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--stories-before-after-position);
    z-index: 3;
    width: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    transform: translateX(-50%);
    cursor: ew-resize;
}

.stories-before-after__handle::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(255, 255, 255, .95);
    transform: translateX(-50%);
}

.stories-before-after__handle-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: #fff;
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 2px 10px rgba(39, 49, 61, .14);
}

.stories-before-after__handle:focus-visible .stories-before-after__handle-dot {
    outline: 2px solid #27313d;
    outline-offset: 4px;
}

.stories-before-after.is-dragging .stories-before-after__handle-dot {
    box-shadow: 0 4px 16px rgba(39, 49, 61, .22);
}

/* The blocks below reuse the existing prices-page component layout. */
.stories-treatment .treatment-section { padding-top: 0; }
.stories-treatment .treatment-heading { margin-bottom: 58px; }
.stories-safety { padding-top: 0; }
.stories-offers .offers-section { padding-top: 119px; }
.stories-doctors .about-doctors { padding-top: 149px; }
.stories-first-visit .first-visit { padding-top: 0; }
.stories-appointment { padding-top: 0; }
.stories-contacts { background: #f6f3f2; }

@media (min-width: 375px) and (max-width: 959.98px) {
    .page-stories .clinic-container,
    .page-stories .treatment-container,
    .page-stories .appointment-section .clinic-container {
        width: calc(100% - clamp(48px, 7.5vw, 72px));
        max-width: none;
    }
    .stories-breadcrumbs { height: 61px; font-size: 18px; }
    .stories-patients { padding-bottom: clamp(59px, calc(59px + (100vw - 375px) * .11795), 128px); }
    .stories-patients h1 {
        margin: 34px 0 clamp(30px, calc(30px + (100vw - 375px) * .02222), 43px);
        font-size: clamp(28px, calc(28px + (100vw - 375px) * .02051), 40px);
        line-height: 1.2;
    }
    .stories-patient {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        min-height: 0;
        padding-bottom: clamp(28px, calc(28px + (100vw - 375px) * .01026), 34px);
    }
    .stories-patient + .stories-patient { padding-top: clamp(28px, calc(28px + (100vw - 375px) * .01026), 34px); }
    .stories-patient__copy {
        padding-top: 0;
        padding-right: 0;
        font-size: clamp(14px, calc(14px + (100vw - 375px) * .00171), 15px);
        line-height: 1.43;
    }
    .stories-patient:nth-child(2) .stories-patient__copy { line-height: 1.43; }
    .stories-patient__copy h2 {
        margin-bottom: clamp(18px, calc(18px + (100vw - 375px) * .00684), 22px);
        font-size: clamp(16px, calc(16px + (100vw - 375px) * .00342), 18px);
    }
    .stories-patient__text p { margin-bottom: clamp(18px, calc(18px + (100vw - 375px) * .00684), 22px); }
    .stories-patient__text ol,
    .stories-patient__text ul { margin-bottom: clamp(18px, calc(18px + (100vw - 375px) * .00684), 22px); padding-left: 22px; }
    .stories-patient__media { align-self: start; }

    .stories-treatment .treatment-heading {
        margin-bottom: clamp(30px, calc(30px + (100vw - 375px) * .04786), 58px);
    }
    .stories-offers .offers-section { padding-top: clamp(60px, calc(60px + (100vw - 375px) * .10085), 119px); }
    .stories-doctors .about-doctors { padding-top: clamp(64px, calc(64px + (100vw - 375px) * .1453), 149px); }
}

@media (max-width: 599.98px) {
    .stories-patient { grid-template-columns: 1fr; }
    .stories-patient__media { grid-row: 2; }
}


@media (min-width: 375px) and (max-width: 599.98px) {
    .stories-patient:nth-child(1) .stories-patient__copy { min-height: clamp(454px, calc(574.4px - (100vw - 375px) * .5351), 574.4px); }
    .stories-patient:nth-child(2) .stories-patient__copy { min-height: clamp(354px, calc(402px - (100vw - 375px) * .2133), 402px); }
    .stories-patient:nth-child(3) .stories-patient__copy { min-height: clamp(434px, calc(488px - (100vw - 375px) * .24), 488px); }
    .stories-patient:nth-child(3) { padding-bottom: clamp(28px, calc(31px - (100vw - 375px) * .0133), 31px); }
}

@media (max-width: 374.98px) {
    .page-stories .clinic-container,
    .page-stories .treatment-container,
    .page-stories .appointment-section .clinic-container {
        width: calc(100% - 48px);
        max-width: none;
    }
    .stories-breadcrumbs { gap: 9px; height: 61px; font-size: 14px; white-space: nowrap; }
    .stories-patients { padding-bottom: 59px; }
    .stories-patients h1 { margin: 34px 0 30px; font-size: 28px; line-height: 39px; }
    .stories-patient {
        grid-template-columns: 1fr;
        gap: 22px;
        padding-bottom: 28px;
    }
    .stories-patient + .stories-patient { padding-top: 28px; }
    .stories-patient__copy { padding: 0; font-size: 14px; line-height: 20px; }
    .stories-patient:nth-child(1) .stories-patient__copy { min-height: 574.4px; }
    .stories-patient:nth-child(2) .stories-patient__copy { min-height: 402px; }
    .stories-patient:nth-child(3) .stories-patient__copy { min-height: 488px; }
    .stories-patient__copy h2 { margin-bottom: 18px; font-size: 16px; line-height: 22px; }
    .stories-patient__text p { margin-bottom: 18px; }
    .stories-patient__text ol,
    .stories-patient__text ul { margin-bottom: 18px; padding-left: 22px; }
    .stories-patient:nth-child(3) { padding-bottom: 31px; }
    .stories-patient__media { aspect-ratio: 327 / 182; }

    .stories-treatment .treatment-heading { margin-bottom: 30px; }
    .stories-offers .offers-section { padding-top: 60px; }
    .stories-doctors .about-doctors { padding-top: 64px; }
}

@media (min-width: 960px) {
    .stories-patient:nth-child(3) {
        min-height: clamp(462px, calc(505px - (100vw - 960px) * .04479), 505px);
    }
}
