/* ================================================================
   RAHBARIYAT SAHIFASI — CSS
   Institut-tarixi bilan mos rang sxemasi
   ================================================================ */

:root {
    --primary:   #1566B7;
    --primary-d: #0d47a1;
    --gold:      #FFD54F;
    --text:      #2c3e50;
    --muted:     #5f738c;
    --light-bg:  #f8faff;
    --border:    #e5efff;
    --dark-bg:   #0e1a2b;
}

/* ── PAGE HEADER ── */
.rh-header {
    background: linear-gradient(135deg, var(--primary-d) 0%, var(--primary) 100%);
    padding: 64px 0 52px;
    position: relative;
    overflow: hidden;
}
.rh-header-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.rh-orb-1 {
    width: 320px; height: 320px;
    left: -80px; bottom: -80px;
    background: rgba(255,255,255,0.05);
}
.rh-orb-2 {
    width: 440px; height: 440px;
    right: -120px; top: -120px;
    background: rgba(255,255,255,0.04);
}
.rh-header-inner { position: relative; z-index: 2; }

.rh-header .breadcrumb { background: none; padding: 0; margin-bottom: 20px; }
.rh-header .breadcrumb-item,
.rh-header .breadcrumb-item a {
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    text-decoration: none;
    font-family: sans-serif;
}
.rh-header .breadcrumb-item a:hover { color: var(--gold); }
.rh-header .breadcrumb-item.active  { color: #fff; }
.rh-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.35); }

.rh-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;
}
.rh-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;
}
.rh-header h1 em { font-style: italic; color: var(--gold); }
.rh-header-sub {
    font-size: 15px;
    font-weight: 300;
    color: rgba(255,255,255,0.6);
    font-family: sans-serif;
}

/* dark mode header */
body.dark .rh-header {
    background: linear-gradient(135deg, #060c18 0%, #0a1628 100%);
}

/* ── REKTOR KARTA ── */
.rh-rector-section {
    background: #fff;
    padding: 72px 0 56px;
}
body.dark .rh-rector-section { background: #0e1a2b; }

.rh-rector-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 56px;
    align-items: start;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 48px;
    box-shadow: 0 8px 48px rgba(21,102,183,0.09);
    cursor: pointer;
    transition: box-shadow 0.3s, transform 0.3s;
    position: relative;
    overflow: hidden;
}
.rh-rector-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
}
.rh-rector-card:hover {
    box-shadow: 0 20px 72px rgba(21,102,183,0.16);
    transform: translateY(-4px);
}
body.dark .rh-rector-card {
    background: #1a2740;
    border-color: rgba(255,255,255,0.07);
}

/* Rasm */
.rh-rector-img-wrap {
    position: relative;
    display: flex;
    justify-content: center;
}
.rh-rector-img-ring {
    position: absolute;
    inset: -8px;
    border-radius: 20px;
    border: 2px solid rgba(21,102,183,0.15);
}
.rh-rector-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 16px;
    display: block;
}
.rh-rector-badge {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-d), var(--primary));
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 7px 20px;
    border-radius: 20px;
    white-space: nowrap;
    font-family: sans-serif;
    box-shadow: 0 4px 16px rgba(21,102,183,0.35);
}

/* Info */
.rh-rector-info { padding-top: 8px; }
.rh-rector-rank {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 10px;
    font-family: sans-serif;
}
body.dark .rh-rector-rank { color: #90caf9; }

.rh-rector-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 900;
    color: var(--dark-bg);
    line-height: 1.2;
    margin-bottom: 8px;
}
body.dark .rh-rector-name { color: #e8eeff; }

.rh-rector-post {
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 32px;
    font-family: sans-serif;
}

.rh-rector-contacts { margin-bottom: 36px; }
.rh-contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-family: sans-serif;
    color: var(--text);
}
body.dark .rh-contact-row { border-color: rgba(255,255,255,0.07); color: #cbd5e0; }
.rh-contact-row:last-child { border-bottom: none; }
.rh-contact-row i { color: var(--primary); width: 16px; text-align: center; }
.rh-contact-row a { color: var(--text); text-decoration: none; }
.rh-contact-row a:hover { color: var(--primary); }
body.dark .rh-contact-row a { color: #90caf9; }
.rh-contact-label {
    font-weight: 600;
    color: var(--text);
    min-width: 100px;
}
body.dark .rh-contact-label { color: #e2e8f0; }

.rh-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-d), var(--primary));
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: sans-serif;
}
.rh-more-btn:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(21,102,183,0.35);
}
.rh-more-btn i { transition: transform 0.3s; }
.rh-more-btn:hover i { transform: translateX(4px); }

