/* =========================================
   AkademikPortal — Profil sayfası stilleri
   ========================================= */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --navy: #060d1a; --navy2: #0b1629; --navy3: #0f1e38;
    --teal: #1D9E75; --teal2: #5DCAA5;
    --blue: #185FA5; --blue2: #378ADD;
    --border: rgba(29,158,117,0.18); --border2: rgba(29,158,117,0.08);
    --dim: rgba(255,255,255,0.38); --mid: rgba(255,255,255,0.65);
    --bg: #f6f7f9; --bg2: #ffffff;
    --ink: #0f1e38; --ink-mid: #6b7a90; --ink-dim: #9aa5b8;
    --line: #e3e7ed; --line2: #eef1f4;
    --accent: #1D9E75; --accent2: #147a5a; --accent-bg: rgba(29,158,117,0.06);
    --live-red: #ef4444;
}

html, body {
    min-height: 100vh;
    background: var(--bg); color: var(--ink);
    font-weight: 300; line-height: 1.7;
    margin: 0; padding: 0;
    font-family: 'Roboto', 'Arial Narrow', Arial, sans-serif;
}

.ap-page {
    display: grid;
    grid-template-columns: 380px 1fr;
    min-height: 100vh;
}

/* ────────── SIDEBAR (dark) ────────── */
.ap-sidebar {
    background: var(--navy2); color: #fff;
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: sticky; top: 0;
    height: 100vh; overflow-y: auto;
}

.ap-sidebar-header {
    padding: 2rem 2rem 0rem;
    border-bottom: 1px solid var(--border2);
    background: linear-gradient(180deg, rgba(29,158,117,0.06) 0%, transparent 100%);
}

.ap-sidebar-hr {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 0.5rem 2rem;
}

.ap-logo-row {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 1.5rem;
}

.ap-logo-emblem a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ap-logo-emblem {
    width: 100%; height: 44px;
    display: flex; align-items: center; justify-content: center;
}
.ap-logo-emblem img {
    /*max-width: 100%; max-height: 100%;*/
    height: 65px !important;
    object-fit: contain;
}

/* PROFİL FOTOĞRAFI */
.ap-avatar-area { text-align: center; margin-bottom: 0.5rem; }

.ap-profile-photo {
    width: 100%; max-width: 130px;
    aspect-ratio: 375 / 500;
    margin: 0 auto 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(29,158,117,0.05) 0%, rgba(0,0,0,0.25) 100%),
                linear-gradient(135deg, var(--navy3) 0%, #17365e 100%);
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.ap-profile-photo img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.ap-profile-photo-frame {
    position: absolute; inset: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px; pointer-events: none;
}

.ap-prof-name {
    font-size: 22px; font-weight: 500;
    color: #fff; margin-bottom: 4px;
    line-height: 1.2;
}
.ap-prof-title {
    font-size: 14px; color: var(--teal2);
    letter-spacing: 2px; text-transform: uppercase;
    margin-top: 6px;
}

/* ── AKSİYON BUTON GRUBU ── */
.ap-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 1rem 0 0.25rem;
}

/* ── AĞ BUTONU (canlı kırmızı nokta) ── */
.ap-network-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%;
    padding: 0.7rem 0.6rem;
    background: linear-gradient(180deg, rgba(29,158,117,0.14) 0%, rgba(29,158,117,0.06) 100%);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--teal2);
    font-size: 11px; letter-spacing: 1px;
    text-transform: uppercase; font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    position: relative;
    white-space: nowrap;
}
.ap-network-btn:hover {
    background: linear-gradient(180deg, rgba(29,158,117,0.22) 0%, rgba(29,158,117,0.10) 100%);
    border-color: var(--teal);
}
.ap-network-btn:active { transform: scale(0.98); }

.ap-network-btn-label { flex: 0 1 auto; text-align: center; }
.ap-network-btn-arrow { font-size: 14px; opacity: 0.6; flex-shrink: 0; }

.ap-network-btn > i {
    font-size: 12px;
    flex-shrink: 0;
    opacity: 0.85;
}

