/* ============================================================
 * pm-front.css v1.0 — визуальный слой ГЛАВНОЙ (тема v11.0).
 *
 * Подключается только на главной, после pm-hero.css.
 * Содержит:
 *   1) фирменную деталь — градиентная черта под H2 секций;
 *   2) полировку карточек (услуги, врачи, отзывы, лицензии, блог);
 *   3) этапы лечения — акцентные номера;
 *   4) стили галереи «Клиника изнутри» + лайтбокс
 *      (перенесены из инлайна front-page.php);
 *   5) сайдбар-CTA блока цен (перенесён из инлайна);
 *   6) липкую мобильную панель .pm-fab (звонок + заявка).
 *
 * Только аддитивные правила: цвета/шрифты базовой темы не трогаем.
 * ============================================================ */

/* ── 1. Сигнатура: градиентная черта под заголовками секций ── */
.home .services__title,
.home .prices__title,
.home .team__title,
.home .stages__title,
.home .rooms__title,
.home .about-numbers__title,
.home .video__title,
.home .licenses__title,
.home .pm-meds__title,
.home .pm-gallery__title,
.home .front-text__title,
.home .advantages__title {
    position: relative;
    padding-bottom: 14px !important;
}
.home .services__title::after,
.home .prices__title::after,
.home .team__title::after,
.home .stages__title::after,
.home .rooms__title::after,
.home .about-numbers__title::after,
.home .video__title::after,
.home .licenses__title::after,
.home .pm-meds__title::after,
.home .pm-gallery__title::after,
.home .front-text__title::after,
.home .advantages__title::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 46px; height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, #1e87fa 0%, #102e5d 100%);
}
/* Центрированные заголовки — черта по центру */
.home .pm-gallery__title::after,
.home .about-numbers__title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ── 2. Карточки услуг ── */
.home .services__item {
    border-radius: 16px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.home .services__item:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(16, 46, 93, .12);
}
.home .services__sub-item a {
    transition: color .15s ease;
}
.home .services__sub-item a:hover { color: #1e87fa; }

/* ── Врачи ── */
.home .team__slide {
    border-radius: 16px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.home .team__slide:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(16, 46, 93, .12);
}
.home .team__img-box { overflow: hidden; border-radius: 14px; }
.home .team__img-box img { transition: transform .35s ease; }
.home .team__slide:hover .team__img-box img { transform: scale(1.04); }

/* ── Отзывы ── */
.home .intro__card {
    border: 1px solid #e6edf7;
    border-radius: 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.home .intro__card:hover {
    border-color: #b8d8f8;
    box-shadow: 0 10px 28px rgba(30, 135, 250, .10);
}

/* ── Лицензии ── */
.home .licenses__item {
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.home .licenses__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(16, 46, 93, .14);
}

/* ── Блог ── */
.home .blog__list-item-image { overflow: hidden; border-radius: 12px; }
.home .blog__list-item-image img { transition: transform .35s ease; }
.home .blog__list-item:hover .blog__list-item-image img { transform: scale(1.05); }
.home .blog__list-item-title { transition: color .15s ease; }
.home .blog__list-item:hover .blog__list-item-title { color: #1e87fa; }

/* ── 3. Этапы лечения: акцентные номера ── */
.home .stages__number {
    background: linear-gradient(150deg, #1e87fa 0%, #1a5fb0 100%) !important;
    color: #fff !important;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(30, 135, 250, .30);
    font-weight: 700;
}
.home .stages__item {
    border-radius: 16px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.home .stages__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(16, 46, 93, .08);
}

/* ── Цифры «О нас» ── */
.home .about-numbers__item {
    transition: transform .2s ease, box-shadow .2s ease;
    border-radius: 16px;
}
.home .about-numbers__item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(16, 46, 93, .10);
}

/* ── 4. Галерея «Клиника изнутри» + лайтбокс (из инлайна) ── */
.pm-gallery__container { display: block; }
.pm-gallery__head { text-align: center; margin-bottom: 32px; }
.pm-gallery__title {
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700; color: #102e5d;
    margin: 0 0 10px;
}
.pm-gallery__sub { font-size: 16px; color: #5b6b86; margin: 0; }

.pm-gallery { padding: 56px 0; }
.pm-gallery__team {
    display: block; position: relative;
    border-radius: 18px; overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 10px 30px rgba(16,46,93,.12);
    text-decoration: none;
    aspect-ratio: 3/2; max-height: 520px;
}
.pm-gallery__team img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.pm-gallery__team:hover img { transform: scale(1.03); }
.pm-gallery__caption--center { text-align: center; font-size: 16px; padding: 30px 18px 18px; }
.pm-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.pm-gallery__item {
    position: relative; display: block;
    border-radius: 16px; overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 6px 20px rgba(16,46,93,.08);
    text-decoration: none;
}
.pm-gallery__item--wide { grid-column: span 2; aspect-ratio: 8/3; }
.pm-gallery__item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .35s ease;
}
.pm-gallery__item:hover img { transform: scale(1.05); }
.pm-gallery__caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 22px 18px 14px;
    background: linear-gradient(180deg, transparent, rgba(16,46,93,.82));
    color: #fff; font-size: 14.5px; font-weight: 600;
    font-family: 'Inter', sans-serif;
}
.pm-lightbox{position:fixed;inset:0;z-index:99999;background:rgba(10,22,44,.92);display:flex;align-items:center;justify-content:center}
.pm-lightbox[hidden]{display:none}
.pm-lightbox__img{max-width:92vw;max-height:88vh;object-fit:contain;border-radius:6px;box-shadow:0 20px 60px rgba(0,0,0,.5);background:#fff}
.pm-lightbox__close{position:absolute;top:18px;right:24px;width:44px;height:44px;font-size:34px;line-height:1;color:#fff;background:rgba(255,255,255,.12);border:none;border-radius:50%;cursor:pointer}
.pm-lightbox__close:hover{background:rgba(255,255,255,.25)}
.pm-lightbox__nav{position:absolute;top:50%;transform:translateY(-50%);width:52px;height:52px;font-size:36px;line-height:1;color:#fff;background:rgba(255,255,255,.12);border:none;border-radius:50%;cursor:pointer}
.pm-lightbox__nav:hover{background:rgba(255,255,255,.25)}
.pm-lightbox__prev{left:20px}.pm-lightbox__next{right:20px}
.pm-lightbox__counter{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);color:#fff;font-size:14px;font-family:Inter,sans-serif;background:rgba(0,0,0,.35);padding:5px 14px;border-radius:999px}
@media(max-width:768px){
    .pm-gallery__grid{grid-template-columns:repeat(2,1fr);gap:10px;}
    .pm-gallery__item--wide{grid-column:span 2;aspect-ratio:16/9;}
    .pm-lightbox__nav{width:42px;height:42px;font-size:28px}.pm-lightbox__prev{left:6px}.pm-lightbox__next{right:6px}
}

/* ── 5. Сайдбар-CTA блока цен (из инлайна) ── */
.pm-prices-cta {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: linear-gradient(160deg, #1e5fa8 0%, #1e87fa 100%);
    border-radius: 20px;
    padding: 28px 24px;
    color: #fff;
    box-shadow: 0 12px 32px rgba(30, 95, 168, .28);
}
.pm-prices-cta__label {
    font-size: 13px; font-weight: 600;
    letter-spacing: .5px; text-transform: uppercase;
    opacity: .7; margin-bottom: 8px;
}
.pm-prices-cta__phone {
    display: block;
    font-size: 26px; font-weight: 700;
    color: #fff; text-decoration: none;
    margin-bottom: 20px; line-height: 1.2;
    transition: opacity .15s ease;
}
.pm-prices-cta__phone:hover { opacity: .85; color: #fff; }
.pm-prices-cta__feats {
    display: flex; flex-direction: column;
    gap: 10px; margin-bottom: 24px; flex: 1;
}
.pm-prices-cta__feat { display: flex; align-items: center; gap: 10px; }
.pm-prices-cta__feat-ico {
    width: 28px; height: 28px; flex-shrink: 0;
    background: rgba(255, 255, 255, .15);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.pm-prices-cta__feat-txt { font-size: 14px; font-weight: 500; opacity: .9; }
.pm-prices-cta__btn {
    width: 100%; padding: 14px;
    border: none; cursor: pointer;
    background: #fff; color: #1e5fa8;
    font-size: 15px; font-weight: 700;
    border-radius: 12px;
    transition: transform .12s ease, box-shadow .15s ease;
}
.pm-prices-cta__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
}
.pm-prices-cta__btn:active { transform: translateY(0); }

/* ── 6. Липкая мобильная панель: звонок + заявка ── */
.pm-fab { display: none; }
@media (max-width: 767px) {
    .pm-fab {
        position: fixed;
        left: 10px; right: 10px; bottom: 10px;
        z-index: 9900;
        display: flex;
        gap: 8px;
        padding: 8px;
        background: rgba(255, 255, 255, .92);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid #e6edf7;
        border-radius: 16px;
        box-shadow: 0 8px 30px rgba(16, 46, 93, .18);
    }
    .pm-fab__call,
    .pm-fab__req {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 46px;
        border-radius: 11px;
        font-family: 'Inter', -apple-system, sans-serif;
        font-size: 14px;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
        white-space: nowrap;
    }
    .pm-fab__call {
        background: #eef5fd;
        color: #1263c0;
        border: 1px solid #b8d8f8;
    }
    .pm-fab__req {
        background: #1e87fa;
        color: #fff;
        border: none;
        box-shadow: 0 4px 14px rgba(30, 135, 250, .35);
    }
    .pm-fab__req:active { background: #1772d8; }
    /* сдвигаем виджет Б24 и кнопку «наверх», чтобы не перекрывали панель */
    body:has(.pm-fab) .b24-widget-button-wrapper { bottom: 84px !important; }
    body:has(.pm-fab) .scroll-up-button { bottom: 84px !important; }
}

/* ── Доступность / движение ── */
@media (prefers-reduced-motion: reduce) {
    .home .services__item,
    .home .team__slide,
    .home .team__img-box img,
    .home .intro__card,
    .home .licenses__item,
    .home .blog__list-item-image img,
    .home .stages__item,
    .home .about-numbers__item,
    .pm-prices-cta__btn,
    .pm-gallery__team img,
    .pm-gallery__item img {
        transition: none !important;
        transform: none !important;
    }
}
