/* Emlakçılar Portalı — Danışman Web Portföy (herkese açık sayfalar). Mobil öncelikli, bağımsız (Bootstrap kullanmaz). */
:root {
  --navy: #0D1B3D;
  --blue: #2563EB;
  --blue-d: #1D4ED8;
  --blue-bg: #DBEAFE;
  --green: #22C55E;
  --green-d: #15803D;
  --green-bg: #DCFCE7;
  --ink: #0D1B3D;
  --text: #475569;
  --muted: #64748B;
  --soft: #94A3B8;
  --line: #E2E8F0;
  --line-2: #F1F5F9;
  --bg: #F4F6F9;
  --card: #FFFFFF;
  --shadow: 0 2px 12px rgba(13, 27, 61, .10);
  --shadow-lg: 0 8px 24px rgba(13, 27, 61, .16);
  --radius: 14px;
  --fr-bg: #0D1B3D;
  --fr-line: #2563EB;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.wp {
  margin: 0; font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5;
}
.wp a { color: var(--blue); text-decoration: none; }
.wp a:hover { text-decoration: underline; }
.wp img { max-width: 100%; display: block; }
.wp .container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 640px) { .wp .container { padding: 0 12px; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Üst bar ---- */
.topbar { background: var(--navy); box-shadow: 0 2px 8px rgba(0,0,0,.25); position: sticky; top: 0; z-index: 100; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 12px; }
.topbar img.logo { height: 38px; width: auto; flex: 0 0 auto; }
.topbar .right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar .back { color: #fff; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back:hover { text-decoration: none; opacity: .85; }
.topbar select.lang { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; font-size: 13px; padding: 6px 8px; min-height: 36px; font-family: inherit; }
.topbar select.lang option { color: #0D1B3D; }
@media (max-width: 420px) { .topbar img.logo { height: 30px; } .topbar .back { font-size: 13px; } }

/* ---- Düğmeler ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 8px; border: 0; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none !important; font-family: inherit;
}
.btn-primary { background: var(--blue); color: #fff !important; }
.btn-primary:hover { background: var(--blue-d); }
.btn-green { background: var(--green); color: #fff !important; }
.btn-green:hover { background: #16A34A; }
.btn-outline { background: #fff; color: var(--navy) !important; border: 1px solid var(--line); }
.btn-block { display: flex; width: 100%; }

/* ---- Sayfa başlığı ---- */
h2.page-title { font-size: 1.5rem; font-weight: 700; margin: 28px 0 6px; border-left: 4px solid var(--blue); padding-left: 12px; }
.result-count { color: var(--muted); font-size: 14px; margin: 0 0 18px 16px; }

/* ---- Kart ızgarası ---- */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.wp .card { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; color: inherit; transition: transform .2s, box-shadow .2s; }
.wp .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.card .media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%); }
.card .media img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.card .price { font-size: 1.15rem; font-weight: 800; color: var(--blue); }
.card .title { font-size: .9rem; font-weight: 600; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .details { display: flex; gap: 14px; font-size: .85rem; color: var(--text); }
.card .details span { display: inline-flex; align-items: center; gap: 5px; }
.card .address { font-size: .82rem; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.card .address i { color: #ef4444; }
.card .foot { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.eids-mini { position: absolute; right: 10px; top: 10px; width: 52px; height: 46px; background: transparent; }
.eids-mini img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .35)); }

.badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.badge-satilik { background: var(--blue-bg); color: var(--blue-d); }
.badge-kiralik { background: var(--green-bg); color: var(--green-d); }

/* ---- Sayfalama ---- */
.pager { display: flex; justify-content: center; gap: 6px; padding: 28px 0 8px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 15px; }
.pager .on { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---- Boş durum ---- */
.empty { text-align: center; padding: 48px 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 28px; }
.empty i { font-size: 48px; color: var(--blue); }
.empty h2 { margin: 10px 0 4px; font-size: 20px; }
.empty p { margin: 0 auto 16px; max-width: 420px; color: var(--muted); }

/* ---- Alt bilgi ---- */
.footer { margin-top: 40px; background: var(--navy); color: #cbd5e1; font-size: 13px; }
.footer .container { padding-top: 22px; padding-bottom: 28px; display: grid; gap: 10px; }
.footer a { color: #93c5fd; }
.footer .links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer .legal { color: var(--soft); line-height: 1.7; }
.footer .legal-disclaimer { margin-top: 8px; font-size: .78rem; opacity: .9; }
.footer .license { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 10px 14px; color: #fff; font-size: 14px; }
.footer .license i { color: var(--green); font-size: 18px; }
.footer .license strong { font-size: 15px; letter-spacing: .3px; }

/* ---- Detay: yerleşim ---- */
.crumbs { font-size: .82rem; color: var(--muted); padding: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.detail { display: flex; flex-direction: column; gap: 18px; margin: 18px 0 0; }
.detail-left, .detail-side { display: contents; }
.detail .gallery { order: 1; } .detail .price-card { order: 2; } .detail .tabs { order: 3; }
.detail .details-card { order: 4; } .detail .agent-card { order: 5; } .detail .eids-stamp { order: 6; }
@media (min-width: 1025px) {
  .detail { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
  .detail-left, .detail-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
  .detail-side { gap: 18px; }
}

/* Galeri */
.gallery { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.gallery-main { position: relative; aspect-ratio: 16 / 9; background: var(--navy); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(13,27,61,.65); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; display: grid; place-items: center; }
.gallery-arrow:hover { background: var(--blue); }
.gallery-arrow.prev { left: 12px; } .gallery-arrow.next { right: 12px; }
.gallery-counter { position: absolute; bottom: 10px; right: 14px; background: rgba(13,27,61,.6); color: #fff; font-size: .75rem; padding: 3px 10px; border-radius: 20px; }
.gallery-thumbs { display: flex; gap: 8px; padding: 10px 12px; overflow-x: auto; background: #F8FAFC; scrollbar-width: thin; }
.gallery-thumbs img { width: 80px; height: 56px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; flex: 0 0 auto; opacity: .7; transition: .2s; background: #cbd5e1; }
.gallery-thumbs img.active, .gallery-thumbs img:hover { border-color: var(--blue); opacity: 1; }
.gallery-empty { aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--soft); font-size: 48px; background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%); }

/* Sekmeler */
.tabs { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tab-nav { display: flex; border-bottom: 2px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn { flex: 1 0 auto; padding: 14px 16px; min-height: 48px; font-size: .9rem; font-weight: 600; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-btn:hover:not(.active) { color: var(--ink); }
.tab-content { display: none; padding: 22px 24px; }
.tab-content.active { display: block; }
@media (max-width: 640px) { .tab-content { padding: 18px 16px; } }
.tab-content h3 { font-size: 1rem; margin: 0 0 12px; }
.tab-content p { font-size: .9rem; color: var(--text); line-height: 1.75; margin: 0 0 10px; overflow-wrap: anywhere; }
.feat-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.feat { background: #F1F5F9; border-radius: 8px; padding: 6px 12px; font-size: .84rem; color: var(--text); display: inline-flex; gap: 6px; align-items: center; }
.feat i { color: var(--green-d); }
.feat-group { margin-top: 14px; }
.feat-group h4 { font-size: .85rem; margin: 0 0 6px; color: var(--muted); }

/* Harita Görünümü (sekmelerin altında, açılır) */
.map-section { margin-top: 0; }
.detail .map-section { order: 3; }
.btn-map { background: #0dcaf0; color: #052c65 !important; min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-map:hover { background: #31d2f2; }
.btn-map .bi-chevron-down { transition: transform .2s; }
.btn-map[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }
#mapWrap { margin-top: 10px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.map { position: relative; height: 400px; border-radius: 10px; overflow: hidden; background: #DBEAFE; z-index: 0; }
.map-cap { font-size: 12px; color: var(--muted); margin: 8px 0 0; display: flex; gap: 6px; align-items: center; }

/* Çevre sekmesi: kategori kartları */
.poi-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .poi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.poi-card { border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 8px; background: #fff; overflow: hidden; height: 100%; }
.poi-head { background: #F8FAFC; border-bottom: 1px solid var(--line); padding: 8px 12px; font-weight: 700; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.poi-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.poi-table td { padding: 5px 10px; vertical-align: top; color: #334155; }
.poi-table td.sub { color: var(--muted); width: 34%; }
.poi-table td.dist { color: var(--blue); font-weight: 600; text-align: right; white-space: nowrap; }

/* Emlak Endeksi: renkli kutular + grafikler */
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 700px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { display: flex; gap: 10px; align-items: flex-start; border-radius: 8px; padding: 10px 12px; color: #fff; min-height: 84px; }
.kpi > i { font-size: 1.5rem; opacity: .85; line-height: 1; margin-top: 2px; }
.kpi .k-label { display: block; font-size: .72rem; line-height: 1.2; }
.kpi .k-value { display: block; font-size: 1.1rem; font-weight: 700; margin-top: 2px; }
.kpi .k-unit { display: block; font-size: .72rem; opacity: .9; }
.kpi-red { background: #dc3545; } .kpi-blue { background: #0d6efd; } .kpi-green { background: #198754; } .kpi-amber { background: #ffc107; color: #fff; }
.info-line { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px 14px; font-size: .85rem; margin-bottom: 14px; }
.info-line i { color: #0dcaf0; margin-right: 4px; }
.info-line .counts { margin-left: 12px; color: var(--muted); font-size: .78rem; }
.chart-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 760px) { .chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chart-card { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.chart-head { background: #F8FAFC; border-bottom: 1px solid var(--line); padding: 8px 12px; font-weight: 700; font-size: .85rem; }
.chart-body { height: 200px; padding: 8px; position: relative; }
.chart-body .empty-msg { color: var(--muted); font-size: .8rem; text-align: center; padding-top: 40px; }
.small-note { font-size: .78rem; color: var(--soft); margin-top: 10px; }
.loading { color: var(--muted); font-size: .9rem; }

/* Sağ sütun kartları */
.price-card, .details-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.price-card .badge { margin-bottom: 10px; }
.price-card h1 { font-size: 1.05rem; margin: 0 0 8px; line-height: 1.35; overflow-wrap: anywhere; }
.price-card .price { font-size: 1.7rem; font-weight: 800; color: var(--blue); margin-bottom: 4px; }
.price-card .price-sub { font-size: .78rem; color: var(--soft); margin-bottom: 16px; }
.price-card .btn + .btn { margin-top: 10px; }
.details-card h3 { font-size: .95rem; margin: 0 0 14px; border-left: 3px solid var(--blue); padding-left: 10px; }
.detail-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: .84rem; }
.detail-row:last-child { border-bottom: 0; }
.detail-row .label { color: var(--muted); }
.detail-row .value { font-weight: 600; text-align: right; }

.agent-card { background: var(--navy); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(13,27,61,.15); padding: 20px 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.agent-card .avatar { width: 56px; height: 56px; font-size: 1.3rem; }
.agent-card .name { color: #fff; font-weight: 700; font-size: .95rem; }
.agent-card .role { color: var(--soft); font-size: .78rem; margin-top: 2px; }
.agent-card .phone { color: var(--green); font-size: .95rem; margin-top: 6px; font-weight: 700; }
.agent-card .phone a { color: var(--green); }
.agent-card .more { display: flex; gap: 14px; margin-top: 8px; font-size: .8rem; flex-wrap: wrap; }
.agent-card .more a { color: #93c5fd; }
.agent-card .agent-text { min-width: 0; flex: 1 1 180px; }
.agent-card .agent-head { display: flex; gap: 14px; align-items: center; width: 100%; }

.eids-stamp { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px; }
.eids-stamp img { width: 56px; height: 56px; object-fit: contain; flex: 0 0 auto; }
.eids-stamp .t { font-size: .78rem; color: var(--text); line-height: 1.5; }
.eids-stamp .t strong { color: var(--green-d); font-size: .85rem; }

/* Resmî tapu kutusu — sayfanın altında, tam genişlik */
.tapu { margin-top: 24px; border: 2px solid #B7EBC9; background: #F0FDF4; border-radius: var(--radius); padding: 18px 22px; }
.tapu h2 { margin: 0 0 12px; font-size: 1.05rem; color: var(--green-d); display: flex; align-items: center; gap: 10px; }
.tapu h2 img { width: 34px; height: 34px; object-fit: contain; }
.tapu dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; margin: 0; }
@media (min-width: 900px) { .tapu dl { grid-template-columns: repeat(5, 1fr); } }
.tapu dt { font-size: .75rem; color: var(--muted); }
.tapu dd { margin: 2px 0 0; font-weight: 700; font-size: .95rem; overflow-wrap: anywhere; }
.tapu .note { font-size: .78rem; color: #166534; margin: 12px 0 0; }

/* Aynı danışmanın diğer ilanları */
.more-listings { margin-top: 28px; }
.more-listings h2 { font-size: 1.15rem; margin: 0 0 14px; border-left: 4px solid var(--blue); padding-left: 12px; }

/* Mobil sabit eylem çubuğu */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; background: #fff; border-top: 1px solid var(--line); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); display: flex; gap: 8px; box-shadow: 0 -4px 16px rgba(0,0,0,.1); }
.actionbar .btn { flex: 1; }
@media (min-width: 1025px) { .actionbar { display: none; } }
@media (max-width: 1024px) { body.has-actionbar { padding-bottom: 72px; } }

/* ---- 410 sayfası ---- */
.gone { max-width: 560px; margin: 40px auto 0; text-align: center; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 36px 24px; }
.gone .icon { width: 84px; height: 84px; border-radius: 50%; background: var(--blue-bg); color: var(--blue-d); display: grid; place-items: center; margin: 0 auto 14px; font-size: 40px; }
.gone h1 { margin: 0 0 8px; font-size: 24px; }
.gone p { color: var(--muted); margin: 0 0 20px; }
.gone .actions { display: grid; gap: 10px; }

/* ---- Marka şablonları (franchise / şirket / tek danışman) ---- */
body.tpl-solo .c-only, body.tpl-solo .f-only { display: none !important; }
body.tpl-company .f-only { display: none !important; }

.franchise-strip { background: var(--fr-bg); color: #fff; border-bottom: 3px solid var(--fr-line); }
.franchise-strip .container { display: flex; align-items: center; gap: 12px; min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
.franchise-strip img { height: 34px; width: auto; max-width: 140px; object-fit: contain; border-radius: 6px; background: #fff; padding: 2px 6px; flex: 0 0 auto; }
.franchise-strip img.on-dark { background: transparent; padding: 0; }
.franchise-strip span { font-size: 13px; opacity: .95; line-height: 1.3; }

.identity { background: #fff; border-bottom: 1px solid var(--line); }
.identity-body { display: flex; flex-direction: column; gap: 14px; padding-top: 16px; padding-bottom: 16px; }
.org { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.org-logo { width: 56px; height: 56px; border-radius: 12px; flex: 0 0 auto; box-shadow: var(--shadow); object-fit: contain; background: #fff; }
.org-name { min-width: 0; line-height: 1.3; }
.org-name strong { display: block; font-size: 16px; }
.org-name span { display: block; font-size: 13px; color: var(--muted); }
.org-name .grp { color: var(--blue-d); font-weight: 600; }
.agent-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.avatar { width: 58px; height: 58px; border-radius: 50%; flex: 0 0 auto; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 21px; position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.big { width: 68px; height: 68px; font-size: 24px; border: 2px solid #fff; box-shadow: 0 0 0 2px var(--blue-bg), var(--shadow); }
.agent-info { flex: 1 1 220px; min-width: 0; }
.agent-info h1 { margin: 0; font-size: 18px; }
.agent-info p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.agent-info .tel { color: var(--green-d); font-weight: 700; }
.agent-info .tel a { color: var(--green-d); }
.agent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 900px) {
  .identity-body { flex-direction: row; align-items: center; gap: 28px; }
  .org { padding: 0 28px 0 0; border-bottom: 0; border-right: 1px dashed var(--line); flex: 0 0 auto; }
  .org-logo { width: 72px; height: 72px; }
  .agent-row { flex: 1; flex-wrap: nowrap; }
}

/* Detay: danışman kartında şirket / grup rozetleri */
.agent-orgs { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; flex-wrap: wrap; width: 100%; }
.agent-orgs img { height: 28px; width: auto; border-radius: 6px; background: #fff; padding: 2px 4px; }
