/* ================================================================
   BO'LIMLAR SAHIFASI
   ================================================================ */

:root {
    --primary:   #1566B7;
    --primary-d: #0d47a1;
    --gold:      #FFD54F;
    --text:      #2c3e50;
    --muted:     #5f738c;
    --light-bg:  #f8faff;
    --border:    #e5efff;
    --dark-bg:   #0e1a2b;
}

/* ── HEADER ── */
.bl-header {
    background: linear-gradient(135deg, var(--primary-d) 0%, var(--primary) 100%);
    padding: 64px 0 52px;
    position: relative;
    overflow: hidden;
}
.bl-header-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.bl-orb-1 { width: 320px; height: 320px; left: -80px; bottom: -80px; background: rgba(255,255,255,0.05); }
.bl-orb-2 { width: 440px; height: 440px; right: -120px; top: -120px; background: rgba(255,255,255,0.04); }
.bl-header-inner { position: relative; z-index: 2; }

.bl-header .breadcrumb { background: none; padding: 0; margin-bottom: 20px; }
.bl-header .breadcrumb-item,
.bl-header .breadcrumb-item a { color: rgba(255,255,255,0.65); font-size: 13px; text-decoration: none; font-family: sans-serif; }
.bl-header .breadcrumb-item a:hover { color: var(--gold); }
.bl-header .breadcrumb-item.active { color: #fff; }
.bl-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.35); }

.bl-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;
}
.bl-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;
}
.bl-header h1 em { font-style: italic; color: var(--gold); }
.bl-header-sub { font-size: 15px; font-weight: 300; color: rgba(255,255,255,0.6); font-family: sans-serif; margin-bottom: 32px; }
body.dark .bl-header { background: linear-gradient(135deg, #060c18 0%, #0a1628 100%); }

.bl-header-stats {
    display: inline-flex; align-items: center; gap: 24px;
    background: rgba(255,255,255,0.1); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 14px 28px; border-radius: 16px;
}
.bl-stat { text-align: center; }
.bl-stat-num { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 900; color: #fff; line-height: 1; }
.bl-stat-label { font-size: 11px; color: rgba(255,255,255,0.6); font-family: sans-serif; margin-top: 2px; }
.bl-stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,0.2); }

/* ── SECTION ── */
.bl-section { background: var(--light-bg); padding: 72px 0 88px; }
body.dark .bl-section { background: #0a1525; }

/* ── BL-LIST ── */
.bl-list { display: flex; flex-direction: column; gap: 0; }

/* ── BL-ITEM ── */
.bl-item {
    border-radius: 24px; overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(21,102,183,0.08);
    border: 1px solid var(--border);
    opacity: 0; transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s;
}
.bl-item.visible { opacity: 1; transform: translateY(0); }
.bl-item:nth-child(1) { transition-delay: 0s; }
.bl-item:nth-child(2) { transition-delay: 0.08s; }
.bl-item:nth-child(3) { transition-delay: 0.16s; }
.bl-item:nth-child(4) { transition-delay: 0.24s; }
.bl-item:nth-child(5) { transition-delay: 0.32s; }
.bl-item.active { box-shadow: 0 12px 48px rgba(21,102,183,0.16); }
body.dark .bl-item { border-color: rgba(255,255,255,0.07); }

/* ── BO'LIM BOSHLIG'I KARTASI ── */
.bl-chief-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    background: #fff;
    cursor: pointer;
    transition: background 0.25s;
    position: relative;
}
.bl-chief-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
}
.bl-chief-card:hover { background: #f8faff; }
body.dark .bl-chief-card { background: #1a2740; }
body.dark .bl-chief-card:hover { background: #1f2f4a; }

/* Rasm */
.bl-chief-img-wrap {
    position: relative; overflow: visible;
    aspect-ratio: 3/3.5;
}
.bl-chief-img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: top;
    display: block;
    transition: transform 0.5s ease;
    clip-path: inset(0);
}
.bl-chief-card:hover .bl-chief-img { transform: scale(1.04); }
.bl-chief-overlay {
    position: absolute; inset: 0;
    background: rgba(13,71,161,0.45);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s;
    clip-path: inset(0);
}
.bl-chief-card:hover .bl-chief-overlay { opacity: 1; }
.bl-arrow-icon {
    font-size: 22px; color: #fff;
    transition: transform 0.4s cubic-bezier(.34,1.56,.64,1);
}
.bl-arrow-icon.rotated { transform: rotate(180deg); }
.bl-chief-badge {
    position: absolute; bottom: 10px; left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-d), var(--primary));
    color: #fff; font-size: 10px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    padding: 6px 18px; border-radius: 20px;
    white-space: nowrap; font-family: sans-serif;
    box-shadow: 0 4px 14px rgba(21,102,183,0.35);
    z-index: 2;
}

