/* En Çok Atıf Alan Akademisyenler - Premium Animasyonlu Tasarım */

#enbasarililar-container.trend-chart-container {
    overflow: visible;
    min-height: auto;
    padding-bottom: 0.5rem;
}

/* duyurular.css .trend-analysis-container { overflow: hidden } kart altını kesiyordu */
.trend-analysis-container.enbasarililar-section,
.trend-analysis-container:has(.enbasarililar-swiper) {
    overflow: visible;
    padding-bottom: 0.75rem;
}

.enbasarililar-swiper {
    position: relative;
    margin: 0;
    padding: 0.75rem 44px 1.75rem;
    overflow: visible;
    --eb-photo-ratio: 3 / 4;
    --eb-photo-min-h: 300px;
}

.enbasarililar-swiper.swiper {
    overflow: visible;
}

.enbasarililar-swiper .swiper-wrapper {
    align-items: stretch;
    padding-bottom: 0.75rem;
}

.enbasarililar-swiper.swiper,
.enbasarililar-swiper .swiper-wrapper {
    max-height: none !important;
    overflow: visible !important;
}

.enbasarililar-swiper .swiper-slide {
    display: flex;
    align-self: stretch;
    height: auto;
    min-height: 100%;
    overflow: visible !important;
    box-sizing: border-box;
}

/* Boş durum */
.trend-chart-container:has(.enbasarililar-swiper .swiper-slide:only-child) {
    display: flex;
    justify-content: center;
    align-items: center;
}
.enbasarililar-swiper:has(.swiper-slide:only-child) {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 280px;
    width: 100%;
}
.enbasarililar-swiper .swiper-wrapper:has(.swiper-slide:only-child) {
    justify-content: center;
    align-items: center;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
}
.enbasarililar-swiper .swiper-slide:only-child {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 260px;
}
.enbasarililar-swiper .swiper-slide:only-child .empty-state-card {
    min-height: 280px;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.enbasarililar-swiper .swiper-slide:only-child .empty-state-title,
.enbasarililar-swiper .swiper-slide:only-child .empty-state-description {
    text-align: center;
}

/* ============================================
   KART LİNK SARMALAYICI
   ============================================ */
.academic-card-link {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 100%;
    text-decoration: none;
    color: inherit;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.academic-card-link:focus-visible {
    outline: 2px solid rgba(148, 163, 184, 0.55);
    outline-offset: 3px;
    border-radius: 20px;
}

.academic-card-link:hover,
.academic-card-link:focus,
.academic-card-link:active,
.academic-card-link:visited {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   KART ANA YAPISI
   ============================================ */
.academic-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e8ecf0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    transition: border-color 0.25s ease, box-shadow 0.3s ease, transform 0.3s ease;
    width: 100%;
    flex: 1 1 auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.academic-card::before {
    display: none;
}

.academic-card:hover::before {
    display: none;
}

.academic-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: left 0.8s ease;
    z-index: 15;
    pointer-events: none;
}

.academic-card:hover::after {
    left: 150%;
}

.swiper-slide-active .academic-card {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.09);
    transform: scale(1);
}

.swiper-slide-prev .academic-card,
.swiper-slide-next .academic-card {
    opacity: 0.8;
    transform: scale(0.96);
}

.swiper-slide:not(.swiper-slide-active):not(.swiper-slide-prev):not(.swiper-slide-next) .academic-card {
    opacity: 0.85;
    transform: scale(0.92);
}

.academic-card:hover {
    transform: translateY(-3px);
    border-color: #d8dee9;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
    opacity: 1 !important;
}

/* ============================================
   RANK BADGE (Sıralama Rozeti)
   ============================================ */
.academic-rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    animation: badgePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.academic-rank-badge.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.6);
    animation: badgePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both, goldPulse 2s ease-in-out infinite;
}

.academic-rank-badge.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    box-shadow: 0 4px 16px rgba(192, 192, 192, 0.5);
}

.academic-rank-badge.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #A0522D);
    box-shadow: 0 4px 16px rgba(205, 127, 50, 0.5);
}

.academic-rank-badge.rank-other {
    background: linear-gradient(135deg, #003366, #004080);
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.4);
    font-size: 0.9rem;
}

/* ============================================
   PROFİL FOTOĞRAFI ALANI
   ============================================ */
.academic-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: var(--eb-photo-ratio, 3 / 4);
    height: auto;
    min-height: var(--eb-photo-min-h, 300px);
    max-height: 440px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #001a33 0%, #003366 50%, #004d80 100%);
    cursor: zoom-in;
}

