/* ========================================
   OKUL SIRALAMA SAYFASI - GÜNCEL TAM CSS
======================================== */

:root {
    --primary-green: #145e43;
    --primary-dark: #0e3d2c;
    --primary-light: #e8f5e9;
    --bg-body: #f1f8f6;
    --border-soft: #e2e8f0;
    --text-dark: #1a202c;
    --text-gray: #666;
    --white: #fff;
    --cream: #f9f9f9;
    --border-gray: #eee;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--cream);
    color: var(--text-dark);
}

/* Üst menü ikonları — geç CSS yüklenince büyük flaşı önler */
.nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-link-icon-svg {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
    max-width: 1.15rem;
    max-height: 1.15rem;
}

@media (max-width: 768px) {
    .nav-link-icon-svg {
        width: 1.35rem;
        height: 1.35rem;
        max-width: 1.35rem;
        max-height: 1.35rem;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- NAVBAR --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1100;
    background: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.65rem 1.1rem;
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: wrap;
    flex: 1 1 auto;
    justify-content: center;
    min-width: min(100%, 280px);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-green);
    font-weight: 700;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-green);
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.navbar .logo-text {
    white-space: nowrap;
}

.navbar-container {
    container-type: inline-size;
    container-name: site-navbar;
}

@container site-navbar (max-width: 1100px) {
    .navbar .logo-text {
        display: none;
    }

    .navbar .logo {
        gap: 0;
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Giriş / Kayıt — aynı kutu boyutu (<button> ile <a> hizası), hover okunaklı */
.nav-actions .login-btn,
.nav-actions .signup-btn {
    box-sizing: border-box;
    min-height: 42px;
    min-width: 7.75rem;
    padding: 0 1.125rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.2;
    cursor: pointer;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    vertical-align: middle;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.nav-actions .login-btn {
    background: transparent;
    color: var(--primary-green);
    border: 1.5px solid var(--primary-green);
}

.nav-actions .login-btn:hover {
    background: var(--primary-green);
    color: var(--white);
}

.nav-actions .signup-btn,
.nav-actions a.signup-btn {
    background: var(--primary-green);
    color: var(--white);
    border: 1.5px solid var(--primary-green);
    text-decoration: none;
}

/* Kayıt: hover = beyaz zemin + yeşil yazı (girişin tersi) */
.nav-actions .signup-btn:hover,
.nav-actions a.signup-btn:hover {
    background: var(--white);
    color: var(--primary-green);
    border-color: var(--primary-green);
    filter: none;
}

.nav-actions a.signup-btn,
.nav-actions button.signup-btn {
    display: inline-flex;
    font-family: inherit;
}

.nav-search {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    background: #f5f5f0;
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    margin: 0 2rem;
    border: 1px solid #e0e0e0;
    position: relative;
    /* Dropdown için eklendi */
}

.nav-search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    padding-left: 10px;
}

.nav-search-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.search-region {
    color: var(--primary-green);
    font-weight: 800;
    border-right: 2px solid #ddd;
    padding-right: 10px;
}

/* --- SEARCH SUGGESTIONS --- */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 2000;
}

.search-results.hidden {
    display: none;
}

.search-result-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8faf9;
}

.search-result-item img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    padding: 2px;
}

.search-result-info {
    display: flex;
    flex-direction: column;
}

.search-result-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.search-result-city {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* --- HERO --- */
.rankings-hero {
    background: var(--primary-green);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.rankings-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.rankings-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* --- ANA YAPI --- */
.rankings-main {
    background: var(--cream);
    padding: 2rem 0 4rem;
}

.rankings-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 20px;
    align-items: start;
}

/* --- SIDEBAR --- */
.filters-sidebar {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-gray);
    padding-bottom: 1rem;
}

.filter-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-gray);
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.filter-options.hidden,
.filter-wrapper.hidden {
    display: none;
}

.clear-filters {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-weight: 700;
    transition: color 0.2s;
}

.clear-filters:hover {
    color: #c0392b;
    text-decoration: underline;
}

/* --- KART YAPISI --- */
.rankings-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ranking-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.ranking-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.rank-number {
    display: flex;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    margin-right: 15px;
}

.rank-region {
    font-size: 2.2rem;
    font-weight: 900;
    color: #990000 !important;
    margin-bottom: 5px;
    line-height: 1;
}

