/* ================================================================
   ME'YORIY HUJJATLAR SAHIFASI
   ================================================================ */

:root {
    --primary:   #1566B7;
    --primary-d: #0d47a1;
    --gold:      #FFD54F;
    --text:      #2c3e50;
    --muted:     #5f738c;
    --light-bg:  #f8faff;
    --border:    #e5efff;
    --dark-bg:   #0e1a2b;
}

/* ── HEADER ── */
.hj-header {
    background: linear-gradient(135deg, var(--primary-d) 0%, var(--primary) 100%);
    padding: 64px 0 52px;
    position: relative;
    overflow: hidden;
}
.hj-header-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.hj-orb-1 { width: 320px; height: 320px; left: -80px; bottom: -80px; background: rgba(255,255,255,0.05); }
.hj-orb-2 { width: 440px; height: 440px; right: -120px; top: -120px; background: rgba(255,255,255,0.04); }
.hj-header-inner { position: relative; z-index: 2; }

.hj-header .breadcrumb { background: none; padding: 0; margin-bottom: 20px; }
.hj-header .breadcrumb-item,
.hj-header .breadcrumb-item a { color: rgba(255,255,255,0.65); font-size: 13px; text-decoration: none; font-family: sans-serif; }
.hj-header .breadcrumb-item a:hover { color: var(--gold); }
.hj-header .breadcrumb-item.active { color: #fff; }
.hj-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.35); }

.hj-header-tag {
    display: inline-block; font-size: 10px; font-weight: 700;
    letter-spacing: 2.5px; text-transform: uppercase;
    color: var(--gold); background: rgba(255,213,79,0.12);
    border: 1px solid rgba(255,213,79,0.25);
    padding: 5px 16px; border-radius: 20px; margin-bottom: 16px; font-family: sans-serif;
}
.hj-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 52px); font-weight: 900;
    color: #fff; line-height: 1.15; margin-bottom: 12px;
}
.hj-header h1 em { font-style: italic; color: var(--gold); }
.hj-header-sub {
    font-size: 15px; font-weight: 300;
    color: rgba(255,255,255,0.6);
    font-family: sans-serif; margin-bottom: 0;
}
body.dark .hj-header { background: linear-gradient(135deg, #060c18 0%, #0a1628 100%); }

/* ── SECTION ── */
.hj-section { background: var(--light-bg); padding: 56px 0 88px; }
body.dark .hj-section { background: #0a1525; }

/* ── KATEGORIYA TUGMALARI ── */
.hj-cats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 40px;
}

.hj-cat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 20px;
    background: var(--primary-d);
    color: #fff;
    border: 2px solid transparent;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    font-family: sans-serif;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, transform 0.2s, box-shadow 0.25s;
    text-align: center;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(20px);
}
.hj-cat-btn.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease,
    background 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.hj-cat-btn i {
    font-size: 16px;
    flex-shrink: 0;
    opacity: 0.8;
}
.hj-cat-btn:hover {
    background: var(--primary);
    box-shadow: 0 6px 20px rgba(21,102,183,0.3);
    transform: translateY(-2px);
}
.hj-cat-btn.active {
    background: #fff;
    color: var(--primary-d);
    border-color: var(--primary);
    box-shadow: 0 8px 28px rgba(21,102,183,0.18);
}
.hj-cat-btn.active i { opacity: 1; }
body.dark .hj-cat-btn {
    background: #1a2740;
    color: #cbd5e0;
    border-color: rgba(255,255,255,0.06);
}
body.dark .hj-cat-btn:hover {
    background: #1e3255;
    color: #fff;
}
body.dark .hj-cat-btn.active {
    background: #0d47a1;
    color: #fff;
    border-color: #90caf9;
}

/* ── PANEL ── */
.hj-panel {
    background: #fff;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 32px rgba(21,102,183,0.08);
    overflow: hidden;
}
body.dark .hj-panel {
    background: #1a2740;
    border-color: rgba(255,255,255,0.07);
}

/* Qidiruv */
.hj-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 28px;
    border-bottom: 1px solid var(--border);
    background: var(--light-bg);
}
body.dark .hj-search-bar {
    background: #111e33;
    border-color: rgba(255,255,255,0.07);
}
.hj-search-bar i { color: var(--muted); font-size: 15px; flex-shrink: 0; }
body.dark .hj-search-bar i { color: #64748b; }
.hj-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    font-family: sans-serif;
    color: var(--text);
    outline: none;
}
body.dark .hj-search-bar input { color: #e2e8f0; }
.hj-search-bar input::placeholder { color: var(--muted); }

/* Panel meta */
.hj-panel-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    border-bottom: 1px solid var(--border);
}
body.dark .hj-panel-meta { border-color: rgba(255,255,255,0.07); }

