/* ================================================================
   FAKULTETLAR SAHIFASI
   ================================================================ */

:root {
    --primary:   #1566B7;
    --primary-d: #0d47a1;
    --gold:      #FFD54F;
    --text:      #2c3e50;
    --muted:     #5f738c;
    --light-bg:  #f8faff;
    --border:    #e5efff;
    --dark-bg:   #0e1a2b;
}

/* ── HEADER ── */
.fk-header {
    background: linear-gradient(135deg, var(--primary-d) 0%, var(--primary) 100%);
    padding: 64px 0 52px;
    position: relative;
    overflow: hidden;
}
.fk-header-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.fk-orb-1 { width: 320px; height: 320px; left: -80px; bottom: -80px; background: rgba(255,255,255,0.05); }
.fk-orb-2 { width: 440px; height: 440px; right: -120px; top: -120px; background: rgba(255,255,255,0.04); }
.fk-header-inner { position: relative; z-index: 2; }

.fk-header .breadcrumb { background: none; padding: 0; margin-bottom: 20px; }
.fk-header .breadcrumb-item,
.fk-header .breadcrumb-item a { color: rgba(255,255,255,0.65); font-size: 13px; text-decoration: none; font-family: sans-serif; }
.fk-header .breadcrumb-item a:hover { color: var(--gold); }
.fk-header .breadcrumb-item.active { color: #fff; }
.fk-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.35); }

.fk-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;
}
.fk-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;
}
.fk-header h1 em { font-style: italic; color: var(--gold); }
.fk-header-sub { font-size: 15px; font-weight: 300; color: rgba(255,255,255,0.6); font-family: sans-serif; }