/* ── O'RINBOSARLAR ── */
.rh-deputies-section {
    background: var(--light-bg);
    padding: 72px 0 88px;
}
body.dark .rh-deputies-section { background: #0a1525; }

.rh-section-header { margin-bottom: 48px; }
.rh-section-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(21,102,183,0.08);
    border: 1px solid rgba(21,102,183,0.18);
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    font-family: sans-serif;
}
body.dark .rh-section-tag { color: #90caf9; background: rgba(144,202,249,0.08); border-color: rgba(144,202,249,0.2); }
.rh-section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 900;
    color: var(--dark-bg);
    margin: 0;
}
body.dark .rh-section-header h2 { color: #e8eeff; }
.rh-section-header h2 em { font-style: italic; color: var(--primary); }
body.dark .rh-section-header h2 em { color: #90caf9; }

.rh-deputies-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.rh-dep-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(21,102,183,0.07);
    cursor: pointer;
    transition: transform 0.35s, box-shadow 0.35s;
    position: relative;
    opacity: 0;
    transform: translateY(32px);
}
.rh-dep-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s;
}
.rh-dep-card:nth-child(1) { transition-delay: 0s; }
.rh-dep-card:nth-child(2) { transition-delay: 0.1s; }
.rh-dep-card:nth-child(3) { transition-delay: 0.2s; }
.rh-dep-card:nth-child(4) { transition-delay: 0.3s; }
.rh-dep-card.visible:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 56px rgba(21,102,183,0.16);
}
.rh-dep-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
}
body.dark .rh-dep-card {
    background: #1a2740;
    border-color: rgba(255,255,255,0.07);
}

/* Rasm */
.rh-dep-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/3.5;
}
.rh-dep-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.rh-dep-card:hover .rh-dep-img { transform: scale(1.05); }

.rh-dep-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13,71,161,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}
.rh-dep-card:hover .rh-dep-overlay { opacity: 1; }
.rh-dep-overlay i {
    font-size: 28px;
    color: #fff;
    transform: scale(0.8);
    transition: transform 0.3s;
}
.rh-dep-card:hover .rh-dep-overlay i { transform: scale(1); }