.ap-live-dot {
    position: relative;
    width: 10px; height: 10px;
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.ap-live-dot::before {
    content: '';
    width: 8px; height: 8px;
    background: var(--live-red);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--live-red);
    z-index: 2;
}
.ap-live-dot .pulse {
    position: absolute; inset: 0;
    border-radius: 50%;
    background: var(--live-red);
    opacity: 0.6;
    animation: ap-pulse 1.6s ease-out infinite;
    z-index: 1;
}
@keyframes ap-pulse {
    0%   { transform: scale(0.8); opacity: 0.6; }
    70%  { transform: scale(2.4); opacity: 0;   }
    100% { transform: scale(2.4); opacity: 0;   }
}

.ap-yearchart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 110px;
    padding: 8px 0 0;
    margin-top: 14px;
}

.ap-yearchart-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    cursor: pointer;
}

.ap-yearchart-bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    padding-bottom: 2px;
}

.ap-yearchart-value {
    display: none;
}

.ap-yearchart-bar {
    width: 75%;
    background: rgba(255, 255, 255, .3);
    border-radius: 2px 2px 0 0;
    transition: background .2s ease;
    min-height: 2px;
}

.ap-yearchart-col:hover .ap-yearchart-bar {
    background: var(--teal2, #20c997);
}

.ap-yearchart-label {
    font-size: 11px;
    color: rgba(255, 255, 255, .55);
    margin-top: 6px;
    font-weight: 600;
    line-height: 1;
    transform: rotate(-45deg);
    transform-origin: center;
    white-space: nowrap;
    height: 16px;
}

.ap-yearchart-col > * {
    pointer-events: none;
}

/* H-INDEX KARTLARI */
.ap-hindex-row {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px; margin-top: 0.75rem;
}
.ap-hindex-card {
    background: linear-gradient(180deg, rgba(29,158,117,0.12) 0%, rgba(29,158,117,0.04) 100%);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.75rem 0.5rem;
    text-align: center;
}
.ap-hindex-source {
    font-size: 11px; letter-spacing: 2px;
    color: var(--teal2); text-transform: uppercase;
    margin-bottom: 4px; font-weight: 500;
}
.ap-hindex-value {
    font-size: 30px; font-weight: 400;
    color: #fff; line-height: 1;
    margin-bottom: 2px;
}
.ap-hindex-label {
    font-size: 9px; letter-spacing: 1.5px;
    color: var(--dim); text-transform: uppercase;
}

/* AKADEMİK PROFİLLER (H-index altında) */
.ap-profiles-block {
    padding-top: 1rem;
    text-align: center;
}
.ap-profiles-label {
    font-size: 13px; letter-spacing: 3px;
    text-transform: uppercase; color: var(--teal);
    margin-bottom: 0.6rem;
    font-weight: 500;
}
.ap-link-pills {
    display: flex; flex-wrap: wrap;
    gap: 8px; align-items: center; justify-content: center;
}
.ap-link-pills a img {
    width: 30px; height: 30px;
    opacity: 0.85; transition: opacity 0.2s;
    border-radius: 20px;
    background: #fff;
    padding: 3px;
}
.ap-link-pills a:hover img { opacity: 1; }

/* NAV */
.ap-sidebar-nav { flex: 1; }
.ap-nav-section { padding: 0 2rem; margin-bottom: 1.5rem; }
.ap-nav-section-label {
    padding-top:25px;font-size: 14px; letter-spacing: 3px;
    text-transform: uppercase; color: var(--teal);
    font-weight: 500;
}

.ap-yearchart-col.is-outlier .ap-yearchart-bar {
    background: rgba(111, 66, 193, .55);
}
.ap-yearchart-col.is-outlier:hover .ap-yearchart-bar {
    background: #6f42c1;
}

.ap-contact-item {
    display: flex; align-items: flex-start;
    gap: 10px; margin-bottom: 0.75rem;
    font-size: 13px; color: var(--mid);
}
.ap-contact-icon {
    width: 16px; height: 16px;
    border: 1px solid var(--border);
    border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 2px;
}
.ap-contact-icon svg {
    width: 8px; height: 8px; fill: var(--teal2);
}

.ap-stat-chart-wrap {
    width: 100%;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #e4e6ef;
    border-radius: 6px;
    padding: 12px 8px 4px;
}

.ap-degree-item {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border2);
}
.ap-degree-item:last-child { border-bottom: none; }
.ap-degree-year {
    font-size: 14px; color: var(--teal2);
    letter-spacing: 1px; margin-bottom: 2px; font-weight: 500;
}
.ap-degree-name {
    font-size: 13px; color: #fff;
    margin-bottom: 1px; line-height: 1.4;
}
.ap-degree-uni {
    font-size: 13px; color: var(--dim); line-height: 1.4;
}

