/* ===== GENEL RESET & TEMEL ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  --text-dark: #1e293b;
  --text-mid: #475569;
  --text-light: #94a3b8;
  --bg: #f4f6f8;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ===== HARİTA BÖLÜMÜ ===== */
.map-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 20px 0;
}
.map-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  border: 2px solid #e2e8f0;
}
#istanbul-map {
  width: 100%;
  height: 480px;
  z-index: 1;
}
.map-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  padding: 14px 20px;
  border-radius: 12px;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  pointer-events: none;
}
.map-overlay h2 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
}
.map-overlay p {
  font-size: 13px;
  color: #64748b;
}

/* Özel cluster ikonları */
.district-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.4);
  border: 3px solid #fff;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.district-marker:hover {
  transform: scale(1.15);
  box-shadow: 0 5px 20px rgba(37, 99, 235, 0.6);
}
.district-marker.size-sm {
  width: 40px;
  height: 40px;
  font-size: 13px;
  background: #3b82f6;
}
.district-marker.size-md {
  width: 48px;
  height: 48px;
  font-size: 15px;
  background: #2563eb;
}
.district-marker.size-lg {
  width: 56px;
  height: 56px;
  font-size: 17px;
  background: #1d4ed8;
}
.district-marker.size-xl {
  width: 64px;
  height: 64px;
  font-size: 19px;
  background: #1e3a8a;
}

/* Harita popup özelleştirme */
.map-popup {
  text-align: center;
  min-width: 160px;
}
.map-popup h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.map-popup .popup-count {
  font-size: 28px;
  font-weight: 800;
  color: #2563eb;
  line-height: 1;
  margin-bottom: 4px;
}
.map-popup .popup-label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
}
.map-popup .popup-btn {
  display: inline-block;
  padding: 6px 16px;
  background: #2563eb;
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}
.map-popup .popup-btn:hover {
  background: #1d4ed8;
}

/* MarkerCluster override */
.marker-cluster-small {
  background-color: rgba(59, 130, 246, 0.3) !important;
}
.marker-cluster-small div {
  background-color: #3b82f6 !important;
  color: #fff !important;
  font-weight: 700;
}
.marker-cluster-medium {
  background-color: rgba(37, 99, 235, 0.3) !important;
}
.marker-cluster-medium div {
  background-color: #2563eb !important;
  color: #fff !important;
  font-weight: 700;
}
.marker-cluster-large {
  background-color: rgba(30, 58, 138, 0.3) !important;
}
.marker-cluster-large div {
  background-color: #1e3a8a !important;
  color: #fff !important;
  font-weight: 700;
}

/* ===== BİREYSEL OKUL PİNLERİ ===== */
.school-pin {
  width: 32px;
  height: 32px;
  background: #fff;
  border: 3px solid #2563eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.school-pin:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 16px rgba(37,99,235,0.4);
}

/* Okul popup stili */
.school-custom-popup .leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 0;
}
.school-custom-popup .leaflet-popup-content {
  margin: 0;
}
.school-popup {
  padding: 14px 16px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.school-popup h4 {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  line-height: 1.3;
}
.school-popup .popup-address {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 4px;
}
.school-popup .popup-category {
  font-size: 12px;
  color: #475569;
  margin-bottom: 4px;
}
.school-popup .popup-stats {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 6px;
}
.school-popup .popup-phone {
  font-size: 13px;
  color: #334155;
  margin-bottom: 6px;
}
.school-popup .popup-maps-link {
  display: inline-block;
  background: #4285f4;
  color: #fff !important;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
  flex: 1;
  text-align: center;
}
.school-popup .popup-maps-link:hover {
  background: #1a73e8;
}

/* Harita "Tüm İstanbul" butonu */
.map-back-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  padding: 10px 18px;
  border-radius: 10px;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  cursor: pointer;
  border: 2px solid #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
  display: none;
  transition: all 0.2s;
}
.map-back-btn:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.map-back-btn.visible {
  display: block;
}

