/* ══════════════════════════════════════════════
   ARTICLES LISTING PAGE — Premium Editorial
   ══════════════════════════════════════════════ */

/* ── Hero ── */
.articles-hero {
    position: relative;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 55%, #1a1a3e 100%);
    padding: 90px 0 70px;
    overflow: hidden;
}
.articles-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.articles-hero-orb {
    position: absolute; border-radius: 50%;
    filter: blur(90px); opacity: 0.22;
}
.orb-1 { width: 560px; height: 560px; background: #6366f1; top: -200px; right: -120px; }
.orb-2 { width: 380px; height: 380px; background: #7c3aed; bottom: -80px; left: -80px; }

.articles-hero-content { position: relative; z-index: 1; max-width: 760px; }

.articles-hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.1); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.18); color: #c4b5fd;
    padding: 7px 18px; border-radius: 100px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
    margin-bottom: 24px;
}
.articles-hero-badge sl-icon { font-size: 16px; }

.articles-hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 52px);
    color: white; font-weight: 700;
    line-height: 1.2; margin-bottom: 16px;
}
.articles-hero-content p {
    font-size: 17px; color: rgba(165,180,252,0.85);
    line-height: 1.7; margin-bottom: 28px; max-width: 520px;
}
.articles-hero-content p strong { color: #c4b5fd; }
.articles-hero-stats {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(99,102,241,0.2); border: 1px solid rgba(165,180,252,0.3);
    padding: 8px 20px; border-radius: 100px;
    color: #a5b4fc; font-size: 14px; font-weight: 600;
}
.articles-hero-stats sl-icon { font-size: 16px; }

/* ── Directory Wrapper ── */
.directory-section { padding: 48px 0 80px; background: #f1f5f9; min-height: 70vh; }
.directory-layout { display: flex; gap: 36px; align-items: flex-start; }

/* ════════════════════════════
   SIDEBAR
════════════════════════════ */
.directory-sidebar { width: 300px; flex-shrink: 0; position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }

.sidebar-filters {
    background: white; border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    overflow: hidden;
}

.filter-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 20px; background: linear-gradient(135deg, #1e1b4b, #312e81);
    font-size: 14px; font-weight: 700; color: white; letter-spacing: 0.3px;
}
.filter-panel-header sl-icon { font-size: 16px; color: #a5b4fc; }
.filter-panel-header > span { display: flex; align-items: center; gap: 8px; }
.filter-reset {
    display: flex; align-items: center; gap: 4px;
    font-size: 12px; color: rgba(165,180,252,0.8); text-decoration: none;
    transition: color 0.2s;
}
.filter-reset:hover { color: #f87171; }

.filter-group {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}
.filter-group:last-child { border-bottom: none; }

.filter-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px;
    color: #94a3b8; font-weight: 700; margin-bottom: 12px;
}
.filter-title sl-icon { font-size: 14px; color: #6366f1; }

.filter-options { display: flex; flex-direction: column; gap: 4px; }
.filter-option {
    display: flex; align-items: center;
    padding: 9px 12px; border-radius: 10px;
    color: #475569; font-size: 13.5px; text-decoration: none;
    transition: all 0.18s ease; border: 1px solid transparent;
    font-weight: 500; gap: 8px;
}
.filter-option sl-icon { font-size: 15px; color: #94a3b8; }
.filter-option:hover { background: #f8faff; color: #4f46e5; border-color: #e0e7ff; }
.filter-option:hover sl-icon { color: #6366f1; }
.filter-option.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white; border-color: transparent; font-weight: 700;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.filter-option.active sl-icon { color: rgba(255,255,255,0.7); }

.filter-search-box {
    position: relative; margin-bottom: 10px;
}
.filter-search-box sl-icon {
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    color: #94a3b8; font-size: 15px; pointer-events: none;
}
.filter-search-box input {
    width: 100%; padding: 9px 12px 9px 34px;
    border: 1.5px solid #e2e8f0; border-radius: 9px;
    font-size: 13.5px; color: #334155; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s; background: #f8fafc;
    box-sizing: border-box;
}
.filter-search-box input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129,140,248,0.18);
    background: white;
}

.checkbox-list { display: flex; flex-direction: column; gap: 2px; max-height: 160px; overflow-y: auto; }
.checkbox-label {
    display: flex; align-items: center; gap: 10px;
    font-size: 13.5px; color: #475569; cursor: pointer;
    padding: 7px 4px; border-radius: 8px; transition: color 0.18s;
    font-weight: 500;
}
.checkbox-label input { accent-color: #6366f1; width: 15px; height: 15px; cursor: pointer; }
.checkbox-label:hover { color: #4f46e5; }

.filter-select {
    width: 100%; padding: 9px 12px;
    border: 1.5px solid #e2e8f0; border-radius: 9px;
    font-size: 13.5px; color: #334155; background: #f8fafc;
    cursor: pointer; outline: none; transition: border-color 0.2s;
}
.filter-select:focus { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(129,140,248,0.18); }

/* Sidebar Ad */
.sidebar-ad-tile {
    background: white; border-radius: 16px;
    border: 1px solid #e2e8f0; padding: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.sidebar-ad-tile img { width: 100%; border-radius: 8px; display: block; }
.ad-pill {
    display: block; font-size: 10px; text-transform: uppercase;
    letter-spacing: 1.5px; color: #94a3b8; font-weight: 700;
    margin-bottom: 8px;
}

/* ════════════════════════════
   MAIN CONTENT
════════════════════════════ */
.directory-main { flex: 1; min-width: 0; }

.results-header {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 20px; font-size: 14px; color: #64748b;
}
.results-count { display: flex; align-items: center; gap: 6px; font-weight: 600; color: #1e1b4b; }
.results-count sl-icon { color: #6366f1; }

/* ── Article Rows ── */
.articles-list { display: flex; flex-direction: column; gap: 16px; }

.article-row {
    display: flex; background: white; border-radius: 16px;
    overflow: hidden; border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    min-height: 200px;
}
.article-row:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(99,102,241,0.12);
    border-color: #c4b5fd;
}

/* Thumbnail */
.article-row-thumb {
    width: 240px; flex-shrink: 0; position: relative; overflow: hidden;
    background: #f1f5f9;
}
.article-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.article-row:hover .article-row-thumb img { transform: scale(1.05); }

.article-row-placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%; position: relative;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}
.article-row-placeholder::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(#c7d2fe 1px, transparent 1px);
    background-size: 18px 18px; opacity: 0.45;
}
.article-row-placeholder sl-icon { font-size: 44px; color: #818cf8; opacity: 0.7; position: relative; z-index: 1; }

.thumb-category-chip {
    position: absolute; top: 12px; left: 12px;
    padding: 4px 10px; border-radius: 100px;
    background: rgba(30,27,75,0.72); backdrop-filter: blur(6px);
    color: #c4b5fd; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.6px;
}

/* Row body */
.article-row-body { flex: 1; padding: 24px 28px; display: flex; flex-direction: column; min-width: 0; }

.article-row-meta {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 10px;
}
.meta-date, .meta-ref {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12.5px; color: #64748b; font-weight: 500;
}
.meta-date sl-icon, .meta-ref sl-icon { font-size: 13px; color: #94a3b8; }
.meta-ref { font-family: 'Outfit', monospace; color: #6366f1; }

.article-row-title { font-size: 20px; line-height: 1.4; margin-bottom: 10px; font-family: 'Playfair Display', serif; }
.article-row-title a { color: #0f172a; text-decoration: none; transition: color 0.2s ease; }
.article-row-title a:hover { color: #4f46e5; }

.article-row-abstract {
    font-size: 14.5px; color: #475569; line-height: 1.7;
    margin-bottom: 20px; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.article-row-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 16px; border-top: 1px solid #f1f5f9; gap: 12px;
}
.meta-author {
    display: flex; align-items: center; gap: 8px;
    font-size: 13.5px; color: #334155; font-weight: 500; min-width: 0;
}
.author-avatar-sm {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 14px; flex-shrink: 0;
}
.author-inst { color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }

.row-read-btn {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 8px 18px; border-radius: 9px; font-size: 13px; font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white;
    text-decoration: none; transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 10px rgba(99,102,241,0.3); flex-shrink: 0;
}
.row-read-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(99,102,241,0.45); color: white; }

/* ── Empty State ── */
.empty-state {
    text-align: center; padding: 72px 24px;
    background: white; border-radius: 18px;
    border: 1.5px dashed #cbd5e1;
}
.empty-icon-wrap { font-size: 52px; color: #cbd5e1; margin-bottom: 20px; }
.empty-state h3 { font-size: 22px; color: #334155; margin-bottom: 10px; font-family: 'Playfair Display', serif; }
.empty-state p { font-size: 15px; color: #64748b; }

/* ── Pagination ── */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; margin-top: 40px;
}
.page-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 22px; border-radius: 10px; font-size: 14px; font-weight: 600;
    background: white; color: #334155; text-decoration: none;
    border: 1.5px solid #e2e8f0; transition: all 0.2s ease;
}
.page-btn:hover { background: #6366f1; color: white; border-color: #6366f1; }
.page-info { font-size: 14px; color: #64748b; font-weight: 600; padding: 0 8px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .directory-layout { flex-direction: column; }
    .directory-sidebar { width: 100%; position: static; flex-direction: row; flex-wrap: wrap; }
    .sidebar-filters { flex: 1; min-width: 280px; }
}
@media (max-width: 640px) {
    .article-row { flex-direction: column; min-height: unset; }
    .article-row-thumb { width: 100%; height: 180px; }
    .article-row-body { padding: 18px; }
    .article-row-footer { flex-direction: column; align-items: flex-start; }
    .row-read-btn { width: 100%; justify-content: center; }
    .author-inst { display: none; }
}
