/* ========================================
   HADITH ULUM AL-HADITH
   ======================================== */

/* ── Wrapper ── */
.ulum-section {
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 24px;
}

/* ── Grid карточек категорий ── */
.ulum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.ulum-card {
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--border-gray);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ulum-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.ulum-card-icon {
    width: 42px;
    height: 42px;
    background: var(--emerald-50, #ecfdf5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald);
    margin-bottom: 4px;
    flex-shrink: 0;
}

.ulum-card-title-ar {
    font-family: 'Scheherazade New', 'Amiri', serif;
    font-size: 18px;
    color: #1f2937;
    direction: rtl;
    text-align: end;
    margin: 0;
    line-height: 1.4;
}

.ulum-card-title-ru {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin: 0;
    line-height: 1.4;
}

/* Локализованный заголовок карточки (единый) */
.ulum-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.4;
}

.ulum-card-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.ulum-card-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--emerald);
    background: var(--emerald-50, #ecfdf5);
    border-radius: 9999px;
    padding: 3px 10px;
    align-self: flex-start;
    margin-top: auto;
}

/* ── Развёрнутый раздел (список статей) ── */
.ulum-section-detail {
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--border-gray);
    padding: 0;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.ulum-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: #f9fafb;
    border-bottom: 1px solid var(--border-gray);
    cursor: pointer;
}

.ulum-section-header:hover { background: var(--emerald-50, #f0fdf4); }

.ulum-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    background: white;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 16px;
    width: fit-content;
}
.ulum-back-btn:hover { background: var(--emerald-50, #ecfdf5); border-color: var(--emerald); color: var(--emerald); }

.ulum-section-title-ar {
    font-family: 'Scheherazade New', 'Amiri', serif;
    font-size: 20px;
    color: #1f2937;
    direction: rtl;
    text-align: end;
    margin: 0;
    flex: 1;
}
.ulum-section-title-ru {
    font-size: 15px;
    font-weight: 700;
    color: #374151;
    margin: 0;
}

/* Локализованный заголовок раздела (единый) */
.ulum-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    flex: 1;
}

/* Список статей внутри раздела */
.ulum-articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ulum-article-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
}
.ulum-article-item:last-child { border-bottom: none; }
.ulum-article-item:hover { background: #f9fafb; }

.ulum-article-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.ulum-article-title-ar {
    font-family: 'Scheherazade New', 'Amiri', serif;
    font-size: 15px;
    color: #1f2937;
    direction: rtl;
    text-align: end;
    line-height: 1.4;
}
.ulum-article-title-ru {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
    line-height: 1.4;
}

/* Локализованный заголовок статьи (единый) */
.ulum-article-title {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    line-height: 1.5;
    flex: 1;
    min-width: 0;
}

.ulum-article-status {
    padding: 3px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.ulum-article-status.published { background: #d1fae5; color: #059669; }
.ulum-article-status.draft     { background: #fef3c7; color: #c5a059; }
.ulum-article-status.planned   { background: #f3f4f6; color: #9ca3af; }

.ulum-article-arrow {
    color: #9ca3af;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.ulum-article-item:hover .ulum-article-arrow { transform: translateX(3px); color: var(--emerald); }

/* ── Статья ── */
.ulum-article-view {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 24px;
}

.ulum-article-content {
    background: var(--white);
    border-radius: 14px;
    border: 1px solid var(--border-gray);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.ulum-article-heading-ar {
    font-family: 'Scheherazade New', 'Amiri', serif;
    font-size: 26px;
    color: #1f2937;
    direction: rtl;
    text-align: end;
    margin: 0 0 6px;
    line-height: 1.4;
}
.ulum-article-heading-ru {
    font-size: 20px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 24px;
}

.ulum-article-body {
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
}
.ulum-article-body h3 { font-size: 16px; font-weight: 700; color: #1f2937; margin: 20px 0 8px; }
.ulum-article-body p  { margin: 0 0 14px; }

.ulum-quote {
    border-inline-start: 3px solid var(--emerald);
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 4px;
    margin: 16px 0;
    font-family: 'Scheherazade New', 'Amiri', serif;
    font-size: 17px;
    direction: rtl;
    text-align: end;
    color: #1f2937;
    line-height: 2;
}
[dir="rtl"] .ulum-quote { border-inline-start: none; border-inline-end: 3px solid var(--emerald); }

/* Пустое состояние */
.ulum-empty {
    text-align: center;
    padding: 48px;
    color: #9ca3af;
}
.ulum-empty-icon  { font-size: 40px; margin-bottom: 12px; }
.ulum-empty-title { font-size: 15px; font-weight: 700; color: #374151; }