.ap-tag {
    font-size: 11px; color: var(--mid);
    border: 1px solid var(--border2);
    border-radius: 3px; padding: 4px 8px;
    display: inline-block; margin: 0 4px 4px 0;
}

.ap-sdg-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-sdg-row img {
    width: 42px; height: 42px; border-radius: 4px;
}

.ap-sidebar-footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border2);
    font-size: 10px; color: var(--dim);
    letter-spacing: 1px; text-align: center;
}

/* ────────── MAIN (light) ────────── */
.ap-main {
    overflow-y: auto;
    background: var(--bg); color: var(--ink);
}

.ap-stats-hero {
    background: var(--bg2);
    border-bottom: 1px solid var(--line);
    padding: 2rem 3rem;
}
.ap-stats-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem;
}
.ap-stats-title-row {
    display: flex; align-items: center; gap: 0.9rem;
}
.ap-stats-title-row .ap-line {
    width: 32px; height: 1px; background: var(--accent);
}
.ap-stats-title-row h2 {
    font-size: 13px; letter-spacing: 4px;
    text-transform: uppercase; color: var(--accent2);
    font-weight: 500; margin: 0;
}
.ap-stats-meta {
    font-size: 11px; color: var(--ink-mid); letter-spacing: 1px;
}

.ap-stat-icon {
    font-size: 22px;
    color: var(--accent2);
    margin-bottom: 10px;
    opacity: .85;
}

.ap-stats-grid {
    display: grid; gap: 1px;
    background: var(--line); border: 1px solid var(--line);
    border-radius: 8px; overflow: hidden;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}
.ap-stat-box {
    background: var(--bg2);
    padding: 1.2rem 1rem; text-align: center;
    transition: background 0.2s; cursor: default;
}
.ap-stat-box:hover { background: var(--accent-bg); }
.ap-stat-num {
    font-size: 32px; font-weight: 400;
    color: var(--accent2); line-height: 1;
    margin-bottom: 6px;
}
.ap-stat-label {
    font-size: 10px; letter-spacing: 2px;
    text-transform: uppercase; color: var(--ink-mid);
}

.ap-content-body { padding: 2.5rem 3rem 4rem; }

.ap-section { margin-bottom: 2.5rem; }
.ap-section-header {
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1.25rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}
.ap-section-line {
    width: 32px; height: 1px; background: var(--accent);
}
.ap-section-title {
    font-size: 13px; letter-spacing: 4px;
    text-transform: uppercase; color: var(--accent2);
    font-weight: 500; margin: 0;
}
.ap-section-count {
    margin-left: auto;
    font-size: 10px; color: var(--ink-dim); letter-spacing: 1px;
}

/* ── İNDEKS YAYIN SAYILARI GRID ── */
.ap-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}
.ap-index-card {
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.2rem 1rem;
    text-align: center;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
    cursor: default;
    position: relative;
}
.ap-index-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(29,158,117,0.10);
}
.ap-index-card::before {
    content: '';
    position: absolute; top: 0; left: 50%;
    transform: translateX(-50%);
    width: 30%; height: 2px;
    background: var(--accent);
    opacity: 0; transition: opacity 0.2s;
}
.ap-index-card:hover::before { opacity: 1; }

.ap-index-num {
    font-size: 34px; font-weight: 500;
    color: var(--accent2); line-height: 1;
    margin-bottom: 8px;
}
.ap-index-code {
    font-size: 11px; letter-spacing: 2px;
    text-transform: uppercase; color: var(--ink-mid);
    font-weight: 500;
}

/* TABS */
.ap-tabs-row {
    display: flex; flex-wrap: wrap; gap: 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.5rem;
}
.ap-tab {
    font-size: 13px; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--ink-mid);
    padding: 0.75rem 1.1rem;
    border: 0; border-bottom: 2px solid transparent;
    cursor: pointer; margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
    background: none; 
    font-weight: bold;
}
.ap-tab.active {
    color: var(--accent2); border-bottom-color: var(--accent);
}
.ap-tab:hover { color: var(--ink); }