.academic-card-image.avatar-mode {
    background: linear-gradient(135deg, #001a33 0%, #003366 50%, #004d80 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.academic-card-image.photo-mode {
    background: #f7fafc;
}

.academic-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.5s ease;
    display: block;
    filter: brightness(0.95);
}

.academic-card-image.photo-mode .academic-photo {
    object-fit: cover;
    object-position: center 18%;
    padding: 0;
}

.academic-card-image.avatar-mode .academic-photo {
    object-fit: contain;
    object-position: center center;
    padding: 18px;
    filter: brightness(1.1);
}

.academic-card:hover .academic-photo {
    transform: scale(1.03);
    filter: brightness(1);
}

/* Fotoğraf üstü parçacık efekti */
.academic-card-image .academic-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.academic-card:hover .academic-particles {
    opacity: 1;
}

.academic-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: floatParticle 3s ease-in-out infinite;
}

.academic-particles .particle:nth-child(1) { left: 20%; top: 30%; animation-delay: 0s; animation-duration: 3s; }
.academic-particles .particle:nth-child(2) { left: 60%; top: 20%; animation-delay: 0.5s; animation-duration: 3.5s; }
.academic-particles .particle:nth-child(3) { left: 40%; top: 60%; animation-delay: 1s; animation-duration: 2.8s; }
.academic-particles .particle:nth-child(4) { left: 80%; top: 40%; animation-delay: 1.5s; animation-duration: 3.2s; }
.academic-particles .particle:nth-child(5) { left: 10%; top: 70%; animation-delay: 0.8s; animation-duration: 2.5s; }
.academic-particles .particle:nth-child(6) { left: 70%; top: 80%; animation-delay: 1.2s; animation-duration: 3.8s; }

/* ============================================
   OVERLAY + İSİM + SKOR
   ============================================ */
.academic-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 20, 50, 0.82) 0%, rgba(0, 30, 70, 0.35) 55%, transparent 100%);
    padding: 1.25rem 0.85rem 0.65rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transform: none;
    transition: transform 0.5s ease;
}

.academic-name-overlay {
    display: none;
}

.academic-name-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 1;
}

/* Skor alanı arayüzde gösterilmez */
.academic-score-ring-wrapper,
.academic-score-badge,
.kku-score,
.kku-score-legend {
    display: none !important;
}

/* Animated Score Ring */
.academic-score-ring-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.academic-score-ring {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.academic-score-ring svg {
    width: 52px;
    height: 52px;
    transform: rotate(-90deg);
}

.academic-score-ring .ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.15);
    stroke-width: 4;
}

