/* ==========================================================================
   KPSS MODÜLÜ — BAĞIMSIZ STİL DOSYASI
   Bu dosya tek başına tüm KPSS portalı tasarımını içerir.
   ========================================================================== */

/* FONT TANIMLAMALARI */
@font-face {
font-family: 'Outfit';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url('font/Outfit-Regular.woff2') format('woff2');
}
@font-face {
font-family: 'Outfit';
font-style: normal;
font-weight: 500;
font-display: swap;
src: url('font/Outfit-Medium.woff2') format('woff2');
}
@font-face {
font-family: 'Outfit';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url('font/Outfit-SemiBold.woff2') format('woff2');
}
@font-face {
font-family: 'Outfit';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url('font/Outfit-Bold.woff2') format('woff2');
}

:root {
--primary-color: #0074d4;
--primary-hover: #156cb6;
--bg-color: #F9FAFB;
--card-bg: #FFFFFF;
--text-main: #32302c;
--text-muted: #6B7280;
--border-color: #e8e8e8;
--accent-color: #0d9488;
--error-color: #ed1e0f;
--bg-soft: #f8fafc;
}

/* RESET & BASE */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Outfit', sans-serif;
-webkit-tap-highlight-color: transparent;
}

body {
background: var(--bg-color);
color: var(--text-main);
min-height: 100vh;
padding: 40px 10px 100px;
font-weight: 500;
display: flex;
flex-direction: column;
align-items: center;
}

.container {
width: 100%;
max-width: 660px;
}

/* BREADCRUMB */
.breadcrumb {
text-align: center;
margin-bottom: 15px;
font-size: 16px;
color: var(--text-muted);
}
.breadcrumb a {
text-decoration: none;
color: var(--primary-color);
}
.breadcrumb span {
margin: 0 8px;
color: #CBD5E1;
}

/* HEADER */
header h1 { text-align: center; font-size: 1.4rem; font-weight: 500; margin-bottom: 15px; }

.tablolar {
background: var(--card-bg);
padding:8px;
border-radius: 10px;
border: 1px solid var(--border-color);
margin-bottom: 20px;
position: relative;
box-shadow: 0 1px 4px -2px rgba(0, 0, 0, 0.1);
}

/* CARD */
.calculator-card {
background: var(--card-bg);
padding: 24px 16px;
border-radius: 10px;
border: 1px solid var(--border-color);
margin-bottom: 20px;
box-shadow: 0 1px 4px -2px rgba(0, 0, 0, 0.1);
}

/* INPUTS */
.input-group {
position: relative;
margin-bottom: 24px;
}
.input-group > label {
position: absolute;
top: -10px;
left: 12px;
background: white;
padding: 1px 5px;
font-weight: 500;
font-size: 11px;
color: var(--primary-color);
z-index: 10;
text-transform: uppercase;
}
input {
width: 100%;
padding: 12px 15px;
border: 1px solid #D1D5DB;
border-radius: 8px;
font-size: 16px;
outline: none;
transition: border-color 0.2s;
}
input:focus {
border-color: var(--primary-color);
}

/* BUTTONS */
.main-btn {
width: 100%;
padding: 12px;
background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 5%, #f3f4f6 50%, #e5e7eb 100%);
color: var(--text-main);
border: 1px solid #a5a5a5;
border-radius: 8px;
font-size: 18px;
font-weight: 600;
cursor: pointer;
text-shadow: 0 1px 0 #fff;
}
.main-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}

/* SEARCHABLE DROPDOWN */
.search-container {
position: relative;
width: 100%;
}
.dropdown-icon {
position: absolute;
right: 15px;
top: 50%;
transform: translateY(-50%);
color: var(--text-muted);
pointer-events: none;
transition: transform 0.3s ease;
}
.search-container.active .dropdown-icon {
transform: translateY(-50%) rotate(180deg);
}
.dropdown-list {
position: absolute;
top: calc(100% + 5px);
left: 0;
width: 100%;
max-height: 350px;
background: white;
border-radius: 12px;
overflow-y: auto;
z-index: 2000;
display: none;
border: 1px solid rgba(0, 0, 0, 0.05);
animation: slideDown 0.2s ease-out;
}
.search-container.active .dropdown-list {
display: block;
}
.dropdown-item {
padding: 7px 7px;
font-size: 16px;
color: var(--text-main);
cursor: pointer;
border-bottom: 1px solid #f1f5f9;
transition: all 0.3s ease;
font-weight: 500;
}
@media (hover: hover) {
.dropdown-item:hover {
background-color: #f1f5f9;
color: var(--primary-color);
padding-left: 15px; /* Biraz daha belirgin bir kayma */
}
}

