/* === Поп-ап эксперта === */
.expert-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.expert-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.expert-modal {
    position: relative;
    background: #fff;
    border-radius: 24px;
    border: 1px solid #111;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 48px 32px 32px;
}

.expert-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    color: #111;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expert-modal__close:hover,
.expert-modal__close:focus-visible {
    background-color: #f3f3f3;
    color: #000;
}

.expert-modal__close:focus-visible {
    outline: 2px dashed #c1ff5f;
    outline-offset: 2px;
}

.expert-modal__top {
    display: flex;
    gap: 24px;
    margin-bottom: 28px;
}

.expert-modal__photo-wrap {
    flex-shrink: 0;
}

.expert-modal__photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.expert-modal__content {
    flex: 1;
    min-width: 0;
}

.expert-modal__name {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.3;
    color: #000;
}

.expert-modal__text {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #000;
    text-align: start;
    white-space: pre-line;
}

/* Мобильная версия поп-апа */
@media (max-width: 767px) {
    .expert-modal {
        padding: 24px 44px 24px 20px;
        max-height: 85vh;
    }

    .expert-modal__close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .expert-modal__top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 20px;
    }

    .expert-modal__photo {
        width: 120px;
        height: 120px;
    }

    .expert-modal__name {
        font-size: 20px;
    }

    .expert-modal__text {
        font-size: 15px;
        text-align: left;
    }
}
