/* Nargile Mekanı — tasarım sistemi
   Onaylanan dil: beyaz kartlar, ince gri kenarlık, yumuşak gölge, 18px köşe,
   kırmızı vurgu, sarı yıldızlar, Plus Jakarta Sans. */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --line: #edeff4;
  --line-strong: #e4e7ec;
  --ink: #101322;
  --ink-2: #344054;
  --muted: #667085;
  --muted-2: #8a90a2;
  --brand: #d22a3a;
  --brand-ink: #ffffff;
  --brand-soft: #fdecee;
  --star: #ffb020;
  --star-empty: #e4e7ec;
  --ok: #17a34a;
  --ok-soft: #e9f8ef;
  --radius-sm: 10px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(16, 19, 34, 0.05);
  --shadow-md: 0 8px 28px rgba(16, 19, 34, 0.08);
  --shadow-brand: 0 6px 16px rgba(210, 42, 58, 0.28);
  --rail-w: 76px;
  --header-h: 84px;
  --font-sans: 'Plus Jakarta Sans';
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans), system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

h1, h2, h3 { letter-spacing: -0.025em; margin: 0; }

/* -------------------------------------------------------------- yerleşim */
.app { display: flex; min-height: 100vh; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.container { padding: 24px 32px; }

/* ------------------------------------------------------------ ikon rayı */
.rail {
  width: var(--rail-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.rail-logo {
  width: 40px; height: 40px; border-radius: var(--radius);
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; margin-bottom: 26px;
  flex-shrink: 0;
}
.rail-logo img { width: 24px; height: 24px; }
.rail-logo-sm { width: 34px; height: 34px; border-radius: 10px; margin: 0; }
.rail-logo-sm img { width: 20px; height: 20px; }
.rail-item {
  width: 44px; height: 44px; margin-bottom: 8px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; color: var(--muted-2);
}
.rail-item:hover { background: var(--surface-2); color: var(--ink); }
.rail-item[data-active='true'] { background: var(--brand-soft); color: var(--brand); }

/* -------------------------------------------------------------- başlık */
.topbar {
  height: var(--header-h); flex-shrink: 0; padding: 0 32px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.search-pill {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 6px 0 18px; max-width: 560px; flex: 1;
  border: 1px solid var(--line-strong); border-radius: 999px; background: #f9fafb;
}
.search-pill:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.search-pill input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 15px; color: var(--ink); padding: 0;
}
.search-pill input::-webkit-search-cancel-button { cursor: pointer; }
.search-go {
  flex-shrink: 0; width: 34px; height: 34px; margin-left: -6px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted);
}
.search-go:hover { color: var(--brand); }
.topbar-actions { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }

/* --------------------------------------------------------------- düğmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 14px; font-weight: 700; color: var(--ink);
}
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn-primary {
  background: var(--brand); color: var(--brand-ink); border-color: var(--brand);
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { background: #b9232f; color: #fff; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 13px; border-radius: var(--radius-sm); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px;
  border-radius: 999px; background: var(--surface-2); color: var(--ink-2);
  font-size: 14px; font-weight: 600;
}
.chip[data-active='true'] { background: var(--ink); color: #fff; }

/* ---------------------------------------------------------------- kartlar */
.card {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-sm); padding: 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-media { position: relative; border-radius: var(--radius); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 0 4px 4px; }
.card-eyebrow { font-size: 12px; font-weight: 700; color: var(--brand); }
.card-title {
  font-size: 16px; font-weight: 800; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.card-foot {
  margin-top: 4px; padding-top: 10px; border-top: 1px solid #f1f2f6;
  display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted);
}
.badge-live {
  position: absolute; left: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px;
  border-radius: 999px; background: var(--ok); color: #fff; font-size: 12px; font-weight: 700;
}
.save-btn {
  position: absolute; right: 10px; top: 10px; width: 34px; height: 34px;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; color: #fff;
}

.grid { display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Kart içindeki görselin doğal genişliği tek sütunlu ızgarayı şişirip sayfayı
   yatay kaydırılır hâle getiriyordu; öğeler daralabilsin. */
.grid > * { min-width: 0; }
@media (max-width: 1280px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------------ puan */
.stars { display: inline-flex; gap: 1px; }
.rating { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }
.rating b { font-weight: 800; }
.rating-empty { font-size: 13px; font-weight: 700; color: var(--brand); }

/* ------------------------------------------------------------- reklamlar */
.ad-slot {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 8px 0;
}
.ad-label {
  align-self: flex-start; font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted-2);
}
.ad-box {
  width: 100%; background: var(--surface-2); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--muted-2);
}

/* --------------------------------------------------------------- mobil */
.mobile-only { display: none; }
@media (max-width: 760px) {
  .rail { display: none; }
  .mobile-only { display: flex; }
  .container { padding: 16px; }
  .desktop-only { display: none !important; }
  .topbar { height: auto; padding: 10px 14px; gap: 10px; flex-wrap: nowrap; }
  .search-pill {
    height: 44px; max-width: none; padding: 0 6px 0 14px;
    border-color: var(--line); background: var(--surface-2);
  }
  /* 16px altında iOS alan odaklanınca sayfayı büyütüyor */
  .search-pill input { font-size: 16px; }
  .search-go { width: 32px; height: 32px; }
  .grid { grid-template-columns: 1fr; }
  /* Yüzen cam menü (iOS 26 tarzı): ekranın dibine yapışmaz, kapsül olarak durur.
     Üst/alt boşluk tek bir padding'den gelir, bu yüzden simetriktir. */
  .tabbar {
    position: fixed; left: 12px; right: 12px; z-index: 30;
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 6px; border-radius: 26px;
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(26px) saturate(190%); -webkit-backdrop-filter: blur(26px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 10px 34px rgba(16, 19, 34, 0.18), 0 2px 8px rgba(16, 19, 34, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.85);
    display: flex; align-items: stretch; gap: 2px;
  }
  .tabbar a {
    flex: 1 1 0; min-width: 0; height: 52px; border-radius: 20px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    font-size: 10px; font-weight: 600; color: var(--muted); line-height: 1;
    text-align: center; white-space: nowrap;
    transition: background-color .24s ease, color .24s ease, transform .24s ease;
  }
  .tabbar a svg { transition: transform .24s ease; }
  .tabbar a:active { transform: scale(.94); }
  /* Seçili sekme: camın üstünde duran kırmızı mercek */
  .tabbar a[data-active='true'] {
    color: var(--brand); font-weight: 700;
    background: linear-gradient(180deg, rgba(210, 42, 58, 0.16), rgba(210, 42, 58, 0.10));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }
  .tabbar a[data-active='true'] svg { transform: translateY(-1px) scale(1.04); }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  /* Cam desteklenmeyen tarayıcıda okunur kalsın */
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .tabbar { background: rgba(255, 255, 255, 0.97); }
  }
}

/* ------------------------------------------------------------- harita */
.map-pin {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-size: 13px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(16, 19, 34, 0.22);
  border: 1px solid var(--line);
}
.map-pin:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* ---------------------------------------------------- taşıma sonrası ekler */
.card-noimage {
  display: flex; height: 100%; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--muted-2); font-size: 13px;
}
.section-head { display: flex; align-items: center; gap: 12px; }
.section-head h2 { font-size: 22px; font-weight: 800; }
.section-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.more-link { font-size: 14px; font-weight: 700; }
.site-footer {
  margin-top: 40px; padding: 28px 32px; border-top: 1px solid var(--line);
  background: var(--surface); display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.site-footer p { margin: 4px 0 0; max-width: 340px; }
.site-footer nav { display: flex; gap: 16px; }
.site-footer nav a { font-weight: 600; color: var(--ink-2); }
.hero { display: flex; flex-direction: column; gap: 14px; }
.hero h1 { font-size: 40px; font-weight: 800; line-height: 1.08; }
.hero p { margin: 0; font-size: 17px; color: var(--muted); max-width: 520px; }
@media (max-width: 760px) { .hero h1 { font-size: 30px; } }

/* ------------------------------------------------ mekan sayfası ve formlar */
.place-layout { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.place-main { flex: 1 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.place-side { flex: 0 0 340px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 100px; }
.place-hero { width: 100%; height: 420px; object-fit: cover; border-radius: var(--radius-lg); }
.crumbs { display: flex; gap: 7px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.prose { font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.prose img { border-radius: var(--radius); margin: 12px 0; }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.photo-grid img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.pill-open {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 700;
}
.pill-open .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--ok); }
.pill-brand {
  align-self: flex-start; padding: 4px 11px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700;
}
.info-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.info-ico {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.social-row { display: flex; gap: 8px; padding-top: 2px; }
.social-btn {
  width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.social-btn:hover { background: var(--brand-soft); color: var(--brand); }
.review { display: flex; gap: 14px; padding: 16px; border-radius: 14px; background: var(--surface-2); }
.review p { margin: 6px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.avatar {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 999px; background: var(--ink);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.avatar-lg { width: 64px; height: 64px; font-size: 20px; }

/* formlar */
input, textarea, select {
  font: inherit; font-size: 15px; color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px 14px; width: 100%;
}
input[type="radio"], input[type="checkbox"] { width: auto; }
textarea { resize: vertical; line-height: 1.6; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.review-form { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); }
.star-input { display: flex; gap: 4px; }
.star-input label { position: relative; cursor: pointer; }
.star-input input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.star-input svg { fill: var(--star-empty); transition: fill .12s; }
/* seçilen yıldız ve solundakilerin hepsi dolu — yalnızca seçileni boyamak 4'ü "tek yıldız" gibi gösteriyordu */
.star-input label:has(input:checked) svg,
.star-input label:has(~ label input:checked) svg { fill: var(--star); }
/* gezinirken seçim yerine imlecin altındaki yıldıza kadarını göster */
.star-input:hover label svg { fill: var(--star); }
.star-input:hover label:hover ~ label svg { fill: var(--star-empty); }
.star-input label:has(input:focus-visible) svg { outline: 2px solid var(--brand, #D22A3A); outline-offset: 2px; border-radius: 6px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* yorum şikayeti — açılır kutu, sayfa yüklenirken kapalı, JS yok */
.report { margin-top: 10px; }
.report summary {
  display: inline-block; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--muted); list-style: none;
}
.report summary::-webkit-details-marker { display: none; }
.report summary:hover { color: var(--brand); }
.report[open] summary { margin-bottom: 10px; color: var(--ink-2); }
.report form {
  display: flex; flex-direction: column; gap: 10px; padding: 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface);
}
.notice {
  margin: 0; padding: 12px 14px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; background: var(--brand-soft); color: var(--brand);
}
.notice[data-ok="true"] { background: var(--ok-soft); color: var(--ok); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.form-error {
  margin: 0; padding: 10px 12px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand); font-size: 14px; font-weight: 600;
}
.auth-wrap { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 400px; max-width: 100%; padding: 28px; gap: 16px; }

/* profil */
.stat-box { flex: 1; min-width: 120px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.stat-box b { font-size: 19px; display: block; }
.stat-box span { font-size: 12px; color: var(--muted); }
.badge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.badge { padding: 14px; border-radius: 14px; background: var(--surface-2); }
.badge[data-earned="true"] { background: var(--brand-soft); }
.badge b { font-size: 14px; }
.badge[data-earned="true"] b { color: var(--brand); }
.badge p { margin: 4px 0 8px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.badge .bar { display: block; height: 6px; border-radius: 999px; background: #fff; overflow: hidden; }
.badge .bar span { display: block; height: 6px; border-radius: 999px; background: var(--muted-2); }
.badge[data-earned="true"] .bar span { background: var(--brand); }
.bar-label { font-size: 11px; color: var(--muted); }
@media (max-width: 760px) {
  .place-side { position: static; flex-basis: auto; width: 100%; }
  .place-hero { height: 240px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------- yönetim */
.admin-nav {
  width: 232px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.admin-link { padding: 11px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.admin-link:hover { background: var(--surface-2); color: var(--ink); }
.admin-link[data-active="true"] { background: var(--brand-soft); color: var(--brand); }
.admin-user { padding: 12px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.admin-user b { font-size: 13px; }
.admin-user span { font-size: 12px; color: var(--muted); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table thead tr { background: var(--surface-2); text-align: left; }
.admin-table th { padding: 12px 16px; font-weight: 700; }
.admin-table td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.admin-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tag { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.tag[data-ok="true"] { background: var(--ok-soft); color: var(--ok); }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.media-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.media-grid img { width: 100%; height: 110px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.media-grid figure { margin: 0; }
.media-grid figcaption { font-size: 11px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) {
  .admin-cols { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) { .admin-nav { display: none; } }

/* ------------------------------------------------------------- keşfet */
.explore { display: flex; min-height: calc(100vh - var(--header-h)); }
.explore-list { flex: 1 1 720px; min-width: 0; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.explore-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.explore-map { flex: 0 0 520px; position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); }
#map { width: 100%; height: 100%; background: var(--surface-2); }
.map-pin {
  display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(16, 19, 34, .22); border: 1px solid var(--line);
}
.map-pin:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
@media (max-width: 1000px) {
  .explore { flex-direction: column; }
  .explore-map { flex: none; width: 100%; height: 320px; position: static; }
  .explore-grid { grid-template-columns: 1fr; }
}