body.dark .fk-header { background: linear-gradient(135deg, #060c18 0%, #0a1628 100%); }

/* ── SECTION ── */
.fk-section { background: var(--light-bg); padding: 72px 0 88px; }
body.dark .fk-section { background: #0a1525; }

/* ── FK-LIST ── */
.fk-list { display: flex; flex-direction: column; gap: 0; }

/* ── FK-ITEM ── */
.fk-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;
}
.fk-item.visible { opacity: 1; transform: translateY(0); }
.fk-item:nth-child(1) { transition-delay: 0s; }
.fk-item:nth-child(2) { transition-delay: 0.08s; }
.fk-item:nth-child(3) { transition-delay: 0.16s; }
.fk-item:nth-child(4) { transition-delay: 0.24s; }
.fk-item:nth-child(5) { transition-delay: 0.32s; }
.fk-item.active { box-shadow: 0 12px 48px rgba(21,102,183,0.16); }
body.dark .fk-item { border-color: rgba(255,255,255,0.07); background: #1a2740; }

/* ── DEKAN KARTASI ── */
.fk-dean-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    background: #fff;
    cursor: pointer;
    transition: background 0.25s;
    position: relative;
}
.fk-dean-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
}
.fk-dean-card:hover { background: #f8faff; }
body.dark .fk-dean-card { background: #1a2740; }
body.dark .fk-dean-card:hover { background: #1f2f4a; }

/* Rasm */
.fk-dean-img-wrap {
    position: relative; overflow: visible;
    aspect-ratio: 3/3.5;
}
.fk-dean-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.5s ease;
    clip-path: inset(0);
}
.fk-dean-card:hover .fk-dean-img { transform: scale(1.04); }
.fk-dean-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);
}
.fk-dean-card:hover .fk-dean-overlay { opacity: 1; }
.fk-arrow-icon {
    font-size: 22px; color: #fff;
    transition: transform 0.4s cubic-bezier(.34,1.56,.64,1);
}
.fk-arrow-icon.rotated { transform: rotate(180deg); }
.fk-dean-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 */
.fk-dean-info { padding: 28px 32px 28px 28px; display: flex; flex-direction: column; gap: 4px; }

.fk-faculty-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 .fk-faculty-name { color: #90caf9; }

.fk-dean-rank {
    font-size: 11px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    color: var(--muted); font-family: sans-serif;
}
body.dark .fk-dean-rank { color: #64748b; }

.fk-dean-name {
    font-family: 'Playfair Display', serif;
    font-size: 20px; font-weight: 700;
    color: var(--dark-bg); line-height: 1.2; margin: 2px 0 2px;
}
body.dark .fk-dean-name { color: #e8eeff; }

.fk-dean-post { font-size: 13px; color: var(--muted); font-family: sans-serif; margin-bottom: 14px; }

.fk-dean-contacts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.fk-contact-row {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-family: sans-serif; color: var(--text);
}
body.dark .fk-contact-row { color: #cbd5e0; }
.fk-contact-row i { color: var(--primary); width: 14px; font-size: 12px; }
body.dark .fk-contact-row i { color: #90caf9; }
.fk-contact-row a { color: var(--text); text-decoration: none; }
.fk-contact-row a:hover { color: var(--primary); }
body.dark .fk-contact-row a { color: #90caf9; }

.fk-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;
}
.fk-toggle-btn:hover { box-shadow: 0 6px 20px rgba(21,102,183,0.35); transform: translateY(-1px); }
.fk-btn-arrow { transition: transform 0.4s cubic-bezier(.34,1.56,.64,1); }
.fk-btn-arrow.rotated { transform: rotate(180deg); }

/* ── PANEL ── */
.fk-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--light-bg);
    border-top: 1px solid transparent;
}
.fk-panel.open {
    max-height: 2000px;
    border-top-color: var(--border);
}
body.dark .fk-panel { background: #141f33; }
body.dark .fk-panel.open { border-top-color: rgba(255,255,255,0.07); }

.fk-panel-inner { padding: 40px 36px 44px; }

/* 2 ustun */
.fk-panel-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 36px;
}

/* Ustun header */
.fk-col-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}
body.dark .fk-col-header { border-color: rgba(255,255,255,0.08); }
.fk-col-header i { font-size: 18px; color: var(--primary); }
body.dark .fk-col-header i { color: #90caf9; }
.fk-col-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 17px; font-weight: 700;
    color: var(--dark-bg); margin: 0;
}
body.dark .fk-col-header h3 { color: #e8eeff; }

/* Ro'yxat */
.fk-items-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.fk-items-list li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 14px; line-height: 1.5;
    font-family: sans-serif;
    padding: 10px 14px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: border-color 0.2s, transform 0.2s;
}
.fk-items-list li:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}
body.dark .fk-items-list li {
    background: #1a2740; border-color: rgba(255,255,255,0.07); color: #cbd5e0;
}
body.dark .fk-items-list li:hover { border-color: #90caf9; }
.fk-items-list li i {
    color: var(--primary); font-size: 8px;
    margin-top: 5px; flex-shrink: 0;
}
body.dark .fk-items-list li i { color: #90caf9; }

.fk-empty-msg { font-size: 13px; color: var(--muted); font-family: sans-serif; font-style: italic; }

/* Umumiy ma'lumot */
.fk-panel-bio { margin-top: 4px; }
.fk-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 .fk-bio-text { background: #1a2740; border-color: rgba(255,255,255,0.07); color: #94a3b8; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .fk-dean-card { grid-template-columns: 160px 1fr; }
    .fk-panel-cols { grid-template-columns: 1fr; gap: 24px; }
    .fk-panel-inner { padding: 24px 20px; }
    .fk-dean-info { padding: 20px 18px 20px 16px; }
    .fk-faculty-name { font-size: 16px; }
    .fk-dean-name { font-size: 17px; }
}
@media (max-width: 480px) {
    .fk-dean-card { grid-template-columns: 1fr; }
    .fk-dean-img-wrap { aspect-ratio: 3/2; max-height: 200px; }
}
/* Rich editor content — fakultetlar.css ga qo'shiladi */
.fk-bio-text p              { margin-bottom: 12px; }
.fk-bio-text p:last-child   { margin-bottom: 0; }
.fk-bio-text ul,
.fk-bio-text ol             { padding-left: 20px; margin-bottom: 12px; }
.fk-bio-text li             { margin-bottom: 4px; }
.fk-bio-text strong         { font-weight: 700; }
.fk-bio-text em             { font-style: italic; }
.fk-bio-text a              { color: #0d2137; text-decoration: underline; }
.fk-bio-text a:hover        { color: #c9a84c; }
.fk-bio-text h1, .fk-bio-text h2, .fk-bio-text h3,
.fk-bio-text h4, .fk-bio-text h5 {
    font-family: 'Playfair Display', serif;
    font-weight: 700; margin: 14px 0 8px; line-height: 1.3;
}
.fk-bio-text blockquote {
    border-left: 3px solid #c9a84c;
    padding-left: 14px; margin: 12px 0;
    color: #666; font-style: italic;
}
.fk-bio-text img            { max-width: 100%; border-radius: 6px; margin: 8px 0; }
.fk-bio-text table          { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.fk-bio-text th,
.fk-bio-text td             { border: 1px solid #e8e0d4; padding: 8px 12px; font-size: 0.88rem; }
.fk-bio-text th             { background: #f5f1ec; font-weight: 700; }

/* ── PANEL DRAWER ── */
.kf-panel-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(10,22,48,0.35);
    backdrop-filter: blur(3px);
    z-index: 199;
}
.kf-panel-overlay.active { display: block; }

.kf-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: 70vh;
    display: flex;
    flex-direction: column;
}
.kf-panel-drawer.open { transform: translateY(0); }
body.dark .kf-panel-drawer { background: #1a2740; }

/* Panel tepa chiziq */
.kf-panel-drawer::before {
    content: '';
    display: block;
    width: 48px; height: 4px;
    background: var(--border);
    border-radius: 4px;
    margin: 12px auto 0;
    flex-shrink: 0;
}
body.dark .kf-panel-drawer::before { background: rgba(255,255,255,0.1); }

.kf-panel-header {
    display: flex; align-items: flex-start;
    justify-content: space-between;
    padding: 16px 32px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
body.dark .kf-panel-header { border-color: rgba(255,255,255,0.07); }

.kf-panel-kafedra-name {
    font-family: 'Playfair Display', serif;
    font-size: 20px; font-weight: 900;
    color: var(--primary-d); line-height: 1.3;
}
body.dark .kf-panel-kafedra-name { color: #90caf9; }
.kf-panel-mudur {
    font-size: 13px; color: var(--muted); margin-top: 4px; font-family: sans-serif;
}
body.dark .kf-panel-mudur { color: #64748b; }

.kf-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;
}
.kf-panel-close:hover { background: var(--primary); color: #fff; }
body.dark .kf-panel-close { background: rgba(255,255,255,0.08); color: #e2e8f0; }

.kf-panel-body {
    padding: 24px 32px 32px;
    overflow-y: auto;
    flex: 1;
}
.kf-panel-body::-webkit-scrollbar { width: 4px; }
.kf-panel-body::-webkit-scrollbar-track { background: transparent; }
.kf-panel-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.kf-panel-body::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.kf-panel-cols {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

.kf-pc-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}
body.dark .kf-pc-header { border-color: rgba(255,255,255,0.08); }
.kf-pc-header i { font-size: 16px; color: var(--primary); }
body.dark .kf-pc-header i { color: #90caf9; }
.kf-pc-header h4 {
    font-family: 'Playfair Display', serif;
    font-size: 16px; font-weight: 700;
    color: var(--dark-bg); margin: 0;
}
body.dark .kf-pc-header h4 { color: #e8eeff; }

.kf-pc-rows { display: flex; flex-direction: column; gap: 12px; }
.kf-pc-row {
    display: flex; align-items: center; gap: 12px;
    font-size: 14px; font-family: sans-serif; color: var(--text);
}
body.dark .kf-pc-row { color: #cbd5e0; }
.kf-pc-row i { color: var(--primary); width: 16px; text-align: center; }
body.dark .kf-pc-row i { color: #90caf9; }
.kf-pc-row a { color: var(--text); text-decoration: none; }
.kf-pc-row a:hover { color: var(--primary); }
body.dark .kf-pc-row a { color: #90caf9; }

.kf-panel-bio-text {
    font-size: 14.5px; line-height: 1.85;
    color: #4a5568; font-weight: 300;
}
body.dark .kf-panel-bio-text { color: #94a3b8; }
.kf-panel-bio-text p { margin-bottom: 14px; }
.kf-panel-bio-text p:last-child { margin-bottom: 0; }

.kf-no-data { font-size: 13px; color: var(--muted); font-style: italic; font-family: sans-serif; }