/* ============================================================
   Nöbetçi Eczane v2.0 — Harita + Konum Destekli
   ============================================================ */

:root {
  --g:     #1a7a4a;
  --gd:    #135c37;
  --gl:    #e8f5ee;
  --blue:  #2196F3;
  --warn:  #fff3cd;
  --bdr:   #dee2e6;
  --bg:    #f8f9fa;
  --rad:   8px;
  --font:  'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Wrapper ── */
#ne-app {
  font-family: var(--font);
  color: #212529;
  position: relative;
}

/* ── Konum banner ── */
.ne-loc-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: #e8f4fd;
  border: 1px solid #90caf9;
  border-radius: var(--rad);
  padding: .7rem 1rem;
  margin-bottom: .75rem;
  font-size: .88rem;
  flex-wrap: wrap;
}
.ne-loc-bar.ne-hidden { display: none; }
.ne-loc-icon { font-size: 1.2rem; flex-shrink: 0; }
.ne-loc-text { flex: 1; min-width: 120px; }
.ne-btn-loc {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: .4rem 1rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .2s;
}
.ne-btn-loc:hover { opacity: .88; }
.ne-btn-loc-dismiss {
  background: none;
  border: none;
  color: #777;
  cursor: pointer;
  font-size: 1rem;
  padding: .2rem .4rem;
}