/* LIST CARDS */
.ap-list { display: flex; flex-direction: column; gap: 10px; }
.ap-list-card {
    background: var(--bg2);
    border: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 4px;
    padding: 1rem 1.3rem;
    display: grid; grid-template-columns: 32px 1fr;
    gap: 0.75rem; align-items: start;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ap-list-card:hover {
    border-left: 3px solid var(--accent);
    box-shadow: 0 4px 12px rgba(15,30,56,0.06);
}
.ap-list-n {
    font-size: 20px; font-weight: 400;
    color: var(--accent); line-height: 1.3;
}
.ap-list-title {
    font-size: 14.5px; color: var(--ink);
    font-weight: 500; line-height: 1.55;
    margin-bottom: 4px;
}
.ap-list-title a { color: var(--ink); text-decoration: none; }
.ap-list-title a:hover { color: var(--accent2); }

.ap-list-meta {
    font-size: 13.5px; color: var(--ink-mid);
    font-style: italic; margin-bottom: 4px;
}
.ap-list-authors {
    font-size: 13.5px; color: var(--ink-mid); line-height: 1.5;
}
.ap-list-authors a {
    color: var(--blue); text-decoration: none;font-weight: bold;
}
.ap-list-authors a:hover { text-decoration: underline; }

.ap-subhead {
    font-size: 20px; font-weight: 500;
    color: var(--accent2);
    margin: 1.25rem 0 0.75rem;
    padding-left: 4px;
}

.ap-icon-disabled {
    display: inline-flex;
    align-items: center;
    cursor: not-allowed;
    margin-bottom:6px;
}
.ap-icon-disabled img {
    filter: grayscale(100%);
}

.ap-inline-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.ap-sdg-dot {
    display: inline-block;
    width: 18px !important;
    height: 18px !important;
    border-radius: 4px;
    margin-bottom: 6px;
    margin-left:5px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
    border: 1px solid rgba(0, 0, 0, .08);
}
.ap-sdg-dot:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.ap-inline-icons img {
    width: 18px; height: 18px; border-radius: 3px;
}

.ap-sdg-row img {
    width: 42px; height: 42px; border-radius: 4px;
    transition: transform 0.2s;
    cursor: default;
}
.ap-sdg-row img:hover {
    transform: translateY(-3px) scale(1.05);
}

/* TAB PANELS — Fallback: Bootstrap yüklenmeden önce sadece aktif görünsün */
.tab-pane { display: none; }
.tab-pane.show.active,
.tab-pane.active { display: block; }

/* Loader */
.ap-page-loader {
    position: fixed; inset: 0;
    background: var(--bg); z-index: 9999;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    transition: opacity 0.3s;
}
.ap-page-loader.hidden {
    opacity: 0; pointer-events: none;
}
.ap-page-loader .spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--line);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: ap-spin 0.8s linear infinite;
}
.ap-page-loader span {
    margin-top: 12px;
    font-size: 11px; letter-spacing: 3px;
    color: var(--accent2); text-transform: uppercase;
}
@keyframes ap-spin { to { transform: rotate(360deg); } }

/* Network modal */
#graph-container {
    width: 100%; height: 70vh;
    background: var(--bg);
    border-radius: 6px;
}
.ap-paper-dialog-wide {
    max-width: 1100px;
}

.ap-graph-wrap {
    width: 100%;
    height: 480px;
    background: #fff;
    border: 1px solid #e4e6ef;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.ap-graph-wrap #graph-container {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .ap-graph-wrap { height: 450px; }
}

.ap-sidebar {
    overflow-y: auto !important;
    scrollbar-width: thin;                    /* Firefox */
    scrollbar-color: var(--border) transparent; /* Firefox */
}

.ap-sidebar::-webkit-scrollbar { width: 6px; }
.ap-sidebar::-webkit-scrollbar-track { background: transparent; }
.ap-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.ap-main *::-webkit-scrollbar { width: 6px; height: 6px; }
.ap-main *::-webkit-scrollbar-track { background: transparent; }
.ap-main *::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

/* Footer */
.ap-footer {
    background: var(--bg2);
    border-top: 1px solid var(--line);
    padding: 1.5rem 3rem;
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: space-between;
    gap: 1rem;
}
.ap-footer a {
    color: var(--ink-mid); text-decoration: none; font-size: 12px;
}
.ap-footer a:hover { color: var(--accent2); }
.ap-footer .brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 500; color: var(--ink);
    font-size: 12px; letter-spacing: 1px;
}
.ap-footer .brand img { height: 34px; }

