/**
 * Specialists Section Styles
 * Секция "Специалисты нашей клиники"
 * BEM Methodology + Figma Design
 */

/* Specialists Section - Swiper.js Implementation */
.specialists {
    padding: 80px 0;
    position: relative;
    margin-bottom: 0 !important;
    /* Нужен небольшой внутренний "запас" для теней,
       при этом за пределами viewport слайды должны быть скрыты. */
    --specialists-viewport-pad: 16px;
}

.specialists__container {
    display: flex;
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    flex-direction: column;
    gap: 60px;
    align-items: center;
}

.specialists__container .specialists__slider-container .specialists__slider.swiper {
    padding: 16px 0;
}

/* Header Section */
.specialists__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    /* width: 100%; */
}

.specialists__header-cell {
    display: flex;
    align-items: center;
}

.specialists__header-cell--left,
.specialists__header-cell--right {
    flex: 0 0 50px;
    justify-content: center;
}

.specialists__header-cell--center {
    flex: 1 1 auto;
    justify-content: center;
}

.specialists__title {
    margin: 0;
    color: var(--berloga-text);
    text-align: center;
}

/* Swiper Container */
.specialists__slider-container {
    position: relative;
    margin: 0 auto;
    max-width: 1320px;
    width: 100%;
}

.specialists__slider-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
}

.specialists__viewport {
    width: 100%;
    max-width: 1320px;
    /* margin: 0 auto; */
    overflow: hidden;
    padding-left: var(--specialists-viewport-pad);
    padding-right: var(--specialists-viewport-pad);
    box-sizing: border-box;
}

.specialists__slider {
    overflow: visible;
    padding: 24px 0;
}

.swiper-wrapper {
    align-items: stretch;
}

/* Фиксированная ширина слайда в блоке специалистов */
.specialists .specialists__slider .swiper-slide {
    width: 200px;
    flex: 0 0 200px;
    height: auto;
    display: flex !important;
    justify-content: center;
}

/* Specialist Card */
.specialists__card {
    display: flex;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    width: 200px;
    height: 336px;
    transition: transform 0.3s ease;
}

.specialists__card:hover {
    transform: translateY(-10px);
}

.specialist-card {
    background: var(--berloga-white);
    border-radius: 100px;
    width: 200px;
    height: 336px;
    box-shadow: var(--ten-kartochki-box-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    gap: 32px;
    padding: 0;
    transition: box-shadow 0.3s ease;
}

.specialist-card:hover {
    box-shadow: 0px 10px 20px 0px rgba(19, 19, 19, 0.15);
}

/* Photo Section */
.specialist-card-photo {
    width: 200px;
    height: 200px;
    border-radius: 100px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.specialist-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.specialists__card:hover .specialist-card-img {
    transform: scale(1.05);
}

/* Online badge */
.specialist-card-online {
    position: absolute;
    top: 8px;
    right: 0;
    display: flex;
    align-items: center;
    padding: 1px 8px;
    background: var(--berloga-magenta);
    border-radius: 6.535px;
    box-shadow: 2px 2px 3px 0px var(--berloga-magenta-10);
    z-index: 3;
    transform-origin: center;
}

.specialist-card-online__text {
    font-family: var(--regular-text-font-family);
    font-weight: 600;
    font-size: 8px;
    line-height: 1;
    color: var(--berloga-white);
    white-space: nowrap;
}

@keyframes specialist-card-online-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }

    100% {
        transform: scale(1);
    }
}

.specialists__card:hover .specialist-card-online {
    animation: specialist-card-online-pulse 0.9s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .specialists__card:hover .specialist-card-online {
        animation: none;
    }
}

/* Middle element: arrow icon / certificates badge */
.specialist-card-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) rotate(-30deg);
    z-index: 2;
    transition: all 0.3s ease;
    pointer-events: none;
}

.specialist-card-icon__svg {
    display: block;
    width: 54px;
    height: 54px;
    transition: transform 0.3s ease;
}

.specialists__card:hover .specialist-card-icon__svg {
    transform: scale(1.02);
}

/* Content Section */
.specialist-card-content {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.specialist-card-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
    margin: 0;

}

/* Сброс внешних марджинов для h3 внутри имени карточки (убираем добавку заголовка) */
.specialist-card-name h3 {
    margin: 0;
    padding: 0;
}

/* Фамилия (первая строка) */
.specialist-card-surname {
    font-family: var(--regular-text-font-family);
    font-weight: 600;
    font-size: 12px;
    line-height: 1.2;
}

/* Имя и отчество (вторая строка) */
.specialist-card-fullname {
    font-family: var(--regular-text-font-family);
    font-weight: 600;
    font-size: 12px;
    line-height: 1.2;
}

.specialists__card .specialist-card-content .specialist-card-speciality {
    margin: 0;
    font-family: var(--regular-text-font-family);
    font-weight: 400;
    font-size: 8px;
    line-height: 1.2;
    color: rgba(0, 0, 0, 0.5);
}

/* CTA text */
.specialist-card-cta {
    font-family: var(--regular-text-font-family);
    font-weight: 400;
    font-size: 12px;
    line-height: 1.2;
    color: var(--berloga-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Certificates badge */
.specialist-card-certificate {
    position: absolute;
    top: 192px;
    left: 50%;
    transform: translateX(-50%);
    width: 96px;
    height: 16px;
    background: var(--berloga-blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    z-index: 2;
    pointer-events: none;
}

.specialist-card-certificate__text {
    font-family: var(--regular-text-font-family);
    font-weight: 700;
    font-size: 8px;
    line-height: 1;
    color: var(--berloga-white);
    white-space: nowrap;
}

.specialist-card-certificate__icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--berloga-white);
    position: relative;
    flex-shrink: 0;
}

.specialist-card-certificate__icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border-right: 2px solid var(--berloga-blue);
    border-top: 2px solid var(--berloga-blue);
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Swiper Navigation */
.specialists__nav {
    width: 16px;
    height: 29px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    color: var(--berloga-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.specialists__nav-icon {
    display: block;
    width: 16px;
    height: 29px;
}

.specialists__nav:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.specialists__nav:focus-visible {
    outline: 2px solid var(--berloga-blue);
    outline-offset: 3px;
}

.specialists__nav--prev-side,
.specialists__nav--next-side {
    display: none;
}

.specialists__nav--prev-header,
.specialists__nav--next-header {
    display: inline-flex;
}

/* В режиме ≤3 карточек в заголовке стрелки скрываем, но место под них сохраняем */
.specialists--side-nav .specialists__nav--prev-header,
.specialists--side-nav .specialists__nav--next-header {
    visibility: hidden;
    pointer-events: none;
}

.specialists--side-nav .specialists__nav--prev-side,
.specialists--side-nav .specialists__nav--next-side {
    display: inline-flex;
}

/* В режиме side-nav стрелки должны отстоять от карточек на 24px.
   Так как у viewport есть внутренний pad под тени, уменьшаем gap контейнера. */
.specialists--side-nav .specialists__slider-row {
    gap: calc(24px - var(--specialists-viewport-pad));
}

/* Empty State */
.specialists__empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--berloga-text);
}





@media (max-width: 768px) {
    .specialists {
        padding: 60px 0;
    }

    /* .specialists__container {
        padding: 0 20px;
    } */

    .specialists__header-cell--left,
    .specialists__header-cell--right {
        flex-basis: 40px;
    }

    /* На мобилке размеры шевронов такие же как в макете */
}

@media (max-width: 480px) {
    .specialists__container {
        gap: 40px;
    }
}