/**
 * Стили для кастомных доработок сайта
 * Путь: assets/css/work.css
 */

.custom-persons-block {
    width: 100%;
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
    box-sizing: border-box;
}

/* Заголовок H2 */
.custom-persons-block__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-transform: uppercase; /* Если заголовки должны быть капсом */
}

/* Список карточек */
.custom-persons-block__list {
    display: flex;
    flex-direction: column;
    gap: 2rem; /* Отступ между карточками */
}

/* Сама карточка */
.custom-persons-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

/* Контейнер для фото с жестким сохранением пропорций 2:3 */
.custom-persons-card__image-wrapper {
    flex: 0 0 160px;
    width: 160px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 4px;
    background-color: #f0f0f0;
}

.custom-persons-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Чтобы фото заполняло контейнер и не искажалось */
    display: block;
}

.custom-persons-card__placeholder {
    width: 100%;
    height: 100%;
    background: #e2e2e2;
}

/* Блок с текстом справа */
.custom-persons-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.25rem;
}

/* Имя Фамилия */
.custom-persons-card__name {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    color: #031326; /* Цвет oxford из вашей темы */
}

/* Должность */
.custom-persons-card__post {
    font-size: 1rem;
    line-height: 1.5;
    color: #7A828C;
}

/* Адаптивность для мобильных экранов */
@media (max-width: 600px) {
    .custom-persons-card {
        flex-direction: column;
        gap: 1rem;
    }
    
    .custom-persons-card__image-wrapper {
        flex: 0 0 auto;
        width: 140px;
    }
    
    .custom-persons-block__title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
}

/* Сетка для вывода центров на стандартных страницах */
.page-slug-structure .centers-list,
.custom-centers-section .centers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    width: 100%;
    box-sizing: border-box;
    margin-top: 1.5rem;
}

.centers-list .center-card{
    flex: 1 1 300px;
}

.center-card__link{
    margin-bottom: 15px;
    display: block;
    font-size: 13px;
    color: #DB362A;
    -webkit-transition: .35s;
    transition: .35s;
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 992px) {
    .custom-centers-section .centers-list {

    }
}
@media (max-width: 650px) {
    .custom-centers-section .centers-list {

    }
}

/* ==========================================================================
   ФЛЕКС-СЕТКА ДЛЯ ПРИВЯЗАННЫХ НОВОСТЕЙ
   ========================================================================== */

/* Контейнер Flexbox */
.custom-center-news-flex {
    display: flex;
    flex-wrap: wrap; /* Разрешаем перенос карточек на следующий ряд */
    gap: 2rem;       /* Отступ между карточками */
    width: 100%;
    box-sizing: border-box;
}

/* Сама карточка новости */
.custom-news-flex-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04), 0 1px 4px rgba(0, 0, 0, 0.02); /* Мягкая тень */
    border: 1px solid #e1e2df; /* Легкая рамка, если тени мало (цвет green-light) */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    
    /* Управление шириной по ТЗ */
    flex: 1 1 330px;
    min-width: 300px;
    max-width: 330px;
}

/* Контейнер картинки */
.custom-news-flex-card__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.custom-news-flex-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.custom-news-flex-card:hover .custom-news-flex-card__img {
    transform: scale(1.02);
}

/* Контентная часть */
.custom-news-flex-card__content {
    padding: 1.75rem; 
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Дата публикации */
.custom-news-flex-card__date {
    font-size: 0.85rem;
    color: #7A828C;
    margin-bottom: 0.75rem;
    display: block;
}

/* Заголовок новости */
.custom-news-flex-card__title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 1rem 0;
}

.custom-news-flex-card__title a {
    color: #031326; /* oxford */
    text-decoration: none;
    transition: color 0.2s ease;
}

.custom-news-flex-card__title a:hover {
    color: #3D7F3C;
}

/* Краткое описание текста */
.custom-news-flex-card__excerpt {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #031326;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .custom-news-flex-card{
        max-width: 100%;
    }
}

/* Корректировка для мобильных */
@media (max-width: 360px) {
    .custom-news-flex-card {
        min-width: 100%;
    }
}