/* Site updates — редакция июль 2026 */

.messenger-widget {
    position: fixed;
    right: max(12px, calc((100% - 1340px) / 2 - 100px));
    bottom: 20px;
    z-index: 9999;
    font-family: inherit;
}

.messenger-widget__toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: #2f6f4f;
    color: #fff;
    box-shadow: 0 8px 24px rgba(47, 111, 79, 0.35);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    animation: messenger-float 3s ease-in-out infinite;
}

.messenger-widget__toggle:hover,
.messenger-widget.is-hovered .messenger-widget__toggle {
    animation: none;
    transform: scale(1.08);
    background: #3a8560;
    box-shadow: 0 12px 28px rgba(47, 111, 79, 0.45);
}

.messenger-widget__toggle:active {
    transform: scale(0.96);
}

.messenger-widget__pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(47, 111, 79, 0.45);
    animation: messenger-pulse 2.4s ease-out infinite;
    pointer-events: none;
}

.messenger-widget__icon {
    position: relative;
    z-index: 1;
    display: block;
    transition: transform 0.3s ease;
}

.messenger-widget.is-open .messenger-widget__icon,
.messenger-widget.is-hovered .messenger-widget__icon {
    transform: rotate(-8deg) scale(1.05);
}

.messenger-widget__badge {
    position: absolute;
    top: -2px;
    right: -2px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 10px;
    background: #e85d4c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    animation: messenger-badge-pop 0.5s ease 1.2s both;
}

.messenger-widget__hint {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    padding: 8px 14px;
    border-radius: 10px;
    background: #fff;
    color: #222;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.messenger-widget__hint::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #fff;
}

.messenger-widget.is-hovered .messenger-widget__hint,
.messenger-widget.is-attention .messenger-widget__hint {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.messenger-widget.is-open .messenger-widget__pulse,
.messenger-widget.is-open .messenger-widget__toggle {
    animation: none;
}

.messenger-widget.is-open .messenger-widget__badge {
    display: none;
}

.messenger-widget__panel {
    position: absolute;
    right: 0;
    bottom: 68px;
    min-width: 220px;
    padding: 12px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}

.messenger-widget.is-open .messenger-widget__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

@keyframes messenger-pulse {
    0% {
        transform: scale(1);
        opacity: 0.55;
    }
    70% {
        transform: scale(1.55);
        opacity: 0;
    }
    100% {
        transform: scale(1.55);
        opacity: 0;
    }
}

@keyframes messenger-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes messenger-badge-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    70% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .messenger-widget__toggle,
    .messenger-widget__pulse,
    .messenger-widget__badge {
        animation: none;
    }

    .messenger-widget__panel {
        transition: none;
    }
}

.messenger-widget__title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.messenger-widget__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    background: #f5f5f5;
    color: #222;
    text-decoration: none;
    font-size: 14px;
}

.messenger-widget__link:hover {
    background: #ececec;
}

.short-prices {
    margin-top: 48px;
}

.short-prices__title {
    margin-bottom: 24px;
}

.short-prices__section {
    margin-bottom: 24px;
}

.short-prices__section-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.short-prices__list {
    margin: 0;
    padding-left: 18px;
}

.short-prices__item {
    margin-bottom: 6px;
    line-height: 1.45;
}

.short-prices__note {
    margin-top: 16px;
    font-size: 14px;
    color: #666;
}

.page-prices .about__content {
    align-items: flex-start;
}

.page-prices .about__left {
    max-width: 100%;
}

/* Таблица цен на страницах услуг: отступ между названием и ценой */
.page-price__line {
    column-gap: 40px;
}

@media (max-width: 867px) {
    .page-price__line {
        column-gap: 28px;
    }
}

@media (max-width: 640px) {
    .page-price__line {
        column-gap: 20px;
    }
}

.promotion-page__hero {
    margin-bottom: 32px;
}

.promotion-page__card {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
}

.promotion-page__card--featured {
    border-color: #c8a96a;
    background: #fffdf8;
}

.promotion-page__badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #2f6f4f;
    color: #fff;
    font-size: 12px;
}

.promotion-page__subtitle {
    margin: 8px 0 12px;
    font-size: 22px;
    font-weight: 600;
    color: #2f6f4f;
}

