/* ==========================================================================
   TÜRKİYE SİYASİ HARİTASI & İL SINIRLARI & SABİT MEDENİYET KONUMLARI (MAP.CSS)
   Ders Kitaplarına Uygun, Vektörel, İl Sınırları Belirgin ve Akıllı Tahtaya Uyumlu
   ========================================================================== */

.map-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  background: var(--bg-card, #FFFFFF);
  padding: 1.25rem 2rem;
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color, #E2E8F0);
}

.map-title-group .map-title {
  font-family: var(--font-serif, 'Cinzel', serif);
  font-size: 1.65rem;
  color: var(--text-dark, #1E293B);
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.map-title-group .map-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted, #64748B);
}

/* Zaman Çizelgesi Filtre Çubuğu */
.timeline-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-pill {
  padding: 0.65rem 1.2rem;
  border-radius: 9999px;
  border: 1.5px solid var(--border-color, #CBD5E1);
  background: var(--bg-surface, #F8FAFC);
  color: var(--text-dark, #1E293B);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  background: var(--color-primary-light, #FEF3C7);
  color: var(--color-primary, #8B4513);
  border-color: var(--color-primary, #8B4513);
}

.filter-pill.active {
  background: var(--color-primary, #8B4513);
  color: #FFFFFF;
  border-color: var(--color-primary, #8B4513);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.28);
}

/* Harita SVG Konteyneri - Ezilme Yapmayan Responsive Yapı */
.map-canvas-container {
  position: relative;
  width: 100%;
  background: #C7E2F2;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border: 3px solid #FFFFFF;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.turkey-svg {
  width: 100%;
  height: auto;
  max-height: 80vh;
  display: block;
  user-select: none;
  background: #C7E2F2;
}

/* 81 İl Vektörel Siyasi Harita Parçaları */
#turkiye path {
  fill: #F6EFE2;
  stroke: #B89C7A;
  stroke-width: 0.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: fill 0.2s ease, stroke 0.2s ease;
  cursor: pointer;
}

#turkiye path:hover {
  fill: #EBD6AD;
  stroke: #8B4513;
  stroke-width: 1.3;
}

#turkiye g.highlighted-province path {
  fill: #FEF3C7 !important;
  stroke: #B45309 !important;
  stroke-width: 1.5 !important;
}

/* İl Sınırları & Ülke Dış Hatları */
.turkey-land-base {
  fill: #FBF7EE;
  transition: fill 0.2s ease;
}

.province-boundary {
  fill: none;
  stroke: #C9B8A2;
  stroke-width: 0.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.turkey-outer-border {
  fill: none;
  stroke: #795548;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* Deniz ve Göl İsimleri */
.map-water-label {
  font-family: var(--font-serif, 'Cinzel', serif);
  font-size: 13px;
  letter-spacing: 5px;
  fill: #486581;
  opacity: 0.8;
  font-weight: 700;
  pointer-events: none;
}

.map-lake-label {
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 11px;
  fill: #1E3A8A;
  font-weight: 700;
  pointer-events: none;
}

/* ==========================================================================
   SABİT KIRMIZI KONUM İĞNELERİ (AKILLI TAHTA UYUMLU, ASLA KAYMAZ)
   ========================================================================== */

.civ-map-marker {
  cursor: pointer;
  outline: none;
  transform-origin: center center;
}

/* Kırmızı İğne Gövdesi */
.marker-pin-body {
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
  transition: stroke 0.2s ease, filter 0.2s ease;
}

/* Fareyle Yaklaşınca veya Tıklanınca Sadece Altın Çerçeve Parlar, YERİNDEN ASLA OYNAMAZ */
.civ-map-marker:hover .marker-pin-body,
.civ-map-marker:focus-visible .marker-pin-body {
  stroke: #FFD700;
  stroke-width: 2;
  filter: drop-shadow(0 4px 12px rgba(220, 38, 38, 0.7));
}

.civ-map-marker.selected .marker-pin-body {
  stroke: #FFD700;
  stroke-width: 2.4;
  filter: drop-shadow(0 6px 16px rgba(220, 38, 38, 0.9));
}

/* Sabit Konum İğnesi Taban Gölgesi */
.marker-shadow {
  pointer-events: none;
  opacity: 0.55;
}

/* Sabit Yazı Etiketi (ASLA SAĞA-SOLA KAYMAZ, YERİNDE SABİT) */
.marker-label-group {
  pointer-events: none;
}

.marker-label-bg {
  fill: rgba(28, 20, 16, 0.92);
  stroke: #EA4335;
  stroke-width: 1.2;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
  transition: stroke 0.2s ease, fill 0.2s ease;
}

.civ-map-marker:hover .marker-label-bg,
.civ-map-marker.selected .marker-label-bg {
  stroke: #FFD700;
  stroke-width: 1.6;
  fill: #1A1412;
}

.marker-label-text {
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 10.5px;
  font-weight: 700;
  fill: #FFFFFF;
  letter-spacing: 0.3px;
  pointer-events: none;
}

.civ-map-marker:hover .marker-label-text,
.civ-map-marker.selected .marker-label-text {
  fill: #FFD700;
}

/* Harita Üzerinde Açılan Eser Önizleme Kartı */
.civ-preview-card {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 400px;
  max-width: calc(100% - 40px);
  background: var(--bg-card, #FFFFFF);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  z-index: 25;
  overflow: hidden;
  border: 1px solid var(--border-color, #CBD5E1);
  animation: card-appear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes card-appear {
  from { transform: translateY(20px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.preview-card-inner {
  padding: 1.5rem;
  position: relative;
}

.preview-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface, #F1F5F9);
  border: 1px solid var(--border-color, #CBD5E1);
  color: var(--text-dark, #1E293B);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.preview-close-btn:hover {
  background: #FEE2E2;
  color: #DC2626;
  border-color: #DC2626;
}

.preview-header {
  margin-bottom: 1.25rem;
}

.preview-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.preview-title {
  font-family: var(--font-serif, 'Cinzel', serif);
  font-size: 1.6rem;
  color: var(--text-dark, #1E293B);
  margin-bottom: 0.25rem;
}

.preview-tagline {
  font-size: 0.9rem;
  color: var(--text-muted, #64748B);
  line-height: 1.4;
}

.preview-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.info-pill {
  background: var(--bg-surface, #F8FAFC);
  padding: 0.75rem;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border: 1px solid var(--border-color, #E2E8F0);
}

.info-pill.full-width {
  grid-column: span 2;
}

.info-pill-icon {
  font-size: 1.2rem;
}

.info-pill-text {
  display: flex;
  flex-direction: column;
}

.info-pill-text strong {
  font-size: 0.75rem;
  color: var(--text-muted, #64748B);
  text-transform: uppercase;
}

.info-pill-text span {
  font-size: 0.88rem;
  color: var(--text-dark, #1E293B);
  font-weight: 600;
}

.btn-enter-period {
  width: 100%;
  min-height: 52px;
  padding: 0.9rem 1.25rem;
  color: #FFFFFF;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-enter-period:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Harita Alt Bilgi Çubuğu */
.map-footer-guide {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card, #FFFFFF);
  padding: 1rem 1.75rem;
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--border-color, #E2E8F0);
  font-size: 0.95rem;
  color: var(--text-dark, #1E293B);
}

.guide-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.guide-seal-icon {
  font-size: 1.4rem;
}

.guide-badge-count {
  font-weight: 700;
  color: var(--color-primary, #8B4513);
  background: var(--color-primary-light, #FEF3C7);
  padding: 0.45rem 1rem;
  border-radius: 9999px;
}

/* Mobil / Akıllı Tahta Uyumu */
@media (max-width: 900px) {
  .civ-preview-card {
    position: relative;
    bottom: auto;
    right: auto;
    width: 100%;
    margin-top: 1rem;
  }
}
