/* Tüm modal başlıkları — KKU: yatay kırmızı → lacivert geçiş; metin/ikon beyaz.
   Body sonunda yüklendiği için sayfa özel CSS üzerine yazar. */

:root {
    --kku-modal-header-bg: #b42828;
    --kku-modal-header-bg-deep: #961f22;
    --kku-modal-header-text: #ffffff;
    /* Sol: koyu bordo/kırmızı → sağ: kurumsal lacivert */
    --kku-modal-header-gradient: linear-gradient(90deg, #6f1418 0%, #8f1a1e 18%, #b42828 40%, #2a4a72 68%, #1a2942 100%);
    --kku-modal-header-gradient-hover: linear-gradient(90deg, #5c1114 0%, #751518 18%, #961f22 40%, #223d5e 68%, #132033 100%);
    --kku-modal-header-border: rgba(255, 255, 255, 0.12);
    /* Gradient üzeri eylem düğmeleri — hafif cam, beyaz ikon */
    --kku-modal-header-action-bg: rgba(255, 255, 255, 0.14);
    --kku-modal-header-action-bg-hover: rgba(255, 255, 255, 0.26);
    --kku-modal-header-action-border: rgba(255, 255, 255, 0.32);
}

/* Bootstrap 5 */
.modal .modal-header {
    background: var(--kku-modal-header-gradient) !important;
    color: var(--kku-modal-header-text) !important;
    border-bottom: 1px solid var(--kku-modal-header-border) !important;
}

.modal .modal-header .modal-title {
    color: var(--kku-modal-header-text) !important;
}

.modal .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(1.15);
    opacity: 0.9;
}

.modal .modal-header .btn-close:hover {
    opacity: 1;
}

/* Ortak başlık kapsayıcıları */
.kku-modal-header,
.etkinlik-modal-header,
.share-modal-header,
.personel-biyografi-modal-header,
.personel-qr-modal-header,
.personel-share-modal-header,
.kku-pdf-viewer-modal-header,
.arastirma-modal-header,
.duyuru-view-modal .etkinlik-modal-header {
    background: var(--kku-modal-header-gradient) !important;
    color: var(--kku-modal-header-text) !important;
    border-bottom: 1px solid var(--kku-modal-header-border) !important;
}

/* İstatistik ağaçları — üst şerit + fakülte satırı */
.fakulte-list-header,
.bolum-tree-fakulte-header {
    background: var(--kku-modal-header-gradient) !important;
    color: var(--kku-modal-header-text) !important;
}

.bolum-tree-fakulte-header:hover {
    background: var(--kku-modal-header-gradient-hover) !important;
}

.program-tree-fakulte-header,
.program-tree-bolum-header,
.program-tree-direct-header {
    background: var(--kku-modal-header-gradient) !important;
    color: var(--kku-modal-header-text) !important;
}

.program-tree-fakulte-header:hover,
.program-tree-bolum-header:hover {
    background: var(--kku-modal-header-gradient-hover) !important;
}

/* Personel / PDF başlık metinleri */
.personel-qr-modal-title,
.personel-biyografi-modal-title,
.arastirma-modal-header h5 {
    color: var(--kku-modal-header-text) !important;
}

.personel-biyografi-modal-title i {
    color: rgba(255, 255, 255, 0.92) !important;
}

/* Sağ üst: genişlet / kapat / paylaş — gradient üzerinde cam, beyaz ikon */
.kku-modal-expand,
.kku-modal-close,
.kku-modal-header-fullpage,
.kku-modal-header .kku-modal-expand--light,
.personel-biyografi-modal-header .kku-modal-expand--light,
.personel-qr-modal-header .kku-modal-expand--light,
.etkinlik-modal-share,
.etkinlik-modal-close,
.share-modal-close,
.kku-pdf-viewer-maximize,
.kku-pdf-viewer-tablink,
.kku-pdf-viewer-modal-close,
.personel-share-modal-close,
.personel-qr-modal-close,
.personel-biyografi-modal-close {
    background: var(--kku-modal-header-action-bg) !important;
    border: 1px solid var(--kku-modal-header-action-border) !important;
    color: #fff !important;
    border-radius: 6px !important;
    backdrop-filter: blur(6px) !important;
}

.kku-modal-expand:hover,
.kku-modal-close:hover,
.kku-modal-header-fullpage:hover,
.kku-modal-header .kku-modal-expand--light:hover,
.personel-biyografi-modal-header .kku-modal-expand--light:hover,
.personel-qr-modal-header .kku-modal-expand--light:hover,
.etkinlik-modal-share:hover,
.etkinlik-modal-close:hover,
.share-modal-close:hover,
.kku-pdf-viewer-maximize:hover,
.kku-pdf-viewer-tablink:hover,
.kku-pdf-viewer-modal-close:hover,
.personel-share-modal-close:hover,
.personel-qr-modal-close:hover,
.personel-biyografi-modal-close:hover {
    background: var(--kku-modal-header-action-bg-hover) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    color: #fff !important;
    transform: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.etkinlik-modal-share:hover,
.etkinlik-modal-close:hover,
.share-modal-close:hover {
    transform: none;
}

/* Birim araştırma alanı modalı — BS4 tarzı .close */
.arastirma-modal-header .close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
    padding: 0 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    background: var(--kku-modal-header-action-bg) !important;
    border: 1px solid var(--kku-modal-header-action-border) !important;
    color: #fff !important;
    border-radius: 6px !important;
}