.academic-score-ring .ring-progress {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 138.23;
    stroke-dashoffset: 138.23;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.academic-score-ring .ring-progress.score-excellent { stroke: #FFD700; filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5)); }
.academic-score-ring .ring-progress.score-good { stroke: #00d4aa; filter: drop-shadow(0 0 6px rgba(0, 212, 170, 0.5)); }
.academic-score-ring .ring-progress.score-average { stroke: #94a3b8; }

.academic-score-ring .ring-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.academic-score-label {
    display: flex;
    flex-direction: column;
}

.academic-score-label .score-text {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.academic-score-label .score-tier {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
}

.score-tier.tier-excellent { color: #FFD700; }
.score-tier.tier-good { color: #00d4aa; }
.score-tier.tier-average { color: #94a3b8; }

/* Eski badge (fallback) */
.academic-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #003366;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.academic-score-badge.score-excellent {
    background: linear-gradient(135deg, #e6f2ff 0%, #cce5ff 100%);
    color: #003366;
    border: 2px solid #003366;
}

.academic-score-badge.score-good {
    background: linear-gradient(135deg, #fff4e6 0%, #ffe6cc 100%);
    color: #004080;
    border: 2px solid #ffc107;
}

.academic-score-badge.score-average {
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
    color: #64748b;
    border: 2px solid #cbd5e0;
}

.academic-score-badge i {
    color: #ffc107;
    font-size: 1rem;
}

/* ============================================
   İÇERİK BÖLÜMÜ
   ============================================ */
.academic-card-content {
    padding: 0.75rem 0.9rem 0.9rem;
    background: #ffffff;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    border-radius: 0 0 20px 20px;
}

.academic-info-header {
    margin-bottom: 0.55rem;
    flex: 0 0 auto;
    min-height: 0;
}

.academic-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.6rem;
    margin-bottom: 0.35rem;
}

.academic-name-row .academic-full-name {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    -webkit-line-clamp: 1;
}

.academic-name-row .academic-badge-unvan {
    flex-shrink: 0;
    margin: 0;
}

.academic-meta-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.5rem;
    margin-bottom: 0.5rem;
}

.academic-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.28rem 0.55rem;
    border-radius: 8px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.academic-badge-unvan {
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.25);
}

.academic-full-name {
    font-size: 1rem;
    font-weight: 700;
    color: #003366;
    margin: 0 0 0.25rem 0;
    line-height: 1.25;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.academic-department {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* İstatistikler - Compact */
.academic-stats {
    margin-bottom: 0.55rem;
    flex-shrink: 0;
    display: flex;
    gap: 0.4rem;
}

.academic-stat-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.55rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex: 1;
    position: relative;
    overflow: hidden;
}

.academic-stat-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #003366, #0066cc);
    transition: width 0.4s ease;
}

.academic-stat-item:hover::before {
    width: 100%;
}

.academic-stat-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.stat-icon {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.8rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.academic-stat-item:hover .stat-icon {
    transform: scale(1.1) rotate(-5deg);
}

.stat-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1rem;
    font-weight: 800;
    color: #003366;
    line-height: 1.15;
}

/* Animated Counter */
.stat-value[data-target] {
    transition: color 0.3s ease;
}

/* ============================================
   PROFİL BUTONU
   ============================================ */
.academic-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: #ffffff;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-top: auto;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.2);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.academic-view-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transition: width 0.6s ease, height 0.6s ease, top 0.6s ease, left 0.6s ease;
    transform: translate(-50%, -50%);
}

.academic-view-btn:hover::before {
    width: 300px;
    height: 300px;
}

.academic-view-btn:hover {
    background: linear-gradient(135deg, #004080 0%, #0052a3 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 51, 102, 0.35);
    color: #ffffff;
}

.academic-view-btn i {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.academic-view-btn:hover i {
    transform: translateX(5px);
}

/* ============================================
   SWIPER SLİDE ANİMASYONLARI
   ============================================ */
.enbasarililar-swiper .swiper-slide {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-self: stretch;
}

.swiper-slide-active {
    z-index: 10;
}

/* Staggered giriş animasyonu */
.academic-card.card-animate {
    animation: cardEntrance 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Swiper loop klonlarında animasyon sorun çıkarmasın */
.swiper-slide-duplicate .academic-card.card-animate {
    animation: none;
    opacity: 1;
    transform: none;
}

.swiper-slide:nth-child(1) .academic-card.card-animate { animation-delay: 0.05s; }
.swiper-slide:nth-child(2) .academic-card.card-animate { animation-delay: 0.12s; }
.swiper-slide:nth-child(3) .academic-card.card-animate { animation-delay: 0.19s; }
.swiper-slide:nth-child(4) .academic-card.card-animate { animation-delay: 0.26s; }
.swiper-slide:nth-child(5) .academic-card.card-animate { animation-delay: 0.33s; }
.swiper-slide:nth-child(6) .academic-card.card-animate { animation-delay: 0.40s; }
.swiper-slide:nth-child(7) .academic-card.card-animate { animation-delay: 0.47s; }
.swiper-slide:nth-child(8) .academic-card.card-animate { animation-delay: 0.54s; }
.swiper-slide:nth-child(9) .academic-card.card-animate { animation-delay: 0.61s; }
.swiper-slide:nth-child(10) .academic-card.card-animate { animation-delay: 0.68s; }

/* Swiper Navigasyon */
.enbasarililar-swiper .swiper-button-next,
.enbasarililar-swiper .swiper-button-prev {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-top: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.enbasarililar-swiper .swiper-button-next { right: 6px; }
.enbasarililar-swiper .swiper-button-prev { left: 6px; }

.enbasarililar-swiper .swiper-button-next:hover,
.enbasarililar-swiper .swiper-button-prev:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.enbasarililar-swiper .swiper-button-next::after,
.enbasarililar-swiper .swiper-button-prev::after {
    font-size: 1.1rem;
    color: #475569;
    font-weight: 700;
}

.enbasarililar-swiper .swiper-button-next:hover::after,
.enbasarililar-swiper .swiper-button-prev:hover::after {
    color: #1e293b;
}

/* Pagination */
.enbasarililar-swiper .swiper-pagination {
    position: relative;
    margin-top: 1.5rem;
    bottom: 0 !important;
}

.enbasarililar-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #cbd5e0;
    opacity: 0.5;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin: 0 5px !important;
}

.enbasarililar-swiper .swiper-pagination-bullet-active {
    background: linear-gradient(135deg, #003366, #0066cc);
    opacity: 1;
    width: 28px;
    border-radius: 5px;
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.3);
}

.enbasarililar-swiper .swiper-pagination-bullet:hover {
    opacity: 0.8;
    transform: scale(1.15);
}

/* ============================================
   KEYFRAME ANİMASYONLAR
   ============================================ */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes goldPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 4px 28px rgba(255, 215, 0, 0.8), 0 0 12px rgba(255, 215, 0, 0.3); }
}

@keyframes badgePop {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    60% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatParticle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translate(10px, -20px) scale(1.5);
        opacity: 0.8;
    }
    90% {
        opacity: 0.3;
    }
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ============================================
   LOADİNG
   ============================================ */
#enbasarililar-loading.trend-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 2rem 1.5rem;
    background: #fafbfc;
    border: 1px solid #e8eaed;
    border-radius: 14px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

#enbasarililar-loading .loading-spinner {
    position: relative;
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
}

#enbasarililar-loading .loading-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    border-top-color: rgba(0, 51, 102, 0.8);
    animation: spin 0.85s linear infinite;
}

#enbasarililar-loading .loading-text {
    color: #64748b;
    font-size: 0.9375rem;
    font-weight: 500;
    margin: 0;
}

/* Error */
#enbasarililar-error {
    padding: 1.5rem;
    background: #fed7d7;
    border: 2px solid #feb2b2;
    border-radius: 12px;
    color: var(--kku-brand-hover, #c53030);
    text-align: center;
}

/* Skor Legend */
.kku-score-legend {
    position: absolute;
    left: 20px;
    top: 20px;
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 100;
    flex-wrap: wrap;
}

.kku-score-legend span {
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.kku-score-legend .excellent { color: #003366; border: 2px solid #003366; }
.kku-score-legend .good { color: #ffc107; border: 2px solid #ffc107; }
.kku-score-legend .avg { color: #6c757d; border: 2px solid #6c757d; }

/* Top 10 Badge */
.badge[style*="position:absolute"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
    z-index: 100;
    right: 20px;
    top: 20px;
}

/* Index rebuild butonu */
#rebuildIndexBtn {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    color: #ffffff;
}

#rebuildIndexBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
    background: linear-gradient(135deg, #ffb300 0%, #ff8f00 100%);
}

#rebuildIndexBtn i {
    margin-right: 6px;
    animation: spin 2s linear infinite;
}

/* ============================================
   RESPONSİVE
   ============================================ */
@media (max-width: 1200px) {
    .enbasarililar-swiper {
        padding: 0.75rem 50px 1.5rem;
    }
    .academic-card-image {
        max-height: 380px;
        min-height: 260px;
    }
    .academic-full-name {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .enbasarililar-swiper {
        margin: 0;
        padding: 0.5rem 0 1.25rem;
    }
    .academic-card-image {
        aspect-ratio: 3 / 4;
        min-height: 240px;
        max-height: 340px;
    }
    .academic-name-text {
        font-size: 1.1rem;
    }
    .academic-full-name {
        font-size: 1.1rem;
        min-height: auto;
    }
    .academic-card-content {
        padding: 1.25rem 1rem;
    }
    .enbasarililar-swiper .swiper-button-next,
    .enbasarililar-swiper .swiper-button-prev {
        width: 38px;
        height: 38px;
        display: none;
    }
    .enbasarililar-swiper .swiper-button-next::after,
    .enbasarililar-swiper .swiper-button-prev::after {
        font-size: 0.9rem;
    }
    .academic-stats {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .academic-card-image {
        aspect-ratio: 3 / 4;
        min-height: 220px;
        max-height: 300px;
    }
    .academic-name-text {
        font-size: 1rem;
    }
    .academic-full-name {
        font-size: 1rem;
    }
    .academic-department {
        font-size: 0.85rem;
    }
    .academic-card-content {
        padding: 1rem 0.85rem;
    }
    .kku-score-legend {
        position: relative;
        left: 0;
        top: 0;
        margin-bottom: 1rem;
        justify-content: center;
    }
    .badge[style*="position:absolute"] {
        position: relative !important;
        right: 0;
        top: 0;
        margin-bottom: 1rem;
        display: inline-block;
    }
}

/* ============================================
   FOTOĞRAF ZOOM BUTONU
   ============================================ */
.academic-photo-zoom {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
    pointer-events: auto;
}

.academic-card:hover .academic-photo-zoom {
    opacity: 1;
    transform: scale(1);
}

.academic-photo-zoom:hover {
    background: rgba(0, 51, 102, 0.85);
    transform: scale(1.15) !important;
}

.academic-photo-zoom:active {
    transform: scale(0.95) !important;
}

/* ============================================
   LİGHTBOX
   ============================================ */
.academic-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    overflow: visible;
}

.academic-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.academic-lightbox-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

/* Yıldız animasyonu - modal açıldığında uçuşan yıldızlar (içerikten üstte; büyük fotoğrafta da görünsün) */
.academic-lightbox-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: visible;
}

.academic-lightbox-star {
    position: absolute;
    bottom: -2rem;
    left: var(--x, 50%);
    font-size: var(--size, 1rem);
    color: rgba(255, 215, 0, 0.9);
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.8), 0 0 24px rgba(255, 215, 0, 0.4);
    animation: starFloatUp var(--duration, 5s) ease-out var(--delay, 0s) infinite;
    opacity: 0;
}

.academic-lightbox-star:nth-child(odd) {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(255, 255, 255, 0.5);
}

.academic-lightbox-star:nth-child(3n) {
    color: rgba(255, 193, 7, 0.95);
    text-shadow: 0 0 14px rgba(255, 193, 7, 0.7);
}

@keyframes starFloatUp {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0) scale(0.3);
    }
    8% {
        opacity: 1;
    }
    50% {
        opacity: 0.9;
        transform: translateY(-50vh) translateX(var(--drift, 0)) scale(1);
    }
    92% {
        opacity: 0.4;
    }
    100% {
        opacity: 0;
        transform: translateY(-105vh) translateX(calc(var(--drift, 0) * 1.5)) scale(0.8);
    }
}

.academic-lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.academic-lightbox.active .academic-lightbox-content {
    transform: scale(1) translateY(0);
}

.academic-lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    background: #111;
}

.academic-lightbox-caption {
    margin-top: 1rem;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.academic-lightbox-close {
    position: absolute;
    top: -48px;
    right: -8px;
    width: 42px;
    height: 42px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.academic-lightbox-close:hover {
    background: rgba(220, 53, 69, 0.8);
    border-color: rgba(220, 53, 69, 0.8);
    transform: rotate(90deg) scale(1.1);
}

@media (max-width: 768px) {
    .academic-lightbox-img {
        max-width: 95vw;
        max-height: 75vh;
        border-radius: 10px;
    }
    .academic-lightbox-close {
        top: -44px;
        right: 0;
    }
    .academic-photo-zoom {
        opacity: 0.8;
        transform: scale(0.9);
    }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .academic-lightbox-star {
        animation-duration: calc(var(--duration, 5s) * 1.35) !important;
        animation-timing-function: linear !important;
        opacity: 0.9 !important;
    }
    .academic-card,
    .academic-card::before,
    .academic-card::after,
    .academic-photo,
    .academic-rank-badge,
    .academic-name-text {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .academic-stat-item,
    .stat-icon,
    .academic-view-btn,
    .academic-view-btn::before,
    .academic-view-btn i,
    .academic-image-overlay,
    .swiper-slide,
    .academic-card.card-animate,
    .academic-lightbox,
    .academic-lightbox-content,
    .academic-lightbox-close,
    .academic-photo-zoom {
        animation: none !important;
        transition: none !important;
    }
}

/* En çok atıf alan akademisyenler — mobil başlık */
@media (max-width: 768px) {
    .enbasarililar-section {
        padding: 0.6rem 0.5rem 0.85rem;
    }

    .enbasarililar-section .trend-header {
        position: relative;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.75rem 0.85rem;
        margin-bottom: 0.6rem;
    }

    .enbasarililar-section .trend-title-section {
        padding-right: 5.5rem;
        min-height: 2.1rem;
        display: flex;
        align-items: center;
        min-width: 0;
    }

    .enbasarililar-section .trend-title {
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.98rem;
        width: 100%;
        line-height: 1.25;
    }

    .enbasarililar-section .trend-title i {
        flex-shrink: 0;
        font-size: 1rem;
        margin-top: 0;
    }

    .enbasarililar-section .trend-title-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        flex: 1 1 auto;
    }

    .enbasarililar-section .trend-title-sep,
    .enbasarililar-section .trend-title .trend-subtitle {
        display: none !important;
    }

    .enbasarililar-section .section-controls {
        position: absolute;
        top: 0.75rem;
        right: 0.85rem;
        z-index: 1;
    }

    .birim-analiz-page .enbasarililar-section {
        padding: 0.85rem 0.75rem 1rem;
    }
}