.promotion-page__phones {
    margin-top: 12px;
    font-weight: 600;
}

.promotion-page__note {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.promotion-page__image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.promotion-page__content .promotion__text {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.35;
    font-weight: 600;
    color: #404040;
    text-transform: none;
}

.promotion-page__content .promotion__callback {
    margin-top: 20px;
}

.promotion-page__btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: fit-content;
    max-width: 100%;
    padding: 14px 24px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .promotion-page__btn {
        width: 100%;
        white-space: normal;
    }
}

@media (max-width: 1050px) {
    .header__bottom .header-menu-pc ul li:nth-child(4),
    .header__bottom .header-menu-pc ul li:nth-child(5),
    .header__bottom .header-menu-pc ul li:nth-child(6),
    .header__bottom .header-menu-pc ul li:nth-child(7),
    .header__bottom .header-menu-pc ul li:nth-child(8) {
        grid-column: auto / span 2;
    }
}

.promotion-page__all-link {
    display: inline-flex;
    margin-top: 16px;
}

.single-specialist__bio {
    margin-top: 12px;
    line-height: 1.55;
}

.single-specialist__prodoctorov {
    margin-top: 24px;
}

.clinic-gallery {
    margin-top: 40px;
}

.clinic-gallery__title {
    margin-bottom: 20px;
}

.clinic-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.clinic-gallery__item {
    overflow: hidden;
    border-radius: 10px;
    background: #f3f3f3;
}

.clinic-gallery__item img,
.clinic-gallery__item video {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.before-after-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.before-after-grid__item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Doctor cases — до/после на странице врача */
.specialist-cases {
    margin-top: 48px;
    padding: 0;
}

.specialist-cases__hint {
    margin: -8px 0 20px;
    color: var(--color-grey, #6b6b6b);
    font-size: 14px;
    text-align: right;
}

.specialist-cases__grid {
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 900px) {
    .specialist-cases__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .specialist-cases[data-cases-count="1"] .specialist-cases__grid,
    .specialist-cases[data-cases-count="2"] .specialist-cases__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 980px;
        margin-inline: auto;
    }
}

.specialist-cases__card {
    height: 100%;
    gap: 14px;
}

.specialist-cases__caption {
    font-weight: 500;
    line-height: 1.45;
    margin: 0;
}

.specialist-cases__slider {
    display: none;
}

@media (max-width: 899px) {
    .specialist-cases__grid {
        display: none;
    }

    .specialist-cases__slider {
        display: block;
    }

    .specialist-cases__slider .before-after__slider-arrows {
        display: flex;
    }

    .specialist-cases__hint {
        text-align: left;
        margin-bottom: 16px;
    }
}

/* Interactive before/after compare */
.ba-compare {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 10;
    background: #1a1a1a;
    user-select: none;
    touch-action: none;
    cursor: ew-resize;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.ba-compare__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ba-compare__img--after {
    position: absolute;
    inset: 0;
}

.ba-compare__before {
    position: absolute;
    inset: 0;
    z-index: 1;
    clip-path: inset(0 calc(100% - var(--ba-pos, 52%)) 0 0);
}

.ba-compare__img--before {
    position: absolute;
    inset: 0;
}

.ba-compare__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--ba-pos, 52%);
    z-index: 3;
    width: 2px;
    background: rgba(255, 255, 255, 0.92);
    transform: translateX(-50%);
    pointer-events: none;
}