.hj-active-cat-name {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-d);
}
body.dark .hj-active-cat-name { color: #90caf9; }

.hj-doc-count {
    font-size: 12px;
    font-family: sans-serif;
    color: var(--muted);
    background: var(--light-bg);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 20px;
}
body.dark .hj-doc-count {
    background: #111e33;
    border-color: rgba(255,255,255,0.07);
    color: #64748b;
}

/* ── HUJJAT RO'YXATI ── */
.hj-doc-list { padding: 12px 0; }

.hj-doc-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 28px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
    animation: hjFadeIn 0.4s ease both;
}
.hj-doc-item:last-child { border-bottom: none; }
.hj-doc-item:hover { background: var(--light-bg); }
body.dark .hj-doc-item { border-color: rgba(255,255,255,0.05); }
body.dark .hj-doc-item:hover { background: #1f2f4a; }

@keyframes hjFadeIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Ikon */
.hj-doc-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.hj-icon-pdf {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}
.hj-icon-link {
    background: rgba(21, 102, 183, 0.1);
    color: var(--primary);
}
body.dark .hj-icon-pdf { background: rgba(220,38,38,0.15); }
body.dark .hj-icon-link { background: rgba(21,102,183,0.2); color: #90caf9; }

/* Hujjat ma'lumotlari */
.hj-doc-body { flex: 1; min-width: 0; }

.hj-doc-name {
    font-family: 'Source Serif 4', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-bg);
    line-height: 1.4;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.dark .hj-doc-name { color: #e2e8f0; }

.hj-doc-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hj-doc-num,
.hj-doc-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-family: sans-serif;
    color: var(--muted);
}
.hj-doc-num i,
.hj-doc-date i { font-size: 10px; opacity: 0.7; }
body.dark .hj-doc-num,
body.dark .hj-doc-date { color: #64748b; }

.hj-doc-type {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: sans-serif;
}
.hj-type-pdf {
    background: rgba(220,38,38,0.08);
    color: #dc2626;
}
.hj-type-link {
    background: rgba(21,102,183,0.1);
    color: var(--primary);
}
body.dark .hj-type-pdf { background: rgba(220,38,38,0.15); }
body.dark .hj-type-link { background: rgba(21,102,183,0.2); color: #90caf9; }

/* Yuklab olish / Ko'rish tugmasi */
.hj-doc-btn {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.hj-doc-btn:hover {
    background: var(--primary-d);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(21,102,183,0.3);
}
body.dark .hj-doc-btn { background: #1e3a5f; }
body.dark .hj-doc-btn:hover { background: var(--primary); }

/* ── BO'SH HOLAT ── */
.hj-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 0;
    color: var(--muted);
    font-family: sans-serif;
    font-size: 15px;
}
.hj-empty i { font-size: 2.5rem; opacity: 0.35; }
body.dark .hj-empty { color: #64748b; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .hj-cats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .hj-cats { grid-template-columns: 1fr; }
    .hj-doc-item { padding: 14px 16px; gap: 12px; }
    .hj-search-bar { padding: 14px 16px; }
    .hj-panel-meta { padding: 12px 16px; }
    .hj-doc-name { font-size: 14px; }
    .hj-doc-icon { width: 38px; height: 38px; font-size: 16px; }
}