.rank-box {
    background-color: #990000 !important;
    color: var(--white);
    font-size: 2rem;
    font-weight: 900;
    padding: 6px 14px;
    border-radius: 10px;
    line-height: 1;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(153, 0, 0, 0.3);
    margin-bottom: 8px;
}

.type-box {
    background-color: var(--primary-green);
    color: var(--white);
    font-size: 2rem;
    font-weight: 900;
    padding: 6px 14px;
    border-radius: 10px;
    line-height: 1;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(26, 77, 62, 0.3);
    margin-bottom: 8px;
}

.type-rank-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-green);
    margin-bottom: 5px;
    line-height: 1;
}

.rank-body {
    display: flex;
    flex: 1;
    gap: 1.5rem;
    justify-content: flex-start;
    min-width: 0;
}

/* Amblem Kutusu */
.rank-visual {
    width: 85px;
    /* 120px'den 85px'e düşürüldü */
    height: 85px;
    /* 120px'den 85px'e düşürüldü */
    background-color: #f5f7f9;
    /* Grimsi modern ton */
    border-radius: 12px;
    /* Köşeleri biraz daha yumuşattık */
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #2E7D32;
    /* Çok ince bir sınır çizgisi */
    padding: 8px;
    /* Resmin kenarlardan uzaklığı (Boyutu asıl bu küçültür) */
}

/* İçindeki Amblem Resmi */
.rank-visual img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Resmin bozulmadan sığmasını sağlar */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
    /* Logoyu öne çıkarır */
}

.rank-info {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    /* Flex özelliği ekledik */
    flex-direction: column;
    /* İçerikleri alt alta diz — flex:1 kaldırıldı: ortada geniş boşluk oluşmasın */
}

.rank-header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.rank-header-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.rank-inline-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-left: auto;
    flex-shrink: 0;
}

.rank-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    margin-bottom: 0.25rem;
}

.rank-type {
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 500;
}

.rank-stats {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
}

.r-stat {
    display: flex;
    flex-direction: column;
}

.rs-label {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.rs-value {
    font-weight: 600;
    color: var(--text-dark);
}

.rs-value.free {
    color: #2E7D32;
}

/* --- YENİ EKLENEN: DEĞERLENDİRME IZGARASI (Rating Grid) --- */
.ratings-grid {
    display: flex;
    justify-content: flex-start;
    /* Sola yasla, görseldeki gibi */
    align-items: center;
    gap: 12px;
    /* Kutular arası mesafeyi biraz daralttık (20px'den 12px'e) */
    flex-wrap: nowrap;
    /* SİHİRLİ KOD: Asla alt satıra geçme, tek satırda kal */
    overflow-x: auto;
    /* Çok küçük ekranlarda bozulmasın diye yatay kaydırma izni verir */

    margin-top: 0.75rem;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    width: 100%;
}

.rating-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    /* Kutuların genişliğinin daralmasını engeller */
}

/* --- GENEL DEĞERLENDİRME BÜYÜTME --- */

/* Sağ tarafın genel kutusu */
.rank-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* İçerikleri dikeyde ortala */
    gap: 1.5rem;
    /* Gruplar arası boşluk */
    min-width: 160px;
    /* Genişliği biraz artırdık */
    margin-left: auto;
    flex-shrink: 0;
    padding-left: 1.5rem;
    border-left: 1px solid var(--border-gray);
}

/* Genel Değerlendirme Grubu */
.genel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* "Genel Değerlendirme" Yazısı */
.genel-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary-green);
    letter-spacing: 1px;
}

.btn-save-sm {
    font-size: 2.8rem;
    /* Kalp boyutu devleştirildi */
    color: #ff4757;
    /* Daha canlı bir kırmızı */
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    line-height: 1;
    padding: 0;
    margin-top: 5px;
}

.btn-save-sm:hover {
    transform: scale(1.15);
    /* Üzerine gelince hafif büyüme efekti */
}

.btn-save-sm.is-favorite {
    filter: drop-shadow(0 0 4px rgba(255, 71, 87, 0.45));
}

.rank-action-fav-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.btn-compare-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: 2px solid #1a4d3e;
    border-radius: 8px;
    background: #fff;
    color: #1a4d3e;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.btn-compare-sm:hover {
    background: #1a4d3e;
    color: #fff;
    transform: scale(1.06);
}

.btn-compare-sm.is-in-compare {
    background: #dcfce7;
    border-color: #16a34a;
    color: #15803d;
}

