/**
 * Стили для модуля "Похожие работы"
 * В стиле каталога работ DiplomBase
 */

/* Контейнер похожих работ */
.related-works-section {
    margin: 50px 0;
    padding: 40px 0;
    border-top: 2px solid #e5e7eb;
}

.related-works-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #111827;
    text-align: left;
}

/* Сетка работ (как в каталоге) */
.related-works-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

/* Варианты колонок */
.related-works-col-1 {
    grid-template-columns: 1fr;
}

.related-works-col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.related-works-col-3 {
    grid-template-columns: repeat(3, 1fr);
}

.related-works-col-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Карточка работы (стиль из каталога) */
.related-work-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.related-work-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Миниатюра работы */
.related-work-thumbnail {
    width: 100%;
    margin-bottom: 15px;
    text-align: center;
}

.related-work-thumbnail a {
    display: inline-block;
}

.related-work-thumbnail img {
    width: 218px;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin: 0 auto;
}

/* Контент карточки */
.related-work-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Заголовок работы */
.related-work-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.related-work-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-work-title a:hover {
    color: #2563eb;
}

/* Метаданные (стиль из каталога) */
.related-work-meta {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 15px;
    line-height: 1.8;
    flex-grow: 1;
    text-align: left;
}

.related-work-meta strong {
    color: #374151;
    font-weight: 600;
}

/* Эмодзи иконки */
.work-type-icon,
.subject-icon {
    font-style: normal;
    margin-right: 3px;
}

/* Бейджи для типа и предмета */
.work-type,
.work-subject {
    display: inline-block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 3px;
}

/* Кнопка "Подробнее" (стиль из каталога) */
/* Убираем подчеркивание для ссылок в похожих работах */
.related-works-section a {
    text-decoration: none !important;
}

.related-work-link {
    display: inline-block;
    padding: 8px 16px;
    background: #2563eb;
    color: #fff !important;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s ease;
    margin-top: auto;
    text-decoration: none !important;
}

/* Также для заголовков */
.related-work-title a {
    color: #111827;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.related-work-title a:hover {
    color: #2563eb;
    text-decoration: none !important;
}

.related-work-link:hover {
    background: #1d4ed8;
    color: #fff !important;
}

/* Адаптивность */

/* Мобильная версия */
@media (max-width: 768px) {
    .related-works-section {
        margin: 30px 0;
        padding: 30px 0;
    }
    
    .related-works-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    /* Все варианты в одну колонку на мобильных */
    .related-works-col-1,
    .related-works-col-2,
    .related-works-col-3,
    .related-works-col-4 {
        grid-template-columns: 1fr;
    }
    
    .related-works-grid {
        gap: 15px;
    }
    
    .related-work-thumbnail img {
        width: 218px;
        height: 200px;
    }
    
    .related-work-content {
        padding: 0;
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .related-works-col-3,
    .related-works-col-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-work-thumbnail img {
        width: 218px;
        height: 200px;
    }
}

/* Десктоп - большие экраны */
@media (min-width: 1025px) {
    .related-work-thumbnail img {
        width: 218px;
        height: 200px;
    }
}

/* Состояние загрузки (опционально) */
.related-works-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

/* Нет результатов */
.related-works-empty {
    text-align: center;
    padding: 40px;
    background: #f8fafc;
    border-radius: 8px;
    color: #6b7280;
}