.scrolltop {
    position: fixed; right: 20px; bottom: 20px;
    width: 40px; height: 40px;
    background: var(--accent); color: #fff;
    border-radius: 50%;
    display: none; align-items: center; justify-content: center;
    cursor: pointer; z-index: 100;
    box-shadow: 0 4px 12px rgba(29,158,117,0.3);
    font-size: 18px;
}
.scrolltop.show { display: flex; }

/* ────────── MOBİL ────────── */
@media (max-width: 991px) {
    .ap-page { grid-template-columns: 1fr; }
    .ap-sidebar {
        position: relative;
    }
    .ap-stats-hero, .ap-content-body {
        padding-left: 1.25rem; padding-right: 1.25rem;
    }
    .ap-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    }
    .ap-index-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}
/* ────────── Bootstrap 5 Modal ────────── */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1055;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}
.modal.show .modal-dialog {
    transform: none;
}
.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    pointer-events: none;
}
.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}
.modal-xl {
    max-width: 1140px;
}
@media (max-width: 1199.98px) {
    .modal-xl { max-width: 900px; }
}
@media (max-width: 991.98px) {
    .modal-xl { max-width: 720px; }
}
.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.175);
    border-radius: 0.5rem;
    outline: 0;
}
.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    border-bottom: 1px solid var(--line);
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}
.modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    font-weight: 500;
    color: var(--ink);
    font-size: 22px;
}
.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}
.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3E%3Cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3E%3C/svg%3E") center/1em auto no-repeat;
    border: 0;
    border-radius: 0.375rem;
    opacity: 0.5;
    cursor: pointer;
}
.btn-close:hover {
    opacity: 0.75;
}
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}
.modal-backdrop.fade { opacity: 0; }
.modal-backdrop.show { opacity: 0.5; }

body.modal-open {
    overflow: hidden;
}

.ap-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.ap-main .ap-content-body {
    flex: 1;
}