.ba-compare__knob {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #3d3d3d;
    background: linear-gradient(180deg, #fff 0%, #f3e7d2 100%);
    border: 1px solid rgba(200, 169, 106, 0.55);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    transform: translate(-50%, -50%);
}

.ba-compare__label {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.ba-compare__label--before {
    left: 12px;
    background: rgba(40, 40, 40, 0.78);
}

.ba-compare__label--after {
    right: 12px;
    background: rgba(47, 111, 79, 0.9);
}

.ba-compare__range {
    position: absolute;
    inset: 0;
    z-index: 4;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
}

.ba-compare__zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    background: rgba(32, 32, 32, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ba-compare__zoom:hover {
    background: rgba(200, 169, 106, 0.92);
    transform: scale(1.05);
}

.ba-compare__zoom:focus-visible {
    outline: 2px solid #c8a96a;
    outline-offset: 2px;
}

.ba-compare__fancy-before {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

@media (max-width: 768px) {
    .promotion-page__card {
        grid-template-columns: 1fr;
    }

    .messenger-widget {
        bottom: 12px;
    }

    .messenger-widget__hint {
        right: auto;
        left: 50%;
        top: auto;
        bottom: calc(100% + 10px);
        transform: translateX(-50%) translateY(8px);
        white-space: normal;
        max-width: 180px;
        text-align: center;
    }

    .messenger-widget__hint::after {
        right: auto;
        left: 50%;
        top: 100%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: #fff;
        border-left-color: transparent;
    }

    .messenger-widget.is-hovered .messenger-widget__hint,
    .messenger-widget.is-attention .messenger-widget__hint {
        transform: translateX(-50%) translateY(0);
    }
}

/* Блок карты + контакты (акции, прайс) */
.contacts {
    padding: 16px 0 56px;
}

.contacts__inner {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #f5f5f5;
    box-shadow: 0 8px 32px rgba(64, 64, 64, 0.08);
}

.contacts__map {
    min-height: 420px;
    line-height: 0;
}

.contacts__map iframe,
.contacts__map > ymaps,
.contacts__map > div {
    display: block;
    width: 100% !important;
    min-height: 420px;
    border: 0;
}

.contacts__content {
    position: absolute;
    left: 28px;
    bottom: 28px;
    z-index: 2;
    width: min(100% - 56px, 360px);
    padding: 24px 28px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 12px 40px rgba(64, 64, 64, 0.14);
    backdrop-filter: blur(6px);
}

.contacts__title h3 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #888;
}

.contacts__title h4 {
    margin: 0 0 18px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
    color: #404040;
}

.contacts__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contacts__title a:hover {
    color: #c8a96a;
}

.contacts__info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.contacts__info-item:last-child {
    margin-bottom: 0;
}

.contacts__info-icon {
    flex: 0 0 24px;
    width: 24px;
    padding-top: 2px;
}

.contacts__info-icon img {
    display: block;
    width: 100%;
    height: auto;
}

.contacts__info-item p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #404040;
}

.contacts__info-item a {
    color: inherit;
    text-decoration: none;
}

.contacts__info-item a:hover {
    color: #c8a96a;
}

@media (max-width: 867px) {
    .contacts__inner {
        display: flex;
        flex-direction: column;
        border-radius: 16px;
    }

    .contacts__map {
        min-height: 280px;
    }

    .contacts__map iframe,
    .contacts__map > ymaps,
    .contacts__map > div {
        min-height: 280px;
    }

    .contacts__content {
        position: static;
        width: auto;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
    }
}

@media (max-width: 578px) {
    .contacts {
        padding-bottom: 40px;
    }

    .contacts__content {
        padding: 20px;
    }

    .contacts__title h4 {
        font-size: 22px;
    }
}

/* Hero video — все экраны */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero__video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero__poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.hero .hero__video-container .hero__video {
    width: 100%;
    height: 100%;
    max-height: none !important;
    min-height: 100%;
    object-fit: cover;
    object-position: center center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    opacity: 0;
    filter: none !important;
    transition: opacity 0.5s ease;
}

.hero .hero__video-container .hero__video.is-ready {
    opacity: 1 !important;
}

.hero__video-container.is-ready .hero__poster {
    opacity: 0;
    pointer-events: none;
}

.hero__info {
    font-size: 18px;
    max-width: 600px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.hero__info-mobile {
    display: none;
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .hero {
        height: 150vh;
    }

    .hero__title-top {
        font-size: 14px;
    }

    .hero__title-bottom {
        font-size: 32px;
    }

    .hero__info {
        display: none;
    }

    .hero__info-mobile {
        display: block;
        max-width: 100%;
    }

    .hero .container {
        align-items: center;
    }

    .hero__inner {
        padding: 20px;
        margin-top: 0;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero__title-bottom {
        font-size: 42px;
    }
}

@media (min-width: 1025px) and (max-width: 1366px) {
    .hero__title-bottom {
        font-size: 44px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 90vh;
    }

    .hero__title-bottom {
        font-size: 28px;
    }

    .hero__inner {
        padding: 15px;
    }
}