.btn-yurt-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    padding: 0;
    border: 2px solid #1a4d3e;
    border-radius: 8px;
    background: #fff;
    color: #1a4d3e;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.btn-yurt-sm:hover {
    background: #1a4d3e;
    color: #fff;
    transform: scale(1.06);
}

/* --- URAP PUANI AYARI --- */
.urap-container {
    text-align: center;
}

.rank-grade {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2E7D32;
    /* Puan rengi yeşil yapıldı */
}

/* Büyük Not Yuvarlağı */
.rating-circle.genel-circle-large {
    width: 65px;
    /* 42px'den 65px'e çıktı */
    height: 65px;
    /* 42px'den 65px'e çıktı */
    font-size: 1.8rem;
    /* Not harfi büyüdü */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 900;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    /* Daha belirgin gölge */
    border: 3px solid rgba(255, 255, 255, 0.2);
}

/* Urap Puanı Grubu */
.urap-container {
    text-align: center;
}

/* URAP puanı altı: solda karşılaştır, sağda favori */
.urap-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 11rem;
    margin: 0.65rem auto 0;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.urap-actions-row .btn-compare-sm {
    flex-shrink: 0;
}

.urap-actions-row .urap-fav-btn.btn-save-sm {
    font-size: 2.35rem;
    margin-top: 0;
    line-height: 1;
    padding: 2px;
    min-width: 2.85rem;
    min-height: 2.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.rank-grade {
    font-size: 1.6rem;
    /* Puanı biraz daha büyüttük */
    font-weight: 800;
    color: #2c3e50;
}

/* Favori Butonu Ayarı */
.btn-save-sm {
    font-size: 2.2rem;
    margin-top: -5px;
}

.rating-circle {
    width: 38px;
    /* Tek satıra sığması için çapı hafif küçülttük (42px -> 38px) */
    height: 38px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 5px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.rating-label-sm {
    font-size: 0.7rem;
    /* Yazıyı hafif küçülttük ki yan yana sığsınlar */
    color: var(--text-gray);
    font-weight: 600;
    white-space: nowrap;
}

/* Not Renkleri - Tam Renk Sistemi */
/* A Ailesi - Yeşil Tonları */
.rating-A-plus {
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
}

.rating-A {
    background: linear-gradient(135deg, #2E7D32, #43A047);
}

.rating-A-minus {
    background: linear-gradient(135deg, #43A047, #66BB6A);
}

/* B Ailesi - Mavi Tonları */
.rating-B-plus {
    background: linear-gradient(135deg, #1565C0, #1E88E5);
}

.rating-B {
    background: linear-gradient(135deg, #1E88E5, #42A5F5);
}

.rating-B-minus {
    background: linear-gradient(135deg, #42A5F5, #64B5F6);
}

/* C Ailesi - Açık Turuncu/Amber Tonları */
.rating-C-plus {
    background: linear-gradient(135deg, #F57C00, #FF9800);
}

.rating-C {
    background: linear-gradient(135deg, #FF9800, #FFA726);
}

.rating-C-minus {
    background: linear-gradient(135deg, #FFA726, #FFB74D);
}

/* D Ailesi - Koyu Turuncu/Kırmızımsı Tonlar */
.rating-D-plus {
    background: linear-gradient(135deg, #BF360C, #D84315);
}

.rating-D {
    background: linear-gradient(135deg, #D84315, #E64A19);
}

.rating-D-minus {
    background: linear-gradient(135deg, #E64A19, #F4511E);
}

/* F - Kırmızı */
.rating-F {
    background: linear-gradient(135deg, #B71C1C, #C62828);
}


/* --- SAĞ KISIM (AKSIYON VE PUANLAR) --- */
.rank-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* Öğeler arası dikey boşluk */
    min-width: 140px;
    padding-left: 1rem;
    border-left: 1px solid var(--border-gray);
}

.rating-circle.genel-circle-mid {
    width: 52px;
    /* 65px'den 52px'e düşürüldü */
    height: 52px;
    font-size: 1.4rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin-top: 5px;
}

.rank-grade {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2E7D32;
}

.grade-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    font-weight: 700;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
}

.btn-outline {
    border: 1px solid var(--primary-green);
    background: white;
    color: var(--primary-green);
}

.btn-outline:hover {
    background: var(--primary-green);
    color: white;
}

.btn-save-sm {
    background: none;
    border: none;
    font-size: 2rem;
    color: #e74c3c;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-save-sm:hover {
    transform: scale(1.1);
}

/* --- YENİ EKLENEN: GENEL PUAN AYARLARI --- */
.rank-action .rating-circle.genel-circle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    margin-bottom: 15px;
    /* Urap Puanı ile arasına boşluk */
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .rankings-layout {
        grid-template-columns: 1fr;
    }

    .filter-panel-premium {
        position: static;
    }

    .filter-panel-premium:has(.filter-content-area:not(.hidden)) {
        height: min(88vh, 780px);
        height: min(88dvh, 780px);
        max-height: min(88vh, 780px);
        max-height: min(88dvh, 780px);
    }

    .filter-panel-premium:has(.filter-content-area:not(.hidden)) .filter-content-area {
        flex: 1 1 0;
        min-height: 0;
        max-height: none;
        overflow-y: scroll;
    }

    .filters-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .rank-body {
        flex-direction: column;
    }

    .rank-action {
        flex-direction: row;
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border-gray);
        padding-top: 1rem;
        justify-content: space-between;
        width: 100%;
        margin-left: 0;
    }

    .rank-header-main {
        gap: 0.5rem;
    }

    .urap-actions-row {
        max-width: 100%;
        margin-top: 0.5rem;
        padding-top: 0.45rem;
    }

    .urap-actions-row .urap-fav-btn.btn-save-sm {
        font-size: 2.05rem;
        min-width: 2.6rem;
        min-height: 2.6rem;
    }

    .urap-actions-row .btn-compare-sm {
        width: 2rem;
        height: 2rem;
        font-size: 0.95rem;
    }
}

/* PAGINATION */
.pagination {
    grid-column: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    padding-bottom: 60px;
    width: 100%;
}

.page-btn {
    background-color: #ffffff;
    color: var(--text-dark);
    border: 1px solid #eee;
    width: 45px;
    height: 45px;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-btn:hover:not(.active) {
    background-color: #f0f7f4;
    color: var(--primary-green);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(26, 77, 62, 0.15);
    border-color: var(--primary-green);
}

.page-btn.active {
    background-color: var(--primary-green);
    color: #ffffff;
    border-color: var(--primary-green);
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(26, 77, 62, 0.3);
    cursor: default;
}

/* --- PREMIUM FILTER SIDEBAR --- */
.filter-panel-premium {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-soft);
    position: sticky;
    top: 76px;
    min-width: 0; /* grid child overflow fix */
    display: flex;
    flex-direction: column;
    min-height: 0;
    z-index: 100;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* Açık filtre: sabit yükseklik (yalnızca max-height flex içeriği 0’a düşürüyordu) */
.filter-panel-premium:has(.filter-content-area:not(.hidden)) {
    height: calc(100vh - 76px);
    max-height: calc(100vh - 76px);
}

.filter-header-main {
    background: var(--primary-green);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.filter-header-main h2 {
    margin: 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-panel-premium:has(.filter-content-area.hidden) .filter-actions-bar {
    display: none;
}

#panelToggleIcon {
    font-size: 0.8rem;
}

.filter-content-area {
    padding: 15px;
    background: #fbfdfc;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(26, 77, 62, 0.45) rgba(26, 77, 62, 0.08);
    padding-right: 10px;
}

.filter-panel-premium:has(.filter-content-area:not(.hidden)) .filter-content-area {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow-y: scroll;
}

/* Filtre paneli: tek kaydırma çubuğu (iç kartlarda ayrı kaydırma yok) */
.filter-content-area .card-body,
.filter-content-area .card-body-nested,
.filter-content-area .card-body-nested--cities {
    max-height: none;
    overflow: visible;
}

.filter-content-area::-webkit-scrollbar {
    width: 10px;
}

.filter-content-area::-webkit-scrollbar-thumb {
    background: rgba(26, 77, 62, 0.4);
    border-radius: 10px;
    border: 2px solid #fbfdfc;
}

.filter-content-area::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 77, 62, 0.58);
}

.filter-content-area::-webkit-scrollbar-track {
    background: rgba(26, 77, 62, 0.1);
    border-radius: 10px;
}

/* Bölüm sıralama: üst seviye filtre blokları (bl-1 … bl-4) */
.filter-block-bl {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.filter-block-head {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--primary-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid var(--primary-light);
    background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%);
}

.filter-block-head:hover {
    opacity: 0.92;
}

.filter-block-bl.collapsed .filter-block-head {
    border-bottom: none;
}

/* Kapalı blokta gövde kesin gizlensin (bl-2 şehir: daha özgül display:flex kuralını ezmeyi önler) */
.filter-block-bl.collapsed .filter-block-body {
    display: none !important;
}

.filter-block-bl.collapsed .filter-block-head .card-toggle-icon {
    transform: rotate(-90deg);
}

.filter-block-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fbfdfc;
}

.filter-block-body-stack {
    padding-top: 8px;
}

.filter-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.card-head {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--primary-light);
    cursor: pointer;
}

.card-head:hover {
    opacity: 0.8;
}

.card-toggle-icon {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.filter-card.collapsed .card-toggle-icon {
    transform: rotate(-90deg);
}

.filter-card.collapsed .card-body {
    display: none;
}

.filter-card.collapsed .card-head {
    border-bottom: none;
    padding-bottom: 0;
}

.card-body {
    max-height: 160px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Üniversite / bölüm / şehir listeleri: panel içi tek kaydırma */
.card-body-multi,
.filter-block-body .card-body-multi,
.filter-block-body.card-body-city {
    max-height: none;
    overflow: visible;
}

.card-body-nested {
    max-height: 300px;
    overflow-y: auto;
    min-width: 0;
}

/* Konum: kart gövdesi 160px ile kesilmesin; kaydırma şehir listesinde */
.filter-card--konum .card-body--konum {
    max-height: none;
    overflow: visible;
    padding-right: 4px;
}

/* Şehir checkbox listesi — daha uzun kaydırılabilir alan */
.card-body-nested--cities {
    max-height: min(52vh, 540px);
    overflow-y: auto;
    min-height: 200px;
}

/* Şehir, Üniversite, Bölüm — yükseklik panel içi kaydırmaya bırakılır */
.filter-card-city .card-body-city,
.filter-card-multi .card-body-multi,
.filter-block-bl-2:not(.collapsed) .filter-block-body.card-body-city {
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

/* bl-2: Farklı Konum | Şehirler sekmeleri */
.filter-bl2-tabs {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: #fff;
}

.filter-bl2-tab {
    flex: 1;
    padding: 10px 8px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--text-gray);
    background: #f5f7f6;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.filter-bl2-tab + .filter-bl2-tab {
    border-left: 1px solid var(--border-soft);
}

.filter-bl2-tab:hover {
    background: #eef5f2;
    color: var(--primary-green);
}

.filter-bl2-tab.is-active {
    background: var(--primary-green);
    color: #fff;
}

.filter-bl2-panel {
    display: none;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.filter-bl2-panel.is-active {
    display: flex;
}

.filter-bl2-panel[hidden] {
    display: none !important;
}

.filter-bl2-loc-inner {
    padding: 4px 2px 0;
}

.filter-bl2-city-heading {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--primary-green);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--primary-light);
}

/* Şehir / üniversite listeleri: tek kaydırma çubuğu filter-content-area üzerinde */
.filter-content-area .card-body-nested-city,
.filter-content-area .card-body-nested-multi {
    max-height: none;
    overflow: visible;
    min-height: 0;
}

.filter-section-selected {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
}

.filter-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-gray);
    display: block;
    margin-bottom: 6px;
}

.filter-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--primary-light);
    color: var(--primary-green);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-chip:hover {
    background: #c8e6c9;
}

.filter-chip-remove {
    font-size: 1rem;
    line-height: 1;
    opacity: 0.8;
}

.filter-section-actions {
    display: flex;
    gap: 8px;
}

.btn-filter-inline {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-soft);
    background: #fff;
    color: var(--primary-green);
    transition: all 0.2s;
}

.btn-filter-inline:hover {
    background: var(--primary-light);
}

.card-body::-webkit-scrollbar {
    width: 5px;
}

.card-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #4a5568;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-row:hover {
    background: var(--primary-light);
}

.checkbox-row input {
    accent-color: var(--primary-green);
    width: 16px;
    height: 16px;
    margin: 0;
}

.filter-search-inline {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    font-size: 0.85rem;
    outline: none;
    background: #fff;
}

.filter-search-inline:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(20, 94, 67, 0.1);
}

/* Filtre: üniversite adı açılır listesi + seçilenler şeridi */
.uni-name-filter-wrap {
    position: relative;
    z-index: 5;
}

.uni-name-filter-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 280px;
    overflow-y: auto;
    z-index: 50;
}

.uni-name-filter-empty {
    padding: 14px 16px;
    font-size: 0.88rem;
    color: var(--text-gray);
}

.uni-search-selected-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding: 12px 14px;
    background: #f8faf9;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
}

.uni-search-selected-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-gray);
    flex-shrink: 0;
}