/* ────────── Yazar listesi — +N daha butonu ────────── */
.ap-more-authors {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 10px;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: var(--accent2);
    background: var(--accent-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.ap-more-authors:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.ap-authors-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ap-author-row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 4px;
    transition: background 0.15s;
}
.ap-author-row:hover {
    background: var(--accent-bg);
}
.ap-author-n {
    font-size: 14px;
    color: var(--ink-mid);
    font-weight: 500;
    background: var(--line2);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ap-author-name {
    font-size: 14px;
    color: var(--ink);
    font-weight: 500;
    text-decoration: none;
}
a.ap-author-name:hover {
    color: var(--accent2);
}
.ap-author-bolum {
    font-size: 11px;
    color: var(--ink-mid);
    font-style: italic;
    text-align: right;
}
.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.modal[id^="authorsModal_"] .modal-dialog {
    max-width: 500px;
}

.modal[id^="authorsModal_"] .modal-body {
    max-height: 60vh;
}

.ap-index-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    border-radius: 3px;
    border: 1px solid;
    line-height: 1.5;
    vertical-align: middle;
    white-space: nowrap;
    font-family: system-ui, -apple-system, sans-serif;
}

/* SCI / SCI EXPANDED */
.ap-index-sci      { background: #e8f5ee; color: #0f5132; border-color: #b6dfc4; }

/* SCI EXPANDED */
.ap-index-sci-exp  { background: #f0faf3; color: #198754; border-color: #cdebd6; }

/* SSCI */
.ap-index-ssci     { background: #fff4e6; color: #b35900; border-color: #ffd9a8; }

/* AHCI */
.ap-index-ahci     { background: #f3eaff; color: #5a2d8c; border-color: #e0ccf5; }

/* ESCI */
.ap-index-esci     { background: #e8f4ff; color: #1a6b9d; border-color: #c5e0f5; }

/* SCOPUS*/
.ap-index-scopus   { background: #fde8ec; color: #c0392b; border-color: #f5c6cd; }

/* ULAKBİM TR DİZİN */
.ap-index-tr       { background: #fff8e1; color: #8a6d00; border-color: #f5e3a1; }

.ap-index-default  { background: #f1f3f5; color: #495057; border-color: #dee2e6; }

.tooltip.ap-tooltip {
  --bs-tooltip-max-width: 320px;
  --bs-tooltip-padding-x: 12px;
  --bs-tooltip-padding-y: 8px;
  --bs-tooltip-font-size: 12px;
  opacity: 1 !important;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .15));
}
.tooltip.ap-tooltip .tooltip-inner {
  background-color: #fff !important;
  color: #1e2129 !important;
  border: 1px solid #e4e6ef !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  text-align: left !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08) !important;
  max-width: 320px !important;
}
.tooltip.ap-tooltip.bs-tooltip-top .tooltip-arrow::before,
.tooltip.ap-tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
  border-top-color: #e4e6ef !important;
}
.tooltip.ap-tooltip.bs-tooltip-bottom .tooltip-arrow::before,
.tooltip.ap-tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
  border-bottom-color: #e4e6ef !important;
}
.tooltip.ap-tooltip.bs-tooltip-start .tooltip-arrow::before,
.tooltip.ap-tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
  border-left-color: #e4e6ef !important;
}
.tooltip.ap-tooltip.bs-tooltip-end .tooltip-arrow::before,
.tooltip.ap-tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
  border-right-color: #e4e6ef !important;
}

/* =========================================
   Makale Detay Modal — Scientific Paper UI
   ========================================= */
.ap-paper-modal {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}

.ap-paper-header {
    background: linear-gradient(135deg, #0f5132 0%, #198754 100%);
    color: #fff;
    padding: 28px 32px;
    border-bottom: 4px solid #ffc107;
    align-items: flex-start;
}

.ap-paper-header-inner { flex: 1; min-width: 0; }

.ap-paper-badge {
    display: inline-block;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.ap-paper-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.ap-paper-journal {
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
    font-style: italic;
    font-weight: 500;
}

.ap-paper-header .btn-close {
    opacity: .8;
    margin-top: 4px;
}

.ap-paper-body {
    padding: 28px 32px;
    background: #fafbfc;
}

.ap-paper-loading {
    text-align: center;
    padding: 60px 20px;
}

.ap-paper-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #dee2e6;
}

.ap-paper-chip {
    background: #fff;
    border: 1px solid #e4e6ef;
    color: #5e6278;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: .3px;
}

.ap-paper-chip-link {
    text-decoration: none;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all .15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.ap-paper-chip-link i { font-size: 9px; opacity: .7; }

.ap-paper-chip-link.wos {
    background: #f3eaff;
    color: #5a2d8c;
    border-color: #e0ccf5;
    line-height: 4px !important;
}
.ap-paper-chip-link.wos:hover {
    background: #5a2d8c;
    color: #fff;
    border-color: #5a2d8c;
}

.ap-paper-chip-link.scopus {
    background: #fde8ec;
    color: #c0392b;
    border-color: #f5c6cd;
    line-height: 4px !important;
}
.ap-paper-chip-link.scopus:hover {
    background: #c0392b;
    color: #fff;
    border-color: #c0392b;
}

.ap-paper-chip-link.ap-paper-chip:not(:last-child)::after { content: none; }

.ap-chip-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 2px;
    border-radius: 50%;
}

.ap-paper-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.ap-metric-card {
    background: #fff;
    border: 1px solid #e4e6ef;
    border-radius: 8px;
    padding: 16px 12px;
    text-align: center;
    transition: all .2s ease;
}

.ap-metric-card:hover {
    border-color: #198754;
    box-shadow: 0 4px 12px rgba(25, 135, 84, .12);
    transform: translateY(-2px);
}

.ap-metric-num {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}

.ap-metric-label {
    font-size: 10px;
    font-weight: 600;
    color: #7e8299;
    letter-spacing: .5px;
}

/* =========================================
   Makale Detay Modal — Global Academic UI
   ========================================= */

.ap-paper-dialog {
    max-width: 820px;
}

.ap-paper-modal {
    position: relative;
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(6, 13, 26, 0.12);
    overflow: hidden;
}

.ap-paper-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    opacity: 0.6;
    transition: all 0.2s ease;
    background-color: var(--bg);
    border-radius: 50%;
    padding: 10px;
}
.ap-paper-close:hover { 
    opacity: 1; 
    background-color: var(--line2);
}

.ap-paper-body {
    background: var(--bg2);
    padding: 50px 60px 40px 60px;
}

.ap-paper-loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--ink-mid);
}

/* ---- Paper Header ---- */
.ap-paper-head {
    margin-bottom: 24px;
}

.ap-paper-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-bg);
    padding: 6px 12px;
    border-radius: 4px;
    margin-bottom: 18px;
}