/* ── Konum status ── */
.ne-loc-status {
  background: var(--gl);
  border: 1px solid var(--g);
  color: var(--gd);
  border-radius: var(--rad);
  padding: .5rem .9rem;
  font-size: .85rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.ne-loc-status.ne-hidden { display: none; }

/* ── Arama kutusu ── */
.ne-search-box {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .75rem;
  background: var(--gl);
  border: 1px solid #c3e6cb;
  border-radius: var(--rad);
  margin-bottom: .75rem;
}
.ne-search-box select,
.ne-search-box input {
  flex: 1 1 160px;
  padding: .55rem .8rem;
  border: 1px solid var(--bdr);
  border-radius: 6px;
  font-size: .9rem;
  background: #fff;
}
.ne-search-box select:focus,
.ne-search-box input:focus {
  outline: 2px solid var(--g);
  border-color: var(--g);
}
#ne-btn-search {
  padding: .55rem 1.2rem;
  background: var(--g);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
#ne-btn-search:hover { background: var(--gd); }

/* ── Mobil tab ── */
.ne-tabs {
  display: none;
  gap: 0;
  margin-bottom: .75rem;
  border: 1px solid var(--bdr);
  border-radius: var(--rad);
  overflow: hidden;
}
.ne-tab {
  flex: 1;
  padding: .65rem;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.ne-tab.ne-tab-active {
  background: var(--g);
  color: #fff;
  font-weight: 700;
}

/* ── Layout: split view ── */
.ne-layout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

/* Sol panel: liste */
.ne-panel-list {
  flex: 0 0 380px;
  min-width: 0;
  max-height: 78vh;
  overflow-y: auto;
  scrollbar-width: thin;
}
.ne-panel-list::-webkit-scrollbar { width: 5px; }
.ne-panel-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* Sağ panel: harita */
.ne-panel-map {
  flex: 1;
  position: sticky;
  top: 20px;
  min-width: 0;
}

/* ── Harita ── */
#ne-map {
  height: 78vh;
  min-height: 400px;
  border-radius: var(--rad);
  border: 1px solid var(--bdr);
  z-index: 1;
  background: #e8e8e8;
}

/* Leaflet z-index düzeltme */
.leaflet-pane         { z-index: 400 !important; }
.leaflet-top,
.leaflet-bottom       { z-index: 1000 !important; }
.leaflet-control      { z-index: 1001 !important; }

/* Harita bilgi notu */
.ne-map-info {
  margin-top: .4rem;
  font-size: .78rem;
  color: #666;
  text-align: center;
  padding: .3rem;
}
.ne-map-info.ne-hidden { display: none; }

/* ── Info notu ── */
.ne-info {
  background: var(--warn);
  border: 1px solid #ffc107;
  border-radius: var(--rad);
  padding: .6rem .9rem;
  margin-bottom: .6rem;
  font-size: .82rem;
}
.ne-info a { color: var(--gd); }

/* ── Stats ── */
.ne-stats {
  font-size: .85rem;
  color: #555;
  padding: .3rem 0 .5rem;
}
.ne-stats strong { color: var(--g); }

/* ── Eczane kartları ── */
.ne-grid {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.ne-card {
  background: #fff;
  border: 1px solid var(--bdr);
  border-left: 4px solid var(--g);
  border-radius: var(--rad);
  padding: .85rem 1rem;
  transition: box-shadow .15s;
  cursor: default;
}
.ne-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.ne-card.ne-card-highlight {
  border-left-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue);
}

.ne-card-name {
  font-weight: 700;
  color: var(--gd);
  font-size: .95rem;
  margin-bottom: .3rem;
  line-height: 1.3;
}
.ne-card-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  background: var(--gl);
  color: var(--gd);
  padding: .12rem .45rem;
  border-radius: 20px;
  margin-bottom: .4rem;
}
.ne-card-address {
  font-size: .8rem;
  color: #555;
  line-height: 1.45;
  margin-bottom: .55rem;
}
.ne-card-footer {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.ne-btn-call {
  display: inline-flex; align-items: center; gap: .25rem;
  background: var(--g); color: #fff; text-decoration: none;
  padding: .38rem .8rem; border-radius: 20px;
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  transition: background .15s;
}
.ne-btn-call:hover { background: var(--gd); color: #fff; }

.ne-btn-dir {
  display: inline-flex; align-items: center; gap: .25rem;
  background: #fff; border: 1px solid var(--g); color: var(--g);
  text-decoration: none; padding: .35rem .75rem; border-radius: 20px;
  font-size: .78rem; white-space: nowrap;
  transition: background .15s;
}
.ne-btn-dir:hover { background: var(--gl); color: var(--gd); }

.ne-btn-map {
  display: inline-flex; align-items: center; gap: .25rem;
  background: none; border: 1px solid #aaa; color: #555;
  padding: .33rem .7rem; border-radius: 20px;
  font-size: .75rem; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.ne-btn-map:hover { background: #f0f0f0; border-color: #888; }
.ne-btn-map:disabled { opacity: .6; cursor: wait; }

/* ── Yükleniyor / Boş ── */
.ne-loading, .ne-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #888;
}
.ne-spinner {
  width: 34px; height: 34px;
  border: 4px solid var(--bdr);
  border-top-color: var(--g);
  border-radius: 50%;
  margin: 0 auto .75rem;
  animation: ne-spin .7s linear infinite;
}
@keyframes ne-spin { to { transform: rotate(360deg); } }
.ne-empty-icon { font-size: 2.5rem; margin-bottom: .4rem; }

/* ── Sayfalama ── */
.ne-pagination {
  display: flex; flex-wrap: wrap; gap: .3rem;
  justify-content: center; margin-top: 1rem; padding-bottom: .5rem;
}
.ne-pagination button {
  padding: .38rem .8rem; border: 1px solid var(--bdr);
  border-radius: 6px; background: #fff; cursor: pointer; font-size: .85rem;
  transition: all .15s;
}
.ne-pagination button.active {
  background: var(--g); border-color: var(--g); color: #fff; font-weight: 700;
}
.ne-pagination button:hover:not(.active):not(:disabled) { background: var(--gl); border-color: var(--g); }
.ne-pagination button:disabled { opacity: .4; cursor: default; }

/* ── Leaflet Popup ── */
.ne-popup { min-width: 200px; font-family: var(--font); }
.ne-popup strong { display: block; font-size: .95rem; color: var(--gd); margin-bottom: .3rem; }
.ne-popup p { font-size: .82rem; color: #444; margin: .2rem 0; line-height: 1.4; }
.ne-popup-actions {
  display: flex; gap: .4rem; margin-top: .6rem; flex-wrap: wrap;
}
.ne-popup-actions a {
  flex: 1; text-align: center; text-decoration: none;
  padding: .4rem .5rem; border-radius: 6px; font-size: .8rem; font-weight: 600;
}
.ne-popup-call { background: var(--g); color: #fff !important; }
.ne-popup-dir  { background: #fff; border: 1px solid var(--g); color: var(--g) !important; }

/* ── Kullanıcı marker (mavi, pulsing) ── */
.ne-user-dot {
  width: 16px; height: 16px;
  background: var(--blue);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(33,150,243,.5);
  animation: ne-pulse 2s infinite;
}
@keyframes ne-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(33,150,243,.5); }
  70%  { box-shadow: 0 0 0 12px rgba(33,150,243,0); }
  100% { box-shadow: 0 0 0 0 rgba(33,150,243,0); }
}

/* ── Eczane marker (yeşil ilaç) ── */
.ne-pharm-pin {
  width: 28px; height: 28px;
  background: var(--g);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
}
.ne-pharm-pin::after {
  content: '💊';
  transform: rotate(45deg);
  font-size: 13px;
  line-height: 1;
}

/* ── Responsive: Mobil ── */
@media (max-width: 768px) {
  .ne-tabs { display: flex; }

  .ne-layout { display: block; }

  .ne-panel-list {
    display: block;
    max-height: none;
    overflow-y: visible;
  }
  .ne-panel-map { display: none; }

  .ne-panel-list.ne-tab-map { display: none; }
  .ne-panel-map.ne-tab-map  { display: block; }

  #ne-map { height: 60vh; min-height: 300px; }
}

/* ── Responsive: Tablet ── */
@media (max-width: 1024px) and (min-width: 769px) {
  .ne-panel-list { flex: 0 0 300px; }
}

/* ── Mesafe + Sıralama badge (v2.1) ── */
.ne-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .15rem;
}
.ne-card-header .ne-card-name { margin-bottom: 0; flex: 1; }
.ne-card-badges { display: flex; align-items: center; gap: .3rem; flex-shrink: 0; }

.ne-dist-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  background: #e3f2fd;
  color: #1565c0;
  padding: .12rem .45rem;
  border-radius: 20px;
  white-space: nowrap;
}
.ne-rank-badge {
  font-size: 1.05rem;
  line-height: 1;
}

.ne-popup-dist {
  font-size: .78rem;
  font-weight: 600;
  color: #1565c0;
  margin: .1rem 0;
}

/* ── SEO Kategori Sayfaları (v2.1) ── */
.ne-seo-intro {
  margin-bottom: 1.5rem;
}
.ne-seo-breadcrumb {
  font-size: .8rem;
  color: #777;
  margin-bottom: .6rem;
}
.ne-seo-breadcrumb a { color: var(--g); text-decoration: none; }
.ne-seo-breadcrumb a:hover { text-decoration: underline; }
.ne-seo-h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gd);
  margin: 0 0 .5rem;
  line-height: 1.2;
}
.ne-seo-lead {
  font-size: .95rem;
  color: #444;
  line-height: 1.6;
  max-width: 680px;
}