/* ===== ROTA PLANLAMA ===== */
.route-toggle-btn {
  position: absolute;
  top: 16px;
  right: 200px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  padding: 10px 18px;
  border-radius: 10px;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  cursor: pointer;
  border: 2px solid #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  transition: all 0.2s;
}
.route-toggle-btn:hover, .route-toggle-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.route-panel {
  position: absolute;
  top: 60px;
  right: 16px;
  width: 320px;
  max-height: calc(100% - 80px);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  z-index: 1001;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  border: 1px solid #e2e8f0;
  display: none;
  overflow-y: auto;
}
.route-panel.visible {
  display: block;
}

.route-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.route-panel-header h3 {
  font-size: 15px;
  margin: 0;
  color: #1e293b;
}
.route-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.15s;
}
.route-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.route-waypoints {
  padding: 12px 16px;
  min-height: 60px;
}
.route-hint {
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
  margin: 12px 0;
}
.route-wp-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}
.route-wp-num {
  width: 24px;
  height: 24px;
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.route-wp-name {
  flex: 1;
  font-size: 12px;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-wp-remove {
  background: none;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s;
}
.route-wp-remove:hover {
  background: #fee2e2;
  color: #ef4444;
}

.route-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
}
.route-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.route-btn-clear {
  background: #f1f5f9;
  color: #64748b;
}
.route-btn-clear:hover {
  background: #e2e8f0;
}
.route-btn-calc {
  background: #2563eb;
  color: #fff;
}
.route-btn-calc:hover {
  background: #1d4ed8;
}

.route-info { padding: 0 16px 12px; }
.route-summary {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 10px;
  background: #eff6ff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #2563eb;
}
.route-warn {
  text-align: center;
  font-size: 13px;
  color: #f59e0b;
  padding: 8px 0;
}

/* Waypoint marker */
.waypoint-marker {
  width: 28px;
  height: 28px;
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.4);
}

