﻿/* ==========================================
ОСНОВНЫЕ СТИЛИ (КАНДИДАТЫ НОД)
========================================== */

/* Контейнер списка */
.rcm-candidates-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Карточка кандидата: фото слева, текст справа */
.rcm-candidate-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: #ffffff !important;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.rcm-candidate-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* Фото: строго 120×120, обрезка по центру */
.rcm-candidate-photo {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    background: #f0f2f5;
}

.rcm-candidate-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Контент: ФИО + описание */
.rcm-candidate-content {
    flex: 1;
    min-width: 0;
}

/* ФИО как ссылка */
.rcm-candidate-name {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    color: #112644 !important;
    text-decoration: none !important;
}

.rcm-candidate-name a {
    color: #112644 !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.rcm-candidate-name a:hover {
    color: #005a87 !important;
    text-decoration: none !important;
}

/* Описание: ссылки в тексте */
.rcm-candidate-desc {
    margin: 0;
    color: #444444 !important;
    font-size: 15px;
    line-height: 1.6;
}

.rcm-candidate-desc a {
    color: #0073aa !important;
    text-decoration: none;
    word-break: break-all;
}

.rcm-candidate-desc a:hover {
    color: #005177;
}

/* Адаптив: на мобильных фото сверху */
@media (max-width: 600px) {
    .rcm-candidate-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .rcm-candidate-photo {
        margin: 0 auto 12px;
    }
}

/* Пустое состояние и заглушки */
#rcm-candidates-container {
    max-width: 1200px;
    margin: 10px auto;
    min-height: 20px;
}

.rcm-placeholder {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

.rcm-empty-msg {
    text-align: center;
    color: #d63638;
    font-weight: 600;
    padding: 30px;
    background: #fcf0f1;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
}

/* Селект региона */
#rcm-selector-wrapper {
    max-width: 1200px;
    margin: 20px auto;
}

.rcm-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #0073aa;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.rcm-select:focus {
    outline: none;
    border-color: #005177;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.15);
}

/* Выделение участников СВО */
.rcm-candidate-card.svo-participant {
    border: 2px solid #993300 !important;
    background: linear-gradient(135deg, #fff9f6 0%, #ffffff 100%) !important;
}

.rcm-candidate-card.svo-participant .rcm-candidate-name a {
    color: #993300 !important;
}

/* ==========================================
СТИЛИ ДЛЯ КАНДИДАТОВ СВО (ИСПРАВЛЕНО)
========================================== */

#rcm-svo-container {
    max-width: 1200px;
    margin: 10px auto;
    min-height: 20px;
}

#rcm-svo-container .rcm-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Карточка СВО */
#rcm-svo-container .rcm-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: #ffffff !important;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

#rcm-svo-container .rcm-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* Фото СВО - круглое 120x120 */
#rcm-svo-container .rcm-card .rcm-img {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f2f5;
    display: block;
}

/* Текстовый блок справа от фото */
#rcm-svo-container .rcm-card .rcm-card-text {
    flex: 1;
    min-width: 0; /* Важно для переноса длинных слов */
}

/* ФИО СВО */
#rcm-svo-container .rcm-card .rcm-card-text h3 {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    color: #112644 !important;
}

/* Описание СВО */
#rcm-svo-container .rcm-card .rcm-card-text .rcm-content {
    color: #444444 !important;
    font-size: 15px;
    line-height: 1.6;
}

#rcm-svo-container .rcm-card .rcm-card-text .rcm-content a {
    color: #0073aa !important;
    text-decoration: none;
    word-break: break-word;
}

#rcm-svo-container .rcm-card .rcm-card-text .rcm-content a:hover {
    color: #005177;
    text-decoration: none;
}

/* Бейдж "Активист НОД" */
#rcm-svo-container .rcm-badge-nod {
    color: #b71c1c !important;
    font-weight: bold !important;
    display: inline-block;
    margin-bottom: 8px;
    font-size: 14px;
    background: #fce4ec;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Селектор региона СВО */
#rcm-svo-wrapper {
    max-width: 1200px;
    margin: 20px auto;
}

/* Адаптив для мобильных */
@media (max-width: 600px) {
    #rcm-svo-container .rcm-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    #rcm-svo-container .rcm-card .rcm-img {
        margin: 0 auto 12px;
    }
}

/* ==========================================
ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ССЫЛОК И ТЕКСТА
========================================== */

/* Ссылка на фото */
.rcm-photo-link,
.rcm-candidate-photo {
    display: block;
    text-decoration: none !important;
}

.rcm-photo-link:hover,
.rcm-candidate-photo:hover {
    opacity: 0.9;
}

/* Ссылка на заголовок */
.rcm-card-title,
.rcm-candidate-name {
    text-decoration: none !important;
    color: inherit;
}

/* Короткое описание */
.rcm-short-desc {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

/* Полное описание (если нужно будет показывать) */
.rcm-full-desc {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}
/* Короткое описание в списке */
.rcm-short-desc {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #444444 !important;
}

/* Ссылка на фото */
.rcm-photo-link {
    display: block;
    text-decoration: none !important;
}

.rcm-photo-link:hover {
    opacity: 0.9;
}

/* Ссылка на заголовок */
.rcm-card-title {
    text-decoration: none !important;
    color: inherit;
}

/* ==========================================
ССЫЛКА НА ПРОФИЛЬ ER.RU
========================================== */
.rcm-er-link-container {
    margin: 0 0 12px 0;
}

.rcm-er-profile {
    display: inline-block;
    color: #0073aa !important;
    font-size: 14px;
    text-decoration: none !important;
    padding: 4px 12px;
    background: #f0f8ff;
    border-radius: 4px;
    border: 1px solid #b3d9ff;
    transition: all 0.2s;
}

.rcm-er-profile:hover {
    background: #e6f3ff;
    border-color: #0073aa;
    text-decoration: none !important;
}



/* ==========================================
СТРАНИЦЫ ОДИНОЧНЫХ КАНДИДАТОВ
========================================== */

/* Уменьшаем и выравниваем фото на странице кандидата */
.single-candidate .wp-post-image,
.single-candidate_svo .wp-post-image,
.single-candidate .wp-block-post-featured-image img,
.single-candidate_svo .wp-block-post-featured-image img {
    width: 200px !important;
    height: 200px !important;
    max-width: 200px !important;
    object-fit: cover;
    border-radius: 50%;
    float: left;
    margin: 0 30px 20px 0 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Очищаем float после контента */
.single-candidate .entry-content::after,
.single-candidate_svo .entry-content::after {
    content: "";
    display: table;
    clear: both;
}

/* Стили для контента на странице кандидата */
.single-candidate .entry-content,
.single-candidate_svo .entry-content {
    overflow: hidden;
}

.single-candidate .entry-content p,
.single-candidate_svo .entry-content p {
    margin-bottom: 15px;
    line-height: 1.7;
}

/* Адаптив для мобильных устройств */
@media (max-width: 768px) {
    .single-candidate .wp-post-image,
    .single-candidate_svo .wp-post-image,
    .single-candidate .wp-block-post-featured-image img,
    .single-candidate_svo .wp-block-post-featured-image img {
        float: none !important;
        display: block;
        margin: 0 auto 20px auto !important;
        width: 150px !important;
        height: 150px !important;
        max-width: 150px !important;
    }
}