/* İlçe grid */
.ne-seo-ilceler { margin-top: 2rem; }
.ne-seo-ilceler h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gd);
  margin-bottom: .8rem;
}
.ne-seo-ilce-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .5rem;
}
.ne-seo-ilce-card {
  display: flex;
  flex-direction: column;
  padding: .6rem .9rem;
  background: var(--gl);
  border: 1px solid var(--bdr);
  border-radius: var(--rad);
  text-decoration: none;
  transition: background .15s, box-shadow .15s;
  color: inherit;
}
.ne-seo-ilce-card:hover {
  background: #d4edda;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.ne-seo-ilce-name {
  font-weight: 600;
  font-size: .88rem;
  color: var(--gd);
}
.ne-seo-ilce-count {
  font-size: .75rem;
  color: #666;
  margin-top: .2rem;
}

/* Komşu ilçeler */
.ne-seo-related { margin-top: 2rem; }
.ne-seo-related h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gd);
  margin-bottom: .6rem;
}
.ne-seo-neighbors {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.ne-seo-neighbor {
  display: inline-block;
  padding: .3rem .75rem;
  background: var(--gl);
  border: 1px solid var(--bdr);
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--gd);
  text-decoration: none;
  transition: background .15s;
}
.ne-seo-neighbor:hover { background: #d4edda; }

@media (max-width: 600px) {
  .ne-seo-h1 { font-size: 1.25rem; }
  .ne-seo-ilce-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* -- Mahalle filtresi bar ------------------------------------------------- */
.ne-mahalle-filter-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: #e8f4fd;
  border: 1px solid #bee3f8;
  border-radius: 8px;
  padding: .5rem 1rem;
  margin: .4rem 0;
  font-size: .9rem;
  color: #2b6cb0;
  flex-wrap: wrap;
}
.ne-mahalle-clear-btn {
  margin-left: auto;
  background: #fff;
  border: 1px solid #bee3f8;
  border-radius: 6px;
  padding: .25rem .7rem;
  color: #2b6cb0;
  cursor: pointer;
  font-size: .82rem;
  white-space: nowrap;
}
.ne-mahalle-clear-btn:hover { background: #ebf8ff; }
.ne-popup-mahalle { color: #718096; font-size: .82rem; margin: 2px 0; }


/* ═══════════════════════════════════════════════════════════════════
   Nöbetçi Eczane — Bağımsız Header & Footer
═══════════════════════════════════════════════════════════════════ */

/* ── Header ───────────────────────────────────────────────────── */
.ne-site-header {
  background: #fff;
  border-bottom: 2px solid #2b7a4b;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.ne-site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.ne-site-logo {
  display: flex;
  align-items: center;
  gap: .45rem;
  text-decoration: none;
  color: #2b7a4b;
}
.ne-site-logo__icon { font-size: 1.6rem; line-height: 1; }
.ne-site-logo__text {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #1a4731;
}
.ne-site-logo:hover .ne-site-logo__text { color: #2b7a4b; }

.ne-site-nav,
.ne-site-breadnav {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .875rem;
}
.ne-site-nav a,
.ne-site-breadnav a {
  color: #4a5568;
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 4px;
  transition: background .15s, color .15s;
}
.ne-site-nav a:hover,
.ne-site-breadnav a:hover { background: #f0fdf4; color: #2b7a4b; }
.ne-site-breadnav span { color: #a0aec0; }

/* ── Ana İçerik ───────────────────────────────────────────────── */
.ne-main-content {
  min-height: 60vh;
}

/* ── Footer ───────────────────────────────────────────────────── */
.ne-site-footer {
  background: #1a2e1a;
  color: #cbd5e0;
  margin-top: 3rem;
  font-size: .9rem;
}

/* Üst bölüm: marka + büyük şehirler */
.ne-site-footer__top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
}
@media (max-width: 720px) {
  .ne-site-footer__top { grid-template-columns: 1fr; }
}

.ne-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .75rem;
}
.ne-footer-logo:hover { color: #68d391; }
.ne-footer-desc {
  color: #a0aec0;
  line-height: 1.6;
  margin: .5rem 0;
  font-size: .85rem;
}
.ne-footer-source { font-size: .8rem; color: #718096; }
.ne-footer-source a { color: #68d391; text-decoration: none; }
.ne-footer-source a:hover { text-decoration: underline; }

.ne-footer-section-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #68d391;
  margin: 0 0 .75rem;
}

/* Popüler şehirler grid */
.ne-footer-city-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .25rem .5rem;
}
.ne-footer-city-list a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: .85rem;
  display: block;
  padding: .15rem 0;
  transition: color .15s;
}
.ne-footer-city-list a:hover { color: #68d391; }

/* Orta bölüm: tüm iller */
.ne-site-footer__mid {
  border-top: 1px solid rgba(255,255,255,.08);
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}
.ne-footer-all-cities {
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .6rem;
}
.ne-footer-all-cities li a {
  color: #718096;
  text-decoration: none;
  font-size: .8rem;
  transition: color .15s;
}
.ne-footer-all-cities li a:hover { color: #68d391; }
.ne-footer-all-cities li:not(:last-child) a::after {
  content: " ·";
  color: #4a5568;
}

/* Alt bölüm: copyright */
.ne-site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.2);
}
.ne-footer-bottom-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .8rem;
  color: #718096;
}
.ne-footer-bottom-inner a { color: #a0aec0; text-decoration: none; }
.ne-footer-bottom-inner a:hover { color: #68d391; }
.ne-footer-legal { display: flex; gap: 1rem; flex-wrap: wrap; }
.ne-footer-legal a { color: #718096; }
.ne-footer-legal a:hover { color: #68d391; }

/* Mobil uyum */
@media (max-width: 600px) {
  .ne-footer-bottom-inner { flex-direction: column; align-items: flex-start; }
  .ne-site-header__inner { padding: .6rem 1rem; }
}

/* ── Mahalle bos — ilceye genislet butonu ─────────────────────── */
.ne-btn-expand-ilce {
  display: inline-block;
  margin-top: .75rem;
  padding: .5rem 1.2rem;
  background: #2b7a4b;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  transition: background .15s;
}
.ne-btn-expand-ilce:hover { background: #1a4731; }