/* Popup Rotaya Ekle butonu */
.popup-btns {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.popup-route-btn {
  flex: 1;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.popup-route-btn:hover {
  background: #2563eb;
  color: #fff;
}

/* Routing Machine varsayılan panelini gizle */
.leaflet-routing-container {
  display: none !important;
}

@media (max-width: 768px) {
  .route-panel {
    width: calc(100% - 32px);
    right: 16px;
  }
  .route-toggle-btn {
    right: auto;
    left: 16px;
    top: auto;
    bottom: 16px;
  }
}

/* ===== HOMEPAGE DESCRIPTION ===== */
.homepage-description {
  max-width: 1280px;
  margin: 24px auto;
  padding: 20px 24px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
.homepage-description p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: #1f2937;
}
.homepage-description strong {
  color: #0b1f5e;
}

/* ===== HEADER ===== */
.header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: hidden;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 90px;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
  display: block;
}
.logo span { color: #f59e0b; }

.nav-links {
  display: flex;
  gap: 10px;
  list-style: none;
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 1000;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: #555;
  transition: color 0.2s;
  padding: 6px 0;
}
.nav-links a:hover { color: #2563eb; }

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px !important;
  background: #0b1f5e;
  color: #ffffff !important;
  border: 1.5px solid #0b1f5e;
  border-radius: 14px;
  font-size: 14px !important;
  font-weight: 700 !important;
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(11, 31, 94, 0.18);
  min-height: 48px;
}
.nav-btn:hover {
  background: #12308a !important;
  color: #fff !important;
  border-color: #12308a;
  transform: translateY(-2px);
}
.nav-btn-alt {
  background: #fff7d6;
  color: #0b1f5e !important;
  border: 1.5px solid #f4c542;
}
.nav-btn-alt:hover {
  background: #ffefb3 !important;
  color: #0b1f5e !important;
  border-color: #f4c542;
  transform: translateY(-2px);
}
.nav-btn-lgs {
  position: relative;
}
.nav-btn-lgs::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 4px;
  border-radius: 999px;
  background: #f4c542;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  font-size: 13px;
  color: #888;
}
.breadcrumb a { color: #2563eb; }
.breadcrumb span { margin: 0 6px; color: #ccc; }

/* ===== SAYFA BAŞLIĞI ===== */
.page-title {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 16px;
}
.page-title h1 {
  font-size: 26px;
  font-weight: 700;
  color: #1e293b;
}
.page-title .result-count {
  font-size: 14px;
  color: #64748b;
  margin-top: 4px;
}
.page-title .result-count strong {
  color: #2563eb;
}

/* ===== İLÇE ÖZET KUTUSU ===== */
.ilce-summary {
  max-width: 1280px;
  margin: 0 auto 20px;
  padding: 0 20px;
}
.ilce-summary .ozet-desc {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.ilce-summary .ozet-desc p {
  font-size: 15px;
  color: #334155;
  line-height: 1.6;
  margin: 0;
}
.ilce-summary .ozet-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.ilce-summary .ozet-stat {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ilce-summary .ozet-stat-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: #1e293b;
}
.ilce-summary .ozet-stat-label {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
  font-weight: 500;
}
.ilce-summary .ozet-stat-toplam {
  border-color: #2563eb;
  background: linear-gradient(135deg, #eff6ff, #fff);
}
.ilce-summary .ozet-stat-toplam .ozet-stat-num { color: #2563eb; }
.ilce-summary .ozet-stat-devlet .ozet-stat-num { color: #059669; }
.ilce-summary .ozet-stat-ozel .ozet-stat-num { color: #d97706; }
.ilce-summary .ozet-stat-liste {
  cursor: pointer;
  border-color: #7c3aed;
  background: linear-gradient(135deg, #f5f3ff, #fff);
  transition: all 0.2s;
}
.ilce-summary .ozet-stat-liste:hover {
  background: linear-gradient(135deg, #ede9fe, #f5f3ff);
  box-shadow: 0 2px 8px rgba(124,58,237,0.15);
}
.ilce-summary .ozet-stat-liste .ozet-stat-num { font-size: 32px; }
.ilce-summary .ozet-stat-liste .ozet-stat-label { color: #7c3aed; font-weight: 600; }
.ozet-stat-hint {
  display: block;
  font-size: 11px;
  color: #a78bfa;
  margin-top: 4px;
}

.ozet-liste-panel {
  display: none;
  margin-top: 16px;
}
.ozet-liste-panel.acik {
  display: block;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ilce-summary .ozet-kategoriler {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ilce-summary .ozet-kategoriler h3 {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 12px;
}
.ilce-summary .ozet-kategoriler ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.ilce-summary .ozet-kategoriler li {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ilce-summary .ozet-kategoriler li strong {
  color: #2563eb;
  font-weight: 700;
}
.ozet-emoji {
  font-size: 16px;
}

@media (max-width: 600px) {
  .ilce-summary .ozet-stats {
    flex-direction: column;
    gap: 8px;
  }
  .ilce-summary .ozet-stat {
    padding: 12px;
  }
  .ilce-summary .ozet-stat-num {
    font-size: 22px;
  }
  .ilce-summary .ozet-kategoriler ul {
    gap: 6px;
  }
  .ilce-summary .ozet-kategoriler li {
    font-size: 13px;
    padding: 6px 10px;
  }
  .pdf-belge-inline { padding-top: 16px !important; }
  .pdf-header h3 { font-size: 16px !important; }
  .pdf-tablo th, .pdf-tablo td { padding: 8px 10px !important; font-size: 12px !important; }
  .pdf-sira { display: none; }
  .pdf-tablo th:first-child { display: none; }
  .pdf-kat { display: none; }
  .pdf-tablo th:last-child { display: none; }
}

/* ===== PDF BENZERİ BELGE (INLINE) ===== */
.pdf-belge-inline {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid #e2e8f0;
  position: relative;
}
.pdf-belge-inline::before {
  content: '';
  position: absolute;
  top: -2px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #2563eb, #7c3aed, #ec4899);
}
.pdf-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 16px;
}
.pdf-logo {
  font-size: 32px;
  flex-shrink: 0;
}
.pdf-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.pdf-header p {
  font-size: 13px;
  color: #64748b;
  margin: 2px 0 0;
}
.pdf-tarih {
  margin-left: auto;
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.pdf-indir-btn {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff !important;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.pdf-indir-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
  transform: translateY(-1px);
}

/* ===== PRINT / PDF ===== */
@media print {
  body * { visibility: hidden; }
  .pdf-belge-inline, .pdf-belge-inline * { visibility: visible; }
  .pdf-belge-inline {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    border: none;
    box-shadow: none;
  }
  .pdf-indir-btn { display: none !important; }
  .pdf-tablo tbody tr:hover { background: none; }
}
.pdf-tablo {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.pdf-tablo thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}
.pdf-tablo tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
}
.pdf-tablo tbody tr:hover {
  background: #f8fafc;
}
.pdf-tablo td {
  padding: 10px 14px;
  color: #334155;
}
.pdf-sira {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}
.pdf-kat {
  font-size: 12px;
  color: #64748b;
}
.pdf-kategori-row td {
  background: #f0f9ff;
  font-weight: 700;
  font-size: 13px;
  color: #1e293b;
  padding: 10px 14px !important;
  border-bottom: 1px solid #bfdbfe;
}
.pdf-kategori-row .pdf-kat-count {
  font-weight: 400;
  color: #64748b;
  font-size: 12px;
}
.pdf-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.pdf-badge-devlet {
  background: #ecfdf5;
  color: #059669;
}
.pdf-badge-ozel {
  background: #fffbeb;
  color: #d97706;
}
.pdf-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  color: #94a3b8;
}

/* ===== ANA İÇERİK LAYOUT ===== */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 40px;
  display: flex;
  gap: 24px;
}

/* ===== SOL SIDEBAR (FİLTRELER) ===== */
.sidebar {
  width: 280px;
  flex-shrink: 0;
}
.filter-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 16px;
  overflow: hidden;
}
.filter-card-header {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.filter-card-header .arrow {
  transition: transform 0.2s;
  font-size: 12px;
  color: #94a3b8;
}
.filter-card-header.open .arrow {
  transform: rotate(180deg);
}
.filter-card-body {
  padding: 10px 16px 14px;
  max-height: 260px;
  overflow-y: auto;
}
.filter-card-body::-webkit-scrollbar { width: 5px; }
.filter-card-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

.search-card-body {
  overflow: visible;
}

.search-enhanced {
  position: relative;
}

.search-field {
  position: relative;
}

.filter-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}
.filter-search:focus { border-color: #2563eb; }
.search-field .filter-search {
  margin-bottom: 0;
  padding-right: 38px;
}

.search-clear-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}
.search-clear-btn:hover {
  background: #cbd5e1;
  color: #0f172a;
}

.search-live-status {
  margin: 8px 2px 0;
  font-size: 12px;
  color: #64748b;
}

.search-suggestions {
  display: none;
  margin-top: 8px;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}
.search-suggestions.open {
  display: block;
}

.search-suggestion-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.search-suggestion-item:hover,
.search-suggestion-item.active {
  background: #eff6ff;
}

.search-suggestion-main {
  font-size: 13px;
  color: #0f172a;
  font-weight: 600;
}

.search-suggestion-meta {
  font-size: 11px;
  color: #64748b;
}

.filter-item {
  display: flex;
  align-items: center;
  padding: 6px 0;
  cursor: pointer;
  font-size: 13px;
  color: #475569;
  transition: color 0.15s;
}
.filter-item:hover { color: #2563eb; }
.filter-item input[type="radio"],
.filter-item input[type="checkbox"] {
  margin-right: 8px;
  accent-color: #2563eb;
}
.filter-item .count {
  margin-left: auto;
  font-size: 12px;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Aktif filtre tag */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #bfdbfe;
}
.filter-tag .remove-tag {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.filter-tag .remove-tag:hover { opacity: 1; }
.clear-all {
  font-size: 13px;
  color: #ef4444;
  cursor: pointer;
  align-self: center;
  font-weight: 500;
}
.clear-all:hover { text-decoration: underline; }

/* ===== OKUL KARTLARI ===== */
.content-area {
  flex: 1;
  min-width: 0;
}

.school-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.school-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
}
.school-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.card-image {
  height: 160px;
  background: #f8faff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-has-photo {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-color: #f8faff !important;
}
.card-image .school-icon {
  font-size: 48px;
  opacity: 0.3;
}
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255,255,255,0.95);
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.card-body {
  padding: 14px 16px;
}
.card-body h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-location {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
}
.card-location i { margin-right: 4px; }

.card-phone {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 6px;
}

.card-address {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 10px;
}
.card-stats .stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-detail-btn,
.card-web-btn {
  flex: 1 1 calc(50% - 4px);
  display: block;
  text-align: center;
  background: #f1f5f9;
  color: #334155 !important;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
  text-decoration: none;
}
.card-detail-btn {
  background: #eff6ff;
  color: #1d4ed8 !important;
}
.card-detail-btn:hover {
  background: #dbeafe;
}
.card-web-btn:hover {
  background: #e2e8f0;
}
.card-maps-btn {
  flex: 1 1 calc(50% - 4px);
  display: block;
  text-align: center;
  background: #4285f4;
  color: #fff !important;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.card-maps-btn:hover {
  background: #1a73e8;
  transform: scale(1.02);
}

.card-has-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Renk gradient varyasyonları */
.card-image.gradient-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.card-image.gradient-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.card-image.gradient-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.card-image.gradient-4 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.card-image.gradient-5 { background: linear-gradient(135deg, #fa709a, #fee140); }
.card-image.gradient-6 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.card-image.gradient-7 { background: linear-gradient(135deg, #fccb90, #d57eeb); }
.card-image.gradient-8 { background: linear-gradient(135deg, #e0c3fc, #8ec5fc); }

/* ===== SAYFALAMA ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
}
.pagination button {
  width: 38px;
  height: 38px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  font-size: 14px;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pagination button:hover {
  border-color: #2563eb;
  color: #2563eb;
}
.pagination button.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination .page-info {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 8px;
}

/* ===== İLÇELER LİSTESİ (ALT BÖLÜM) ===== */
.districts-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}
.districts-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}
.districts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.districts-grid a {
  font-size: 13px;
  color: #2563eb;
  padding: 8px 14px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.15s;
}
.districts-grid a:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.districts-grid a.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* ===== FOOTER ===== */
.footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 40px 20px;
  margin-top: 20px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}
.footer h4 {
  color: #f1f5f9;
  font-size: 15px;
  margin-bottom: 14px;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul a {
  font-size: 13px;
  color: #94a3b8;
  transition: color 0.15s;
}
.footer ul a:hover { color: #fff; }
.footer-bottom {
  max-width: 1280px;
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid #334155;
  font-size: 13px;
  text-align: center;
}
.footer-email {
  margin-top: 10px;
  font-size: 14px;
  letter-spacing: 0.3px;
}
.footer-email a {
  color: #f4c542;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.footer-email a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.visitor-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
}
.counter-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.counter-text strong {
  color: #f4c542;
  font-weight: 700;
}

/* ===== BOŞ DURUM ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: #64748b; margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* ===== MOBİL RESPONSIVE ===== */
@media (max-width: 900px) {
  .main-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
  }
  .nav-links { display: none !important; }
  .school-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .header-inner { height: 64px; }
  .logo-img { height: 50px; }
  .page-title h1 { font-size: 20px; }
  .school-grid {
    grid-template-columns: 1fr;
  }
  .districts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Harita mobil yüksekliği */
  #istanbul-map {
    height: 320px;
  }

  /* iOS zoom önleme */
  .filter-search,
  input[type="text"],
  input[type="search"] {
    font-size: 16px;
  }

  /* Harita overlay küçültme */
  .map-overlay {
    padding: 8px 12px;
    max-width: 180px;
  }
  .map-overlay h2 { font-size: 13px; }
  .map-overlay p { font-size: 11px; }

  /* Geri butonu */
  .map-back-btn {
    top: auto;
    bottom: 12px;
    right: 12px;
    font-size: 12px;
    padding: 8px 12px;
  }

  /* Okul kartı */
  .card-image { height: 120px; }
  .card-body { padding: 10px 12px; }
  .card-body h3 { font-size: 14px; }
}

/* ===== HAMBURGer MENÜ ===== */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: #333;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.hamburger-btn:hover { background: #f1f5f9; }

.mobile-menu {
  display: none;
  background: #0b1f5e;
  border-top: 1px solid #1a3278;
  padding: 8px 0;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu ul li a {
  display: block;
  padding: 12px 20px;
  font-size: 15px;
  color: #ffffff;
  font-weight: 600;
  border-bottom: 1px solid #1a3278;
  transition: background 0.15s;
}
.mobile-menu ul li a:hover {
  background: #12308a;
  color: #f4c542;
}

@media (max-width: 900px) {
  .hamburger-btn { display: block; }
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  color: #fff;
  padding: 12px 20px;
}
.stats-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 32px;
}
.stat-num {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.stat-label {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,0.25);
}
@media (max-width: 600px) {
  .stat-item { padding: 4px 16px; }
  .stat-num { font-size: 18px; }
  .stat-label { font-size: 10px; }
  .stat-divider { height: 28px; }
}

/* ===== FİLTRE - SECTOR BADGE ===== */
.sektor-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
}
.sektor-badge.devlet {
  background: #dcfce7;
  color: #16a34a;
}
.sektor-badge.ozel {
  background: #fef3c7;
  color: #d97706;
}

/* ===== HEADER GELİŞTİRME ===== */
.header {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ===== OKUL KARTI GELİŞTİRME ===== */
.school-card {
  border: 1px solid transparent;
  transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
}
.school-card:hover {
  border-color: var(--primary-border);
}

/* ===== FİLTRE KARTI GELİŞTİRME ===== */
.filter-card {
  border: 1px solid var(--border);
}
.filter-card-header {
  background: #fafafa;
}
.filter-card-header:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ===== SIDEBAR STİCKY (desktop) ===== */
@media (min-width: 901px) {
  .sidebar {
    position: sticky;
    top: 80px;
    align-self: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
  .sidebar::-webkit-scrollbar { width: 4px; }
  .sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
}

/* ===== LOADING OVERLAY ===== */
#page-loader {
  transition: opacity 0.4s ease;
}
#page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===== BREADCRUMB GELİŞTİRME ===== */
.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  margin-bottom: 0;
}
.breadcrumb a { font-weight: 500; }

/* ===== SAYFA BAŞLIĞI GELİŞTİRME ===== */
.page-title {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px 16px;
  margin-bottom: 4px;
}
.page-title-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.page-title h1 {
  font-size: 22px;
  font-weight: 700;
}
.result-count {
  font-size: 14px;
  color: var(--text-light);
}
.result-count strong { color: var(--primary); }

/* ===== FOOTER GELİŞTİRME ===== */
.footer-logo {
  font-size: 20px;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 8px;
}
.footer-logo span { color: #fcd34d; }
.footer-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
  max-width: 220px;
}

/* ===== OKUL GRİDİ MİN YÜKSEKLİK ===== */
.content-area {
  min-height: 400px;
}