.uni-search-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.uni-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 10px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 999px;
    font-size: 0.82rem;
    max-width: 100%;
}

.uni-chip-text {
    font-weight: 600;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 260px;
}

.uni-chip-remove {
    border: none;
    background: rgba(0, 0, 0, 0.06);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    font-size: 1rem;
    flex-shrink: 0;
}

.uni-chip-remove:hover {
    background: rgba(231, 76, 60, 0.2);
}

.uni-search-clear-chips {
    border: none;
    background: transparent;
    color: #c0392b;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.uni-search-clear-chips:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .uni-search-selected-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .uni-search-clear-chips {
        margin-left: 0;
        align-self: flex-end;
    }

    .uni-chip-text {
        max-width: 200px;
    }
}

.range-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.range-mini {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
}

.filter-actions-bar {
    padding: 12px 15px;
    background: #fff;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    gap: 10px;
    justify-content: stretch;
    flex-shrink: 0;
}

.btn-filter-apply {
    background: var(--primary-green);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
}

.btn-filter-apply:hover {
    background: var(--primary-dark);
}

.btn-filter-reset {
    background: #fff;
    color: #64748b;
    border: 1px solid var(--border-soft);
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    flex: 1;
    text-align: center;
}

/* Selection Actions (Select All / Clear All) */
.selection-actions {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    margin-bottom: 8px;
    border-bottom: 1px dashed var(--border-soft);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 5;
}