/* Info */
.bl-chief-info { padding: 28px 32px 28px 28px; display: flex; flex-direction: column; gap: 4px; }
.bl-name {
    font-family: 'Playfair Display', serif;
    font-size: 19px; font-weight: 900;
    color: var(--primary-d); line-height: 1.3; margin-bottom: 8px;
}
body.dark .bl-name { color: #90caf9; }
.bl-chief-rank {
    font-size: 11px; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase; color: var(--muted); font-family: sans-serif;
}
body.dark .bl-chief-rank { color: #64748b; }
.bl-chief-name {
    font-family: 'Playfair Display', serif;
    font-size: 20px; font-weight: 700;
    color: var(--dark-bg); line-height: 1.2; margin: 2px 0;
}
body.dark .bl-chief-name { color: #e8eeff; }
.bl-chief-post { font-size: 13px; color: var(--muted); font-family: sans-serif; margin-bottom: 14px; }
.bl-chief-contacts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.bl-contact-row {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-family: sans-serif; color: var(--text);
}
body.dark .bl-contact-row { color: #cbd5e0; }
.bl-contact-row i { color: var(--primary); width: 14px; font-size: 12px; }
body.dark .bl-contact-row i { color: #90caf9; }
.bl-contact-row a { color: var(--text); text-decoration: none; }
.bl-contact-row a:hover { color: var(--primary); }
body.dark .bl-contact-row a { color: #90caf9; }

.bl-toggle-btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, var(--primary-d), var(--primary));
    color: #fff; padding: 10px 22px; border-radius: 10px;
    font-size: 13px; font-weight: 600; font-family: sans-serif;
    align-self: flex-start; margin-top: auto;
    transition: box-shadow 0.3s, transform 0.2s;
    cursor: pointer;
}
.bl-toggle-btn:hover { box-shadow: 0 6px 20px rgba(21,102,183,0.35); transform: translateY(-1px); }
.bl-btn-arrow { transition: transform 0.4s cubic-bezier(.34,1.56,.64,1); }
.bl-btn-arrow.rotated { transform: rotate(180deg); }

/* ── PANEL ── */
.bl-panel {
    max-height: 0; overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--light-bg);
    border-top: 1px solid transparent;
}
.bl-panel.open { max-height: 4000px; border-top-color: var(--border); }
body.dark .bl-panel { background: #141f33; }
body.dark .bl-panel.open { border-top-color: rgba(255,255,255,0.07); }

.bl-panel-inner { padding: 40px 36px 48px; }

/* Section header */
.bl-panel-section-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 20px; padding-bottom: 14px;
    border-bottom: 2px solid var(--border);
}
body.dark .bl-panel-section-header { border-color: rgba(255,255,255,0.08); }
.bl-panel-section-header i { font-size: 18px; color: var(--primary); }
body.dark .bl-panel-section-header i { color: #90caf9; }
.bl-panel-section-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 18px; font-weight: 700;
    color: var(--dark-bg); margin: 0;
}
body.dark .bl-panel-section-header h3 { color: #e8eeff; }

/* Bio */
.bl-panel-bio { margin-bottom: 40px; }
.bl-bio-text {
    font-size: 15px; line-height: 1.85;
    color: #4a5568; font-weight: 300;
    padding: 20px 24px;
    background: #fff; border-radius: 14px;
    border: 1px solid var(--border);
    white-space: pre-line;
}
body.dark .bl-bio-text { background: #1a2740; border-color: rgba(255,255,255,0.07); color: #94a3b8; }

/* ── XODIMLAR ── */
.bl-staff-block { }
.bl-staff-count {
    margin-left: auto;
    background: var(--primary);
    color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 3px 10px; border-radius: 20px;
    font-family: sans-serif;
}

.bl-staff-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* Xodim kichik card */
.bl-staff-card {
    background: #fff;
    border-radius: 16px;
    border: 3px solid var(--border);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(21,102,183,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.bl-staff-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(21,102,183,0.13);
}
body.dark .bl-staff-card { background: #1a2740; border-color: rgba(255,255,255,0.07); }

.bl-staff-img-wrap {
    aspect-ratio: 3/3;
    overflow: hidden;
}
.bl-staff-img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: top;
    display: block;
    transition: transform 0.4s ease;
}
.bl-staff-card:hover .bl-staff-img { transform: scale(1.05); }

.bl-staff-info { padding: 14px 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.bl-staff-name {
    font-family: 'Playfair Display', serif;
    font-size: 18px; font-weight: 700;
    color: var(--dark-bg); line-height: 1.3;
}
body.dark .bl-staff-name { color: #e2e8f0; }
.bl-staff-post {
    font-size: 13px; color: var(--primary);
    font-family: sans-serif; line-height: 1.4;
    margin-bottom: 8px;
}
body.dark .bl-staff-post { color: #90caf9; }
.bl-staff-contacts {
    display: flex; flex-direction: column; gap: 5px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
body.dark .bl-staff-contacts { border-color: rgba(255,255,255,0.07); }
.bl-staff-contacts a {
    display: flex; align-items: center; gap: 7px;
    font-size: 13px; color: var(--muted);
    text-decoration: none; font-family: sans-serif;
    transition: color 0.2s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bl-staff-contacts a:hover { color: var(--primary); }
body.dark .bl-staff-contacts a { color: #64748b; }
body.dark .bl-staff-contacts a:hover { color: #90caf9; }
.bl-staff-contacts i { color: var(--primary); font-size: 13px; width: 12px; flex-shrink: 0; }
body.dark .bl-staff-contacts i { color: #90caf9; }

/* Bo'sh holat */
.bl-staff-empty {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 10px;
    padding: 24px; color: var(--muted);
    font-size: 14px; font-family: sans-serif;
    font-style: italic;
}
.bl-staff-empty i { font-size: 20px; opacity: 0.5; }

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
    .bl-staff-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .bl-staff-grid { grid-template-columns: repeat(2, 1fr); }
    .bl-chief-card { grid-template-columns: 170px 1fr; }
}
@media (max-width: 600px) {
    .bl-chief-card { grid-template-columns: 1fr; }
    .bl-chief-img-wrap { aspect-ratio: 3/2; max-height: 200px; }
    .bl-staff-grid { grid-template-columns: repeat(2, 1fr); }
    .bl-panel-inner { padding: 24px 16px; }
}

/* ── DRAWER PANEL ── */
.bl-panel-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(10,22,48,0.35);
    backdrop-filter: blur(3px);
    z-index: 199;
}
.bl-panel-overlay.active { display: block; }

.bl-panel-drawer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 48px rgba(21,102,183,0.18);
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 75vh;
    display: flex;
    flex-direction: column;
}
.bl-panel-drawer.open { transform: translateY(0); }
body.dark .bl-panel-drawer { background: #1a2740; }

.bl-panel-drawer-handle {
    width: 48px; height: 4px;
    background: var(--border);
    border-radius: 4px;
    margin: 12px auto 0;
    flex-shrink: 0;
}
body.dark .bl-panel-drawer-handle { background: rgba(255,255,255,0.1); }

.bl-panel-header {
    display: flex; align-items: flex-start;
    justify-content: space-between;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
body.dark .bl-panel-header { border-color: rgba(255,255,255,0.07); }

.bl-panel-bolim-name {
    font-family: 'Playfair Display', serif;
    font-size: 20px; font-weight: 900;
    color: var(--primary-d); line-height: 1.3;
}
body.dark .bl-panel-bolim-name { color: #90caf9; }

.bl-panel-chief {
    font-size: 13px; color: var(--muted);
    margin-top: 4px; font-family: sans-serif;
}
body.dark .bl-panel-chief { color: #64748b; }

.bl-panel-close {
    background: rgba(0,0,0,0.06); border: none;
    width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text); font-size: 15px;
    flex-shrink: 0; margin-left: 16px;
    transition: background 0.2s, color 0.2s;
}
.bl-panel-close:hover { background: var(--primary); color: #fff; }
body.dark .bl-panel-close { background: rgba(255,255,255,0.08); color: #e2e8f0; }

.bl-panel-body {
    padding: 24px 32px 32px;
    overflow-y: auto;
    flex: 1;
}
.bl-panel-body::-webkit-scrollbar { width: 4px; }
.bl-panel-body::-webkit-scrollbar-track { background: transparent; }
.bl-panel-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.bl-panel-body::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Bio */
.bl-panel-bio-text {
    font-size: 14.5px; line-height: 1.85;
    color: #4a5568; font-weight: 300;
    margin-bottom: 32px;
}
body.dark .bl-panel-bio-text { color: #94a3b8; }
.bl-panel-bio-text p { margin-bottom: 14px; }
.bl-panel-bio-text p:last-child { margin-bottom: 0; }

/* Xodimlar blok */
.bl-panel-staff-block { }

/* Panel section header */
.bl-panel-section-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 18px; padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}
body.dark .bl-panel-section-header { border-color: rgba(255,255,255,0.08); }
.bl-panel-section-header i { font-size: 16px; color: var(--primary); }
body.dark .bl-panel-section-header i { color: #90caf9; }
.bl-panel-section-header h4 {
    font-family: 'Playfair Display', serif;
    font-size: 17px; font-weight: 700;
    color: var(--dark-bg); margin: 0;
}
body.dark .bl-panel-section-header h4 { color: #e8eeff; }

/* Responsive */
@media (max-width: 900px) {
    .bl-panel-drawer { max-height: 82vh; }
}
@media (max-width: 576px) {
    .bl-panel-header { padding: 14px 18px; }
    .bl-panel-body { padding: 18px; }
    .bl-panel-bolim-name { font-size: 17px; }
}
/* Rich editor content — bolimlar.css ga qo'shiladi */
.bl-panel-bio-text p              { margin-bottom: 12px; }
.bl-panel-bio-text p:last-child   { margin-bottom: 0; }
.bl-panel-bio-text ul,
.bl-panel-bio-text ol             { padding-left: 20px; margin-bottom: 12px; }
.bl-panel-bio-text li             { margin-bottom: 4px; }
.bl-panel-bio-text strong         { font-weight: 700; }
.bl-panel-bio-text em             { font-style: italic; }
.bl-panel-bio-text a              { color: var(--primary, #1566B7); text-decoration: underline; }
.bl-panel-bio-text a:hover        { color: var(--primary-d, #0d47a1); }
.bl-panel-bio-text h1, .bl-panel-bio-text h2, .bl-panel-bio-text h3,
.bl-panel-bio-text h4, .bl-panel-bio-text h5 {
    font-family: 'Playfair Display', serif;
    font-weight: 700; margin: 14px 0 8px; line-height: 1.3;
}
.bl-panel-bio-text blockquote {
    border-left: 3px solid var(--primary, #1566B7);
    padding-left: 14px; margin: 12px 0;
    color: #666; font-style: italic;
}
.bl-panel-bio-text img   { max-width: 100%; border-radius: 6px; margin: 8px 0; }
.bl-panel-bio-text table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.bl-panel-bio-text th,
.bl-panel-bio-text td    { border: 1px solid var(--border, #e5efff); padding: 8px 12px; font-size: 0.88rem; }
.bl-panel-bio-text th    { background: var(--light-bg, #f8faff); font-weight: 700; }