.ap-paper-title {
    font-family: 'Merriweather', 'Georgia', 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--navy);
    margin: 0 0 12px 0;
    letter-spacing: -0.3px;
}

.ap-paper-journal {
    font-size: 15px;
    font-weight: 500;
    color: var(--blue);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ---- Paper Meta Bar (Cilt, Sayı, ISSN) ---- */
.ap-paper-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 8px;
}

.ap-paper-chip {
    background: var(--bg);
    color: var(--ink-mid);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid var(--line2);
    display: inline-flex;
    align-items: center;
}

/* ---- Dividers ---- */
.ap-paper-divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 32px 0;
    opacity: 1;
}

/* ---- Metrics (Atıf ve Referanslar) ---- */
.ap-paper-metrics-section {
    margin-bottom: 28px;
}

.ap-paper-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #7e8299;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ap-paper-section-label::before {
    content: '';
    width: 4px;
    height: 14px;
    background: #198754;
    border-radius: 2px;
}

.ap-paper-metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    background: transparent;
    border: none;
}

.ap-metric-card {
    position: relative;
    padding: 18px 10px 14px 10px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e4e6ef;
    border-radius: 8px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    overflow: hidden;
}

.ap-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(6, 13, 26, .08);
    border-color: #d0d4dc;
}

.ap-metric-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--blue2);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -.5px;
}

.ap-metric-card img {
    display: block;
    width: 45px;
    height: 26px;
    margin: 4px auto 8px;
    object-fit: contain;
    opacity: .85;
}

.ap-metric-icon-bi {
    display: block;
    font-size: 24px;
    line-height: 1;
    margin: 4px auto 8px;
    color: #6f42c1;
}

.ap-metric-label {
    font-size: 11px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: .6px;
    line-height: 1.3;
}

.ap-metric-sublabel {
    display: block;
    font-size: 9px;
    color: #a1a5b7;
    margin-top: 3px;
    font-weight: 600;
    letter-spacing: .5px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .ap-paper-metrics { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .ap-metric-card { padding: 14px 8px 12px; }
    .ap-metric-num { font-size: 22px; }
}

@media (max-width: 576px) {
    .ap-paper-metrics { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
/* ---- Sections (Bibliographic Info) ---- */
.ap-paper-section { 
    margin-bottom: 32px;
}

.ap-paper-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--line);
}

.ap-paper-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 32px;
    background: var(--bg2);
}

.ap-paper-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ap-paper-info-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ap-paper-info-value {
    font-size: 14px;
    color: var(--ink);
    font-weight: 500;
    word-break: break-word;
}

/* ---- Abstract ---- */
.ap-paper-abstract {
    background: var(--bg);
    padding: 24px 32px;
    border-left: 4px solid var(--accent);
    border-radius: 0 6px 6px 0;
    font-size: 15px;
    line-height: 1.85;
    color: var(--ink);
    text-align: justify;
    hyphens: auto;
}

/* ---- Footer & Buttons ---- */
.ap-paper-footer {
    background: var(--bg);
    border-top: 1px solid var(--line);
    padding: 20px 32px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
}

.btn-ap-primary, 
.btn-ap-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none !important;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ap-primary {
    background-color: var(--accent);
    color: #ffffff !important;
    border: 1px solid var(--accent);
}

.btn-ap-primary:hover {
    background-color: var(--accent2);
    border-color: var(--accent2);
}

.btn-ap-secondary {
    background-color: var(--bg2);
    color: var(--ink-mid);
    border: 1px solid var(--line);
}

.btn-ap-secondary:hover {
    background-color: var(--line2);
    color: var(--ink);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .ap-paper-body { padding: 40px 30px 24px 30px; }
    .ap-paper-title { font-size: 22px; }
    .ap-paper-metrics { gap: 12px; }
    .ap-metric-card { padding: 16px 8px; }
    .ap-metric-num { font-size: 24px; }
    .ap-paper-abstract { padding: 20px; }
}

@media (max-width: 576px) {
    .ap-paper-dialog { margin: 12px; }
    .ap-paper-body { padding: 32px 20px 20px 20px; }
    .ap-paper-metrics { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .ap-paper-info-grid { grid-template-columns: 1fr; gap: 12px 0; }
    .ap-paper-abstract { text-align: left; }
    .ap-paper-footer { flex-direction: column-reverse; padding: 16px; }
    .btn-ap-primary, .btn-ap-secondary { width: 100%; }
}