.selection-actions button {
    background: none;
    border: none;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--primary-green);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.selection-actions button:hover {
    background: var(--primary-light);
}

.selection-actions button.clear-all {
    color: #64748b;
}

.selection-actions button.clear-all:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.group-header-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 12px 0 6px 0;
    letter-spacing: 0.6px;
    background: #f8fafc;
    padding: 2px 8px;
    border-radius: 4px;
}

.btn-filter-reset:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
}

/* --- PREMIUM CARD & RATING STYLES --- */
.dept-card-large {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--border-soft);
}

.uni-header {
    background: var(--primary-green);
    padding: 10px 20px;
    color: #fff;
}

.uni-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.uni-titles-group {
    display: flex;
    flex-direction: column;
}

.uni-main-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.uni-sub-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 500;
    margin-top: 2px;
}

.card-ratings-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.rating-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 45px;
}

.rating-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.rating-label {
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
    letter-spacing: 0.1px;
}

/* Üniversite değerlendirme rozetleri - yeşil başlık içinde */
.uni-ratings-inline {
    margin-top: 0.5rem;
    width: 100%;
}
.uni-ratings-inline .metric-label {
    color: rgba(255,255,255,0.9);
}

.ky-cell {
    text-align: center;
    font-weight: 600;
}

.dept-main-info {
    padding: 15px 20px 20px 20px;
}