/* Info */
.rh-dep-info { padding: 20px 20px 16px; }
.rh-dep-post {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.3px;
    margin-bottom: 6px;
    font-family: sans-serif;
    line-height: 1.4;
}
body.dark .rh-dep-post { color: #90caf9; }

.rh-dep-name {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--dark-bg);
    margin-bottom: 14px;
    line-height: 1.3;
}
body.dark .rh-dep-name { color: #e8eeff; }

.rh-dep-contacts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}
body.dark .rh-dep-contacts { border-color: rgba(255,255,255,0.07); }
.rh-dep-contacts a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    font-family: sans-serif;
    transition: color 0.2s;
}
.rh-dep-contacts a:hover { color: var(--primary); }
body.dark .rh-dep-contacts a { color: #94a3b8; }
body.dark .rh-dep-contacts a:hover { color: #90caf9; }
.rh-dep-contacts i { color: var(--primary); width: 14px; font-size: 11px; }
body.dark .rh-dep-contacts i { color: #90caf9; }

/* Nomer */
.rh-dep-number {
    position: absolute;
    top: 12px; right: 12px;
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    font-weight: 900;
    color: #fff;
    background: rgba(13,71,161,0.75);
    backdrop-filter: blur(4px);
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* ── MODAL ── */
.rh-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,22,48,0.7);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.rh-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.rh-modal {
    background: #fff;
    border-radius: 28px;
    display: grid;
    grid-template-columns: 280px 1fr;
    max-width: 1200px;
    width: 100%;
    max-height: 88vh;
    overflow: hidden;
    position: relative;
    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 32px 96px rgba(10,22,48,0.35);
}
.rh-modal-overlay.active .rh-modal {
    transform: translateY(0) scale(1);
}
body.dark .rh-modal { background: #1a2740; }

.rh-modal-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.07);
    color: var(--text);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, color 0.2s;
}
.rh-modal-close:hover { background: var(--primary); color: #fff; }
body.dark .rh-modal-close { background: rgba(255,255,255,0.08); color: #e2e8f0; }

/* Modal chap */
.rh-modal-left {
    background: linear-gradient(160deg, var(--primary-d), var(--primary));
    padding: 40px 28px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.rh-modal-img-wrap {
    position: relative;
}
.rh-modal-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    border: 3px solid rgba(255,255,255,0.2);
}
.rh-modal-img-decor {
    position: absolute;
    inset: -6px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);
}

.rh-modal-contacts-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.rh-modal-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: rgba(255,255,255,0.9);
}
.rh-modal-contact-item i {
    color: var(--gold);
    margin-top: 2px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}
.rh-modal-contact-label {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    font-family: sans-serif;
    margin-bottom: 2px;
}
.rh-modal-contact-val {
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    font-family: sans-serif;
    text-decoration: none;
}
a.rh-modal-contact-val:hover { color: var(--gold); }

/* Modal o'ng */
.rh-modal-right {
    max-height: 88vh;
    padding: 44px 40px;
    overflow-y: auto;
}
.rh-modal-rank {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
    font-family: sans-serif;
}
body.dark .rh-modal-rank { color: #90caf9; }
.rh-modal-name {
    font-family: 'Playfair Display', serif;
    font-size: clamp(22px, 2.5vw, 30px);
    font-weight: 900;
    color: var(--dark-bg);
    line-height: 1.2;
    margin-bottom: 6px;
}
body.dark .rh-modal-name { color: #e8eeff; }
.rh-modal-post {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 24px;
    font-family: sans-serif;
}
.rh-modal-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 4px;
    margin-bottom: 24px;
}
.rh-modal-bio p {
    font-size: 14.5px;
    line-height: 1.85;
    color: #4a5568;
    margin-bottom: 16px;
    font-weight: 300;
}
body.dark .rh-modal-bio p { color: #94a3b8; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .rh-deputies-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .rh-rector-card { grid-template-columns: 1fr; gap: 32px; padding: 28px; }
    .rh-rector-img-wrap { max-width: 240px; margin: 0 auto; }
    .rh-modal { grid-template-columns: 1fr; }
    .rh-modal-left { padding: 28px; flex-direction: row; flex-wrap: wrap; gap: 20px; }
    .rh-modal-img-wrap { width: 140px; flex-shrink: 0; }
    .rh-modal-contacts-box { flex: 1; min-width: 180px; }
    .rh-modal-right { padding: 24px; }
}
@media (max-width: 576px) {
    .rh-deputies-grid { grid-template-columns: 1fr; }
    .rh-modal-left { flex-direction: column; }
    .rh-modal-img-wrap { width: 100%; max-width: 200px; margin: 0 auto; }
}
/* Rich editor content — rahbariyat.css ga qo'shiladi */
.rh-modal-bio p              { margin-bottom: 12px; }
.rh-modal-bio p:last-child   { margin-bottom: 0; }
.rh-modal-bio ul,
.rh-modal-bio ol             { padding-left: 20px; margin-bottom: 12px; }
.rh-modal-bio li             { margin-bottom: 4px; }
.rh-modal-bio strong         { font-weight: 700; }
.rh-modal-bio em             { font-style: italic; }
.rh-modal-bio a              { color: var(--primary, #1566B7); text-decoration: underline; }
.rh-modal-bio a:hover        { color: var(--primary-d, #0d47a1); }
.rh-modal-bio h1, .rh-modal-bio h2, .rh-modal-bio h3,
.rh-modal-bio h4, .rh-modal-bio h5 {
    font-family: 'Playfair Display', serif;
    font-weight: 700; margin: 14px 0 8px; line-height: 1.3;
}
.rh-modal-bio blockquote {
    border-left: 3px solid var(--primary, #1566B7);
    padding-left: 14px; margin: 12px 0;
    color: #666; font-style: italic;
}
.rh-modal-bio img   { max-width: 100%; border-radius: 6px; margin: 8px 0; }
.rh-modal-bio table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.rh-modal-bio th,
.rh-modal-bio td    { border: 1px solid var(--border, #e5efff); padding: 8px 12px; font-size: 0.88rem; }
.rh-modal-bio th    { background: var(--light-bg, #f8faff); font-weight: 700; }