/* ==========================================================
   HUK Kampus Kesif Haritasi — Stylesheet
   ========================================================== */

/* ── Eski haritayi gizle (yeni sistem aktif) ── */
#huk-map-section { display: none !important; }

/* ── Section ── */
.hkh-section {
  margin: 40px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.hkh-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ── */
.hkh-header {
  margin-bottom: 20px;
  text-align: center;
}
.hkh-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--huk-sea, #1A6985) 0%, var(--huk-terra, #E8744A) 100%);
  color: #fff;
  margin-bottom: 10px;
}
.hkh-header h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--huk-text, #2C1810);
  margin: 0 0 6px;
}
.hkh-header p {
  font-size: 15px;
  color: var(--huk-text-muted, #8B7E6A);
  margin: 0;
}

/* ── Filtreler ── */
.hkh-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  justify-content: center;
}
.hkh-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 2px solid var(--cat-color, #ccc);
  border-radius: 24px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--huk-text, #2C1810);
  transition: all 0.25s ease;
  user-select: none;
}
.hkh-filter-btn.active {
  background: var(--cat-color, #ccc);
  color: #fff;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--cat-color, #ccc) 40%, transparent);
}
.hkh-filter-btn:not(.active) {
  opacity: 0.55;
}
.hkh-filter-btn:hover {
  transform: translateY(-1px);
  opacity: 1;
}
.hkh-filter-icon { font-size: 16px; }
.hkh-filter-count {
  background: rgba(255,255,255,0.3);
  padding: 1px 7px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}
.hkh-filter-btn:not(.active) .hkh-filter-count {
  background: rgba(0,0,0,0.08);
}

/* ── Map Body (Map + Sidebar) ── */
.hkh-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  border: 1px solid var(--huk-border, #E8E3D8);
  background: var(--huk-surface, #FDFAF5);
}

/* ── Map ── */
.hkh-map-wrap {
  position: relative;
  min-height: 520px;
}
.hkh-map {
  width: 100%;
  height: 100%;
  min-height: 520px;
  z-index: 1;
}

/* ── Zoom hint (macro) ── */
.hkh-zoom-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--huk-surface, #FDFAF5);
  color: var(--huk-text, #2C1810);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  pointer-events: none;
  animation: hkhPulse 2.5s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes hkhPulse {
  0%,100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.8; transform: translateX(-50%) scale(1.03); }
}

/* ── UGC Trigger Button ── */
.hkh-ugc-trigger {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--huk-terra, #E8744A), #F59E0B);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(232,116,74,0.4);
  transition: all 0.3s ease;
}
.hkh-ugc-trigger:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 24px rgba(232,116,74,0.5);
}

/* ── Sidebar ── */
.hkh-sidebar {
  max-height: 520px;
  overflow-y: auto;
  padding: 12px;
  background: var(--huk-bg, #F7F0E3);
  border-left: 1px solid var(--huk-border, #E8E3D8);
}
.hkh-sidebar::-webkit-scrollbar { width: 6px; }
.hkh-sidebar::-webkit-scrollbar-track { background: transparent; }
.hkh-sidebar::-webkit-scrollbar-thumb { background: var(--huk-border, #ccc); border-radius: 3px; }

.hkh-sidebar-group { margin-bottom: 16px; }
.hkh-sidebar-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid currentColor;
}
.hkh-sidebar-title span { font-weight: 400; opacity: 0.7; }

.hkh-sidebar-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}
.hkh-sidebar-card:hover {
  background: var(--huk-surface, #FDFAF5);
  transform: translateX(4px);
}
.hkh-sidebar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hkh-sidebar-info {
  flex: 1;
  min-width: 0;
}
.hkh-sidebar-info strong {
  display: block;
  font-size: 13px;
  color: var(--huk-text, #2C1810);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hkh-sidebar-info span {
  display: block;
  font-size: 11px;
  color: var(--huk-text-muted, #8B7E6A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hkh-sidebar-price {
  font-weight: 600;
  color: var(--huk-terra, #E8744A) !important;
}
.hkh-sidebar-arrow {
  width: 16px;
  height: 16px;
  opacity: 0.3;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.hkh-sidebar-card:hover .hkh-sidebar-arrow { opacity: 0.7; }
.hkh-sidebar-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--huk-text-muted, #8B7E6A);
  font-size: 14px;
}

/* ══════════════════════════════════════
   MARKER Stilleri
   ══════════════════════════════════════ */

/* Universite marker */
.hkh-marker-uni { background: none !important; border: none !important; }
.hkh-marker-uni-inner {
  width: 48px;
  height: 48px;
  border-radius: 50% 50% 50% 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 3px 12px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
  position: relative;
}
.hkh-marker-uni-inner:hover { transform: scale(1.15); }
.hkh-marker-uni-icon { font-size: 18px; line-height: 1; }
.hkh-marker-uni-code {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-top: 1px;
}

/* POI marker */
.hkh-marker-poi { background: none !important; border: none !important; }
.hkh-marker-poi-inner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  transition: transform 0.2s ease;
  border: 2px solid rgba(255,255,255,0.6);
}
.hkh-marker-poi-inner:hover { transform: scale(1.2); }

/* Cluster */
.hkh-cluster-icon { background: none !important; border: none !important; }
.hkh-cluster {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  border: 3px solid rgba(255,255,255,0.7);
  box-shadow: 0 3px 12px rgba(0,0,0,0.25);
}
.hkh-cluster-small { background: var(--huk-sea, #1A6985); }
.hkh-cluster-medium { background: var(--huk-terra, #E8744A); width: 52px; height: 52px; font-size: 16px; }
.hkh-cluster-large { background: #DC2626; width: 60px; height: 60px; font-size: 18px; }

/* ══════════════════════════════════════
   POPUP Stilleri
   ══════════════════════════════════════ */
.hkh-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: 14px !important;
  padding: 0 !important;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15) !important;
  background: var(--huk-surface, #FDFAF5) !important;
}
.hkh-popup-wrap .leaflet-popup-content { margin: 0 !important; min-width: 240px; max-width: 300px; width: 280px !important; }
.hkh-popup-wrap .leaflet-popup-tip { background: var(--huk-surface, #FDFAF5) !important; }

.hkh-popup { padding: 16px; font-size: 13px; }
.hkh-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 2px solid;
}
.hkh-popup-emoji { font-size: 28px; }
.hkh-popup-header strong {
  display: block;
  font-size: 15px;
  color: var(--huk-text, #2C1810);
  line-height: 1.3;
}
.hkh-popup-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hkh-popup-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--huk-text-secondary, #5C5043);
  margin-bottom: 4px;
}
.hkh-popup-desc {
  font-size: 12px;
  color: var(--huk-text-muted, #8B7E6A);
  margin: 8px 0;
  line-height: 1.5;
}
.hkh-popup-author {
  font-size: 11px;
  color: var(--huk-terra, #E8744A);
  font-weight: 600;
  margin-top: 6px;
}
.hkh-popup-link {
  display: block;
  margin-top: 10px;
  padding: 8px 16px;
  text-align: center;
  border-radius: 8px;
  background: var(--huk-sea, #1A6985);
  color: #fff !important;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.2s;
}
.hkh-popup-link:hover { background: #155a73; }

/* ══════════════════════════════════════
   UGC Overlay & Form
   ══════════════════════════════════════ */
.hkh-ugc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hkh-ugc-overlay.open {
  display: flex;
  animation: hkhFadeIn 0.3s ease;
}
@keyframes hkhFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.hkh-ugc-panel {
  background: var(--huk-surface, #FDFAF5);
  border-radius: 20px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 60px rgba(0,0,0,0.2);
  animation: hkhSlideUp 0.3s ease;
}
@keyframes hkhSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.hkh-ugc-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--huk-bg, #F7F0E3);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--huk-text-muted, #8B7E6A);
  transition: all 0.2s;
}
.hkh-ugc-close:hover { background: #eee; color: #333; }

.hkh-ugc-panel h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--huk-text, #2C1810);
  margin: 0 0 4px;
}
.hkh-ugc-subtitle {
  font-size: 14px;
  color: var(--huk-text-muted, #8B7E6A);
  margin: 0 0 24px;
}

/* Form fields */
.hkh-field { margin-bottom: 18px; }
.hkh-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--huk-text, #2C1810);
  margin-bottom: 6px;
}
.hkh-field input[type="text"],
.hkh-field select,
.hkh-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--huk-border, #E8E3D8);
  border-radius: 10px;
  font-size: 14px;
  background: var(--huk-bg, #F7F0E3);
  color: var(--huk-text, #2C1810);
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.hkh-field input:focus,
.hkh-field select:focus,
.hkh-field textarea:focus {
  outline: none;
  border-color: var(--huk-terra, #E8744A);
}
.hkh-field-hint {
  font-size: 11px;
  color: var(--huk-text-muted, #8B7E6A);
  margin-top: 4px;
}

/* Mini map */
.hkh-ugc-minimap {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  border: 2px solid var(--huk-border, #E8E3D8);
  z-index: 1;
}

/* Buttons */
.hkh-ugc-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.hkh-btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  flex: 1;
  text-align: center;
}
.hkh-btn-primary {
  background: linear-gradient(135deg, var(--huk-terra, #E8744A), #F59E0B);
  color: #fff;
  box-shadow: 0 4px 12px rgba(232,116,74,0.3);
}
.hkh-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232,116,74,0.4);
}
.hkh-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.hkh-btn-ghost {
  background: transparent;
  border: 2px solid var(--huk-border, #E8E3D8);
  color: var(--huk-text-muted, #8B7E6A);
}
.hkh-btn-ghost:hover {
  background: var(--huk-bg, #F7F0E3);
}

/* UGC Success/Error */
.hkh-ugc-msg {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.hkh-ugc-msg-success {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.hkh-ugc-msg-error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

/* Login prompt */
.hkh-ugc-login {
  text-align: center;
  padding: 32px 20px;
}
.hkh-ugc-login-icon { font-size: 48px; margin-bottom: 16px; }
.hkh-ugc-login h3 {
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--huk-text, #2C1810);
}
.hkh-ugc-login p {
  font-size: 14px;
  color: var(--huk-text-muted, #8B7E6A);
  margin: 0 0 24px;
}
.hkh-btn-google {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 14px 32px;
}
.hkh-btn-google svg { flex-shrink: 0; }

/* ══════════════════════════════════════
   Leaflet Override (clean look)
   ══════════════════════════════════════ */
.hkh-map .leaflet-control-zoom a {
  background: var(--huk-surface, #FDFAF5) !important;
  color: var(--huk-text, #2C1810) !important;
  border-color: var(--huk-border, #E8E3D8) !important;
  border-radius: 8px !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  font-size: 18px !important;
}
.hkh-map .leaflet-control-zoom { border-radius: 10px !important; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important; border: none !important; }

/* ══════════════════════════════════════
   DARK MODE
   ══════════════════════════════════════ */
html[data-theme="dark"] .hkh-header h2 { color: #E8E0D4; }
html[data-theme="dark"] .hkh-header p { color: #8B9EB0; }
html[data-theme="dark"] .hkh-filter-btn { color: #E8E0D4; }
html[data-theme="dark"] .hkh-body {
  background: #1C2630;
  border-color: #2D3A47;
}
html[data-theme="dark"] .hkh-sidebar {
  background: #0F1419;
  border-color: #2D3A47;
}
html[data-theme="dark"] .hkh-sidebar-card:hover { background: #1C2630; }
html[data-theme="dark"] .hkh-sidebar-info strong { color: #E8E0D4; }
html[data-theme="dark"] .hkh-sidebar-info span { color: #8B9EB0; }
html[data-theme="dark"] .hkh-zoom-hint {
  background: #1C2630;
  color: #E8E0D4;
}
html[data-theme="dark"] .hkh-popup-wrap .leaflet-popup-content-wrapper {
  background: #1C2630 !important;
}
html[data-theme="dark"] .hkh-popup-wrap .leaflet-popup-tip { background: #1C2630 !important; }
html[data-theme="dark"] .hkh-popup-header strong { color: #E8E0D4; }
html[data-theme="dark"] .hkh-popup-row { color: #A0AEC0; }
html[data-theme="dark"] .hkh-popup-desc { color: #8B9EB0; }
html[data-theme="dark"] .hkh-ugc-panel {
  background: #1C2630;
}
html[data-theme="dark"] .hkh-ugc-panel h3 { color: #E8E0D4; }
html[data-theme="dark"] .hkh-ugc-subtitle { color: #8B9EB0; }
html[data-theme="dark"] .hkh-ugc-close { background: #0F1419; color: #8B9EB0; }
html[data-theme="dark"] .hkh-field label { color: #E8E0D4; }
html[data-theme="dark"] .hkh-field input,
html[data-theme="dark"] .hkh-field select,
html[data-theme="dark"] .hkh-field textarea {
  background: #0F1419;
  border-color: #2D3A47;
  color: #E8E0D4;
}
html[data-theme="dark"] .hkh-btn-ghost {
  border-color: #2D3A47;
  color: #8B9EB0;
}
html[data-theme="dark"] .hkh-ugc-login h3 { color: #E8E0D4; }
html[data-theme="dark"] .hkh-ugc-login p { color: #8B9EB0; }
html[data-theme="dark"] .hkh-ugc-minimap { border-color: #2D3A47; }
html[data-theme="dark"] .hkh-map .leaflet-control-zoom a {
  background: #1C2630 !important;
  color: #E8E0D4 !important;
  border-color: #2D3A47 !important;
}

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 900px) {
  .hkh-body {
    grid-template-columns: 1fr;
    grid-template-rows: 400px auto;
  }
  .hkh-map-wrap { min-height: 400px; }
  .hkh-map { min-height: 400px; }
  .hkh-sidebar {
    max-height: 300px;
    border-left: none;
    border-top: 1px solid var(--huk-border, #E8E3D8);
  }
}
@media (max-width: 600px) {
  .hkh-header h2 { font-size: 22px; }
  .hkh-filters { gap: 6px; }
  .hkh-filter-btn { padding: 6px 10px; font-size: 12px; }
  .hkh-filter-label { display: none; }
  .hkh-body { grid-template-rows: 320px auto; }
  .hkh-map-wrap { min-height: 320px; }
  .hkh-map { min-height: 320px; }
  .hkh-ugc-panel { padding: 24px 20px; }
  .hkh-ugc-trigger { padding: 8px 14px; font-size: 12px; }
  .hkh-zoom-hint { font-size: 12px; padding: 8px 14px; }
}