.dept-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dept-display-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a202c;
    margin: 0;
    letter-spacing: -0.5px;
}

.dept-location-badge {
    font-size: 0.8rem;
    font-weight: 800;
    color: #64748b;
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
}

.dept-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
}

/* --- BADGES --- */
.f-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.f-badge.fee {
    background: #fff7ed;
    color: #c2410c;
    border-color: #ffedd5;
}

.f-badge.score-type {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #dbeafe;
}

.f-badge.lang {
    background: #f0fdf4;
    color: #15803d;
    border-color: #dcfce7;
}

.f-badge.mtok {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fee2e2;
}

.f-badge.gender {
    background: #faf5ff;
    color: #7e22ce;
    border-color: #f3e8ff;
}

.f-badge.inst {
    background: #fdf4ff;
    color: #a21caf;
    border-color: #fae8ff;
}

.f-badge.loc {
    background: #fffbeb;
    color: #b45309;
    border-color: #fef3c7;
}

.f-badge.nationality {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #c7d2fe;
}

/* --- TABLE STYLES --- */
.table-container {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    background: #fff;
}

.years-table-new {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.years-table-new thead {
    background: var(--primary-green);
    color: #fff;
}

.years-table-new th {
    padding: 12px 8px;
    font-weight: 700;
    text-align: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.years-table-new td {
    padding: 14px 8px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    color: #4a5568;
    font-weight: 600;
}

.year-cell {
    color: var(--primary-green) !important;
    font-weight: 800 !important;
    font-size: 1rem;
}

.score-cell {
    font-weight: 600;
    color: #4a5568;
}

/* Bilgi ikonu tooltip (Bolum-siralama) */
.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    position: relative;
    font-size: 14px;
    line-height: 1;
    opacity: 0.9;
    user-select: none;
}

.info-tooltip:hover {
    opacity: 1;
}

.info-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: normal;
    max-width: 280px;
    min-width: 150px;
    text-align: left;
    line-height: 1.4;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
    pointer-events: none;
}

.info-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

.info-tooltip:hover::after,
.info-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

.bolum-sira-badge {
    background: #1e293b;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    display: inline-block;
}

.doldu {
    color: #dc2626;
}

.bos {
    color: #16a34a;
}

/* --- RATING CLASSES --- */
.rating-A-plus,
.rating-A,
.rating-B,
.rating-C {
    color: #fff;
}

.rating-A-plus {
    background: #145e43;
}

.rating-A {
    background: #2E7D32;
}

.rating-B {
    background: #0ea5e9;
}

.rating-C {
    background: #f43f5e;
}

/* --- LOADING SPINNER --- */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1A4D3E;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 992px) {
    .pagination {
        grid-column: 1;
        margin-top: 30px;
    }
}

/* FİLTRE EKSTRALAR */
.range-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.range-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.range-input:focus {
    border-color: var(--primary-green);
}

.filter-group {
    margin-top: 25px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.filter-group:first-of-type {
    margin-top: 10px;
    border-top: none;
}

.scrollable-options {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.scrollable-options::-webkit-scrollbar {
    width: 6px;
}

.scrollable-options::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.city-search-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
}

.city-search-input:focus {
    border-color: var(--primary-green);
}

.hidden {
    display: none !important;
}

/* Bölüm sıralama: yurt amblemleri (D / Ö / T) + en sağda favori kalbi */
.dept-actions-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.dept-actions-icons .heart-icon {
    line-height: 1;
}

.yurt-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 3px;
    box-sizing: border-box;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
    overflow: hidden;
}

