.content-wrapper {
    max-width: 1400px;
    margin: 50px auto;
    padding: 0 15px;
}

.page-title {
    text-align: center;
    font-size: 38px;
    color: #0080cc;
    margin-top: 140px;
    margin-bottom: 40px;
    font-weight: 700;
}

.specialists {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    justify-items: center;
}

.specialist-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    width: 95%;
    height: 380px;
    display: flex;
    align-items: flex-end;
    margin-bottom: 15px;
    text-decoration: none;
    color: inherit;
    display: block;
}

.specialist-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.3s ease; /* Добавляем плавный переход */
}

.margin_top {
    margin-bottom: 50px;
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    padding: 10px;
    text-align: left;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.overlay-more {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    color: #a8d8f8;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.specialist-card:hover img {
    transform: scale(1.1); /* Увеличиваем изображение на 10% */
}

.specialist-card:hover .overlay {
    opacity: 1; /* Можно оставить без изменений */
}

.overlay h3 {
    margin: 0;
    font-size: 18px;
}

.overlay p {
    margin: 5px 0 0;
    font-size: 14px;
}

.divider {
    border: none;
    border-top: 1px solid #b3b0b0;
    opacity: 0.3;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 36px;
    }
}

@media (max-width: 1200px) {
    .specialists {
        grid-template-columns: repeat(3, 1fr); /* На средних экранах 3 карточки */
    }
}

@media (max-width: 900px) {
    .specialists {
        grid-template-columns: repeat(2, 1fr); /* На планшетах 2 карточки */
    }
}

@media (max-width: 600px) {
    .specialists {
        grid-template-columns: 1fr; /* На мобильных 1 карточка */
    }
}