.stats-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 8px;
}
.value {
font-size: 18px;
color: #878c91;
font-weight: 400;
}
.stat-item {
display: flex;
background: #fff;
border: 1px solid var(--border-color);
padding: 8px 5px;
border-radius: 10px;
text-align: center;
flex-direction: column;
justify-content: center;
overflow: hidden;
}
.stat-item .label {
font-size: 11px;
color: var(--text-muted);
display: block;
margin-bottom:2px;
font-weight: 600;
text-transform: uppercase;
white-space: nowrap;
}
.section-title {
font-size: 12px;
color: var(--text-muted);
margin-bottom: 10px;
}
.chart-box .section-title {
position: absolute;
top: -8px;
left: 50%;
transform: translateX(-50%);
background: #fff;
padding: 0 10px;
margin-bottom: 0;
z-index: 10;
white-space: nowrap;
}
.chart-box {
background: #fff;
border: 1px solid var(--border-color);
border-radius: 10px;
padding: 15px 4px 10px;
position: relative;
margin-top: 25px;
}
.unit-label {
position: absolute;
top: 4px;
right: 11px;
font-size: 12px;
letter-spacing: 0.5px;
color: var(--text-muted);
}

.mavi { color: var(--primary-color) !important; }
.kirmizi { color: var(--error-color) !important; }

.mt-10 { margin-top: 10px !important; }
.mt-20 { margin-top: 20px !important; }
.mb-10 {display: block;margin-bottom: 16px;}

.edu-val {
font-size: 14px;
font-weight: 400;
color: var(--error-color);
}

/* TABLO STİLLERİ */
.hesaplamalar {
width: 100%;
border-collapse: collapse;
text-align: center;
}
.hesaplamalar th {
background: #fbfbfb;
padding: 12px 4px;
color: var(--text-muted);
border-bottom: 1px solid var(--border-color);
}
.hesaplamalar td {height: 42px;
padding: 8px 3px;
border-bottom: 1px solid var(--border-color);
font-size:18px;
}
.hesaplamalar tr:last-child td {
border-bottom: none;
}
.hesaplamalar tbody tr:nth-child(even) {
background-color: #fbfbfb;
}

.hesaplamalar th:first-child { max-width: 50px; }
.hesaplamalar td:first-child {width:13%;}
.hesaplamalar td:last-child {width:17%;}
.inst-name {text-align: left;
font-weight: 400;
}

/* POPÜLER TAGLAR */
.popular-tags {
margin-top: 25px;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 8px;
}
.tag {
padding: 6px 12px;
background: #fff;
border: 1px solid var(--border-color);
border-radius: 8px;
font-size: 13px;
color: var(--text-muted);
text-decoration: none;
transition: all 0.2s;
}
.tag:hover {
background: var(--primary-color);
color: #fff;
border-color: var(--primary-color);
}



/* VEYA daha garantisi, üst kapsayıcıyla beraber yazmak: */
 .score-val {color: var(--primary-color);

}
.kon-val {color: var(--error-color);

}

/* =========================================
   KADRO SAYFASI — Tablo Filtre & Sıralama
   ========================================= */
.th-filter {
    width: 100%;
    padding: 7px 2px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-muted);
    outline: none;
    text-align: center;
    transition: all 0.2s;
    border: 1px solid #e0e0e0;
}
.th-filter:focus {
background: white;
border-color: var(--primary-color);
color: var(--primary-color);
}
.th-filter::placeholder { color: #94a3b8; font-weight: 600; }

.hesaplamalar th.sortable { cursor: pointer; position: relative; user-select: none;}
.hesaplamalar th.sortable:hover { background: #f8fafc; }
.hesaplamalar th.sortable.active { color: var(--primary-color); }

.th-puan { color: var(--primary-color); font-size: 11px; font-weight: 700; display: block; }
.th-kont { color: var(--error-color); font-size: 11px; font-weight: 700; display: block; opacity: 0.8; }
.th-sort-icon { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); font-size: 14px; opacity: 0.45; }

/* Loading Spinner */
.loader-spinner {
width: 36px; height: 36px;
border: 3px solid #e5e7eb;
border-top-color: var(--primary-color);
border-radius: 50%;
animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Dönem Searchable Dropdown (TH içi) */
.period-container { position: relative; }
.period-container .dropdown-list {
position: absolute;
top: calc(100% + 4px);
left: -8px;
min-width: 130px;
max-height: 320px;
background: white;
border-radius: 10px;
overflow-y: auto;
z-index: 500;
display: none;
border: 1px solid rgba(0, 0, 0, 0.08);
box-shadow: 0 0px 15px rgba(0, 0, 0, 0.12);
}
.period-container.active .dropdown-list { display: block; }
.period-container .dropdown-list .sticky-item {
position: sticky;
top: 0;
background: #fff;
z-index: 10;
font-weight: 600;
border-bottom: 1px solid #e2e8f0;
border-top-left-radius: 9px;
border-top-right-radius: 9px;
}

b {font-weight: 600;}

/* Sticky Header */
.hesaplamalar thead {
position: sticky;
top: 0px; /* Breadcrumb ve Header payı varsa ayarlanabilir */
z-index: 100;
background: #fff;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
height:60px;
}

/* Pagination */
.pagination-container {
display: flex;
justify-content: center;
align-items: center;
gap: 8px;
padding: 10px;
flex-wrap: wrap;
}
.page-link {
display: flex;
align-items: center;
justify-content: center;
min-width: 38px;
height: 38px;
padding: 0 6px;
background: #fff;
border: 1px solid var(--border-color);
border-radius: 8px;
color: var(--text-main);
font-size: 14px;
font-weight: 600;
text-decoration: none;
cursor: pointer;
transition: all 0.2s;
}
.page-link:hover {
background: #f1f5f9;
border-color: #cbd5e1;
}
.page-link.active {
background: var(--primary-color);
color: #fff;
border-color: var(--primary-color);
}
.page-link.disabled {
opacity: 0.5;
cursor: not-allowed;
background: #f8fafc;
}


.metin {
font-size: 18px;
font-weight: 400;
color: black;
line-height: 1.5em;
}

/* Sade Bilgi Listesi */
.metin ul {
list-style: none;
padding: 0;
margin: 4px 0 0 6px;
}
.metin ul li {
position: relative;
padding-left: 16px;
margin-bottom:2px;
}

.metin ul li::before {
content: "●";
position: absolute;
left: 0;
color: var(--error-color);
font-size: 18px;
line-height: 1;
top:3px;
}



.sonuc {
text-align: center;
padding: 8px;
font-size: 12px;
color: var(--text-muted);
}

.tabloading {
display: none;
position: absolute;
inset: 0;
align-items: center;
justify-content: center;
background: rgba(255,255,255,0.85);
z-index: 10;
border-radius: 10px;
min-height: 80px;
}


/* INFO ACCORDION */
.info-accordion {
position: relative;
padding-bottom:40px !important; /* Buton için alan */
transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-content {
max-height:50px; /* İlk başta kısıtlı yükseklik */
overflow: hidden;
position: relative;
transition: max-height 0.4s ease-in-out;
}

/* Kısıtlıyken alt tarafa fade (erime) efekti */
.info-content::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height:4px;
background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
transition: opacity 0.3s;
}

/* Açıldığında yükseklik kısıtlamasını ve fade efektini kaldır */
.info-accordion.expanded .info-content {
max-height: 2000px; /* İçerik kadar uzasın */
}
.info-accordion.expanded .info-content::after {
opacity: 0;
pointer-events: none;
}

/* Genişletme Butonu */
.expand-btn {
position: absolute;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
background: #ffffff;
border: 1px solid #ececec;
padding: 6px 20px;
border-radius: 8px;
font-size: 12px;
color: var(--text-main);
cursor: pointer;
transition: all 0.2s;
z-index: 5;
font-weight: 600;
}

.expand-btn::after {
content: "TAMAMI";
}

.info-accordion.expanded .expand-btn::after {
content: "GİZLE";
}

.expand-btn:hover {
background: var(--primary-color);
color: #fff;
border-color: var(--primary-color);
}

.all-placements {
margin-top: 15px;
}
.placements-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
margin-top: 15px;
}
.placement-item {
background: #fff;
border: 1px solid var(--border-color);
padding: 10px;
border-radius: 8px;
font-size: 16px;
color: var(--text-main);
text-decoration: none;
transition: all 0.2s;
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 400;
position:relative;
}
.placement-item:hover {
border-color: var(--primary-color);
background: #f8fafc;
color: var(--primary-color);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.okk {
font-size: 20px;
position: absolute;
right: 10px;
font-family: cursive;
color: #dfdfdf;
}

.not-card {
background: #fffcf0;
border: 1px solid #fde68a;
padding: 14px 16px;
border-radius: 10px;
margin-bottom: 20px;
color: #692f0c;
font-size: 17px;
display: flex;
gap: 12px;
justify-content: center;
font-weight: 400;
box-shadow: 0 1px 4px -2px rgba(0, 0, 0, 0.1);
}

/* RESPONSIVE */
@media (max-width: 500px) {
.not-card { padding: 10px 12px; font-size: 13px; gap: 8px; }
.tabs-grid { grid-template-columns: 1fr; }
header h1 { font-size: 1.2rem; }
.calculator-card {padding:18px 10px;}
.hesaplamalar td {font-size: 14px;}
.metin, .metin ul li {font-size: 15px;}
.stats-grid {gap:6px;}
.tablolar {padding:4px;}
.th-filter {font-size: 10px;}
.edu-val {font-size: 12px;}
}

@media (max-width: 360px) {
.hesaplamalar td {font-size: 12px;}
.placements-grid {grid-template-columns: 1fr;}
}

/* Şehirlere Göre Hızlı Erişim Grid */
.calculator-card h3 { font-size: 14px; text-align: center; margin-bottom: 15px; }
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.city-grid a {
display: block; padding: 8px 4px; text-align: center; background: var(--bg-color);
color: var(--text-main); font-size: 12px; font-weight: 500; text-decoration: none;
border-radius: 6px; border: 1px solid var(--border-color); transition: all 0.2s;
}
.city-grid a:hover { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }

.all-cities-btn {
display: block;
width: 100%;
text-align: center;
padding: 10px;
margin-top: 12px;
background: var(--primary-color);
color: #fff;
font-size: 13px;
font-weight: 600;
text-decoration: none;
border-radius: 6px;
transition: background 0.2s;
border: 1px solid transparent;
}
.all-cities-btn:hover {
background: var(--primary-hover);
}