/* Çatı + gövde çizimi; harf SVG <text> ile gövdenin içinde */
.yurt-emblem-svg {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.yurt-emblem:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.yurt-emblem--devlet {
    background: linear-gradient(145deg, #145e43, #1a7a58);
}

.yurt-emblem--diger {
    background: linear-gradient(145deg, #6b21a8, #7c3aed);
}

/* T = tümü: devlet + özel birlikte */
.yurt-emblem--tumu {
    background: linear-gradient(135deg, #145e43 0%, #1a7a58 42%, #6b21a8 58%, #7c3aed 100%);
}

button.yurt-emblem {
    border: none;
    padding: 3px;
    font: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

button.yurt-emblem.is-active {
    box-shadow: 0 0 0 2px #fff, 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* Yakın yurt paneli (D / Ö / T tıklanınca kart genişler) */
.yurt-yakinlik-panel {
    margin-top: 16px;
    padding: 14px 16px 16px;
    background: linear-gradient(180deg, #f8faf9 0%, #f0f4f2 100%);
    border: 1px solid #d8e6df;
    border-radius: 12px;
    box-sizing: border-box;
}

.dept-card-yurt-open .yurt-yakinlik-panel {
    animation: yurtPanelIn 0.22s ease-out;
}

@keyframes yurtPanelIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yurt-yakinlik-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.yurt-yakinlik-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #145e43;
}

.yurt-yakinlik-link-yurtlar {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a4d3e;
    text-decoration: none;
    white-space: nowrap;
}

.yurt-yakinlik-link-yurtlar:hover {
    text-decoration: underline;
}

/* Satır başına 3 kart; küçük ölçü */
.yurt-yakinlik-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
    align-items: start;
}

/* Kart: sol/orta sembolik görsel, sağ üst favori + altında km; altta 3 süre */
.yurt-yakinlik-card {
    background: #fff;
    border: 1px solid #e2e8e8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    min-width: 0;
}

.yurt-yakinlik-card-top {
    display: grid;
    grid-template-columns: 1fr minmax(56px, 68px);
    gap: 0;
    min-height: 0;
    align-items: stretch;
}

.yurt-yakinlik-visual {
    position: relative;
    min-height: 72px;
    max-height: 80px;
    background: #f5f5f0;
}

.yurt-yakinlik-ph-img {
    width: 100%;
    height: 100%;
    min-height: 72px;
    max-height: 80px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.yurt-yakinlik-name-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 4px 6px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.yurt-yakinlik-name-link {
    font-size: 0.62rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yurt-yakinlik-name-link:hover {
    text-decoration: underline;
    color: #fff;
}

.yurt-yakinlik-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 4px;
    padding: 4px 5px 4px 3px;
    background: linear-gradient(135deg, #fafcfb 0%, #f0f4f2 100%);
    border-left: 1px solid #e8e8e8;
}

.yurt-panel-fav-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a4d3e;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.yurt-panel-fav-btn:hover {
    transform: scale(1.06);
}

.yurt-panel-fav-btn.is-favorite {
    color: #c62828;
}

.yurt-panel-fav-btn:focus-visible {
    outline: 2px solid #1a4d3e;
    outline-offset: 2px;
}

.yurt-panel-fav-ic {
    font-size: 1rem;
    line-height: 1;
}

.yurt-yakinlik-km-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
    padding: 4px 3px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #d8e6df;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
}

.yurt-yakinlik-km-lbl {
    font-size: 0.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #145e43;
}

.yurt-yakinlik-km-str {
    font-size: 0.68rem;
    font-weight: 800;
    color: #1a4d3e;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.yurt-yakinlik-metrics-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px 4px;
    padding: 5px 6px 6px;
    border-top: 1px solid #edf2f0;
    background: #fbfcfc;
}

.yurt-metric-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
    color: #2d3748;
    min-width: 0;
}

.yurt-metric-lbl {
    font-size: 0.5rem;
    font-weight: 700;
    color: #4a5568;
    line-height: 1.1;
}

.yurt-metric-ic {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: #145e43;
    opacity: 0.92;
}

.yurt-metric-val {
    font-size: 0.58rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.15;
    word-break: break-word;
}

.yurt-yakinlik-empty {
    margin: 0;
    padding: 12px;
    font-size: 0.9rem;
    color: #718096;
    text-align: center;
    grid-column: 1 / -1;
}

.yurt-eval-row {
    padding: 6px 8px 8px;
    border-top: 1px solid #edf2f0;
    background: #ffffff;
}

.yurt-eval-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.66rem;
    font-weight: 700;
    color: #145e43;
    background: #edf7f2;
    border: 1px solid #d5e8df;
    border-radius: 999px;
    padding: 3px 8px;
    max-width: 100%;
    line-height: 1.2;
}

/* 9. hücre: 3. satır 3. sütun (8 karttan sonra grid akışı) */
.yurt-yakinlik-load-more {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 0;
    min-width: 0;
    width: auto;
    max-width: 100%;
    background: #fff;
    border: 2px dashed #b8d4c8;
    border-radius: 10px;
    padding: 8px 6px;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    font: inherit;
    color: inherit;
}

.yurt-yakinlik-load-more:hover {
    border-color: #1a4d3e;
    background: #f0faf5;
    box-shadow: 0 2px 8px rgba(26, 77, 62, 0.12);
}

.yurt-yakinlik-load-more:focus-visible {
    outline: 2px solid #1a4d3e;
    outline-offset: 2px;
}

.yurt-load-more-plus {
    font-size: 1.65rem;
    font-weight: 300;
    line-height: 1;
    color: #1a4d3e;
}

.yurt-load-more-hint {
    font-size: 0.72rem;
    font-weight: 600;
    color: #145e43;
    text-align: center;
}

@media (max-width: 1100px) {
    .yurt-yakinlik-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .yurt-yakinlik-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .yurt-yakinlik-metrics-row {
        gap: 2px;
        padding: 5px;
    }

    .yurt-metric-lbl {
        font-size: 0.48rem;
    }

    .yurt-metric-val {
        font-size: 0.55rem;
    }
}

@media (max-width: 600px) {
    .dept-actions-icons {
        gap: 6px;
    }

    .yurt-emblem {
        width: 32px;
        height: 32px;
        border-radius: 8px;
        padding: 2px;
    }
}