:root {
    --ilan26-primary: #0d6efd;
}

/* Admin > Genel Ayarlar > Site SEO'dan yüklenen özel logo. */
.site-logo-img {
    display: block;
    height: 45px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

a[href^=tel]:not(.btn) {
    color: var(--ilan26-primary);
    text-decoration: inherit
}

.breadcrumb-item {
    align-items: center;
}

.site-icon-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 100px;
    background: #dc3545;
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

/* Ana sayfa hero: evlerin önünden geçen tramvay (partials/tram.php, app.js initTram).
   Pantografın ucu katener teline değsin diye tel, tramvayın üst kenarı hizasında. */
.skyline-scene {
    --tram-h: 76px;
    position: relative;
    overflow: hidden;
}

.catenary {
    position: absolute;
    left: 0;
    right: 0;
    /* Pantograf kolunun merkezi viewBox'ta y=1.2; tramvay 3/58 aşağıda. */
    bottom: calc(var(--tram-h) * 53.8 / 58);
    height: 1px;
    background: color-mix(in srgb, var(--ink) 35%, transparent);
}

/* Gövdenin alt kenarı viewBox'ta y=55/58; gölge payı kadar aşağı kaydırılır. */
.tram {
    position: absolute;
    left: 0;
    bottom: calc(var(--tram-h) * -3 / 58);
    height: var(--tram-h);
    width: auto;
    visibility: hidden;
    will-change: transform;
}

/* Kamyonet evlerle tramvay arasındaki şeritte: DOM'da tramvaydan önce geldiği
   için tramvayın arkasında kalır. Tekerleklerin alt kenarı viewBox'ta y=99/104;
   aradaki gölge payı kadar aşağı kaydırılarak tekerlekler zemin çizgisine basar. */
.truck {
    position: absolute;
    left: 0;
    bottom: calc(var(--truck-h) * -5 / 104);
    height: var(--truck-h);
    width: auto;
    visibility: hidden;
    will-change: transform;
    overflow: visible;
}

.truck.faces-right .truck-art {
    transform-box: view-box;
    transform-origin: center;
    transform: scaleX(-1);
}

.skyline-scene {
    --truck-h: 64px;
    padding-top: 95px;
}

/* Detaylı evlerin üst katları araçların üzerinde görünsün diye tema
   yüksekliği (96px / mobilde 72px) artırılır. viewBox yüksekliği 150 olduğu
   için 168px sabit 1.12 ölçek demektir: evler ekran genişliğinden bağımsız
   olarak hep aynı boyutta çizilir (bkz. partials/skyline.php). */
.skyline-scene .skyline {
    height: 168px;
}

@media (max-width: 767.98px) {
    .skyline-scene {
        --tram-h: 56px;
        --truck-h: 48px;
        /* Mobilde canlı ilan haritası gizli; "Sık arananlar" ile evler arasındaki boşluk yarıya iner. */
        padding-top: 48px;
    }

    .skyline-scene .skyline {
        height: 112px;
    }
}

/* ==========================================================================
   Ana sayfa hero: "Canlı ilan haritası" kartı (partials/live-map.php)
   ========================================================================== */
.live-map {
    position: relative;
    padding: 46px 18px 58px;
}

.lm-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px 12px 10px;
    box-shadow: 0 30px 60px -30px rgba(18, 64, 94, .45), 0 8px 18px -10px rgba(0, 0, 0, .12);
    transform: perspective(1400px) rotateY(-9deg) rotateX(4deg) rotateZ(-1.5deg);
    transition: transform .5s ease;
}

.live-map:hover .lm-card {
    transform: perspective(1400px) rotateY(0) rotateX(0) rotateZ(0);
}

.lm-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 650;
    font-size: .92rem;
    padding: 4px 6px 10px;
}

.lm-map {
    position: relative;
    aspect-ratio: 44 / 30;
    border-radius: 12px;
    overflow: hidden;
}

.lm-map svg {
    display: block;
    width: 100%;
    height: 100%;
}

.lm-pin {
    position: absolute;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -100%);
    display: grid;
    place-items: center;
    color: #fff;
    text-decoration: none;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .22));
    transition: transform .2s ease;
}

.lm-pin::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--c);
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.lm-pin i {
    position: relative;
    font-size: .95rem;
}

.lm-pin:hover {
    color: #fff;
    transform: translate(-50%, -100%) scale(1.12);
}

.lm-popup {
    position: absolute;
    left: calc(24% - 24px);
    top: 8%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #fff;
    color: #15222A;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .25);
}

.lm-popup::after {
    content: "";
    position: absolute;
    left: 18px;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
}

.lm-popup:hover {
    color: #15222A;
}

.lm-popup-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: #E4572E;
    color: #fff;
    font-weight: 750;
    font-size: .72rem;
}

.lm-popup-text strong {
    display: block;
    font-size: .95rem;
    line-height: 1.2;
}

.lm-popup-text small {
    color: #55656E;
    font-size: .76rem;
}

.lm-popup .bi-chevron-right {
    color: #99A9B2;
}

.lm-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 6px 2px;
    font-size: .8rem;
}

.lm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    color: var(--muted);
}

.lm-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lm-legend i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.lm-foot a {
    color: #E4572E;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.lm-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px 10px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .3);
    text-decoration: none;
    z-index: 2;
}

.lm-badge:hover {
    color: var(--ink);
}

.lm-badge strong {
    display: block;
    font-size: .88rem;
    line-height: 1.25;
}

.lm-badge small {
    color: var(--muted);
    font-size: .74rem;
}

.lm-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 14%, transparent);
    font-size: 1.05rem;
}

.lm-badge-top {
    top: 4px;
    right: -6px;
    transform: rotate(-2deg);
}

.lm-badge-bottom {
    left: -6px;
    bottom: 4px;
    transform: rotate(-1deg);
}

@media (max-width: 991.98px) {

    .lm-card,
    .live-map:hover .lm-card {
        transform: none;
    }
}

@media (max-width: 575.98px) {
    .live-map {
        padding: 0;
    }

    .lm-badge {
        position: static;
        transform: none;
        margin-top: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lm-card {
        transform: none;
    }
}

/* İlan detay "İlanı paylaş" satırı (listings/show.php). */
.share-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-row a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 1.05rem;
    background: var(--c, var(--porsuk));
}

.share-row a:hover {
    color: #fff;
    filter: brightness(.9);
}

body {
    background-color: #f5f5f6;
}

a {
    text-decoration: none;
}

.listing-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.listing-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.category-card {
    transition: transform 0.15s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.category-card:hover {
    transform: translateY(-2px);
}

.gallery-thumb {
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.gallery-thumb:hover {
    opacity: 1;
}

.wizard-step h2 {
    color: var(--ilan26-primary);
}

.p-header {
    position: relative;
    background-color: #fff;
    box-shadow: 0 1px 4px 0 #ededed;
    z-index: 3;
}

.p-header-body {
    display: flex;
    align-items: center;
    min-height: 65px;
    padding: 10px 0;
}

.p-page-content {
    background-color: #fff;
    box-shadow: 0 1px 4px 0 #ededed;
    border-radius: 12px;
    transition: border .4s;
    padding: 40px;
}

.p-block-content {
    background-color: #fff;
    box-shadow: 0 1px 4px 0 #ededed;
    border-radius: 12px;
    transition: border .4s;
    padding: 30px;
    margin-bottom: 24px;
}

/* CKEditor içeriğine eklenen görseller sabit genişlik/yükseklik ile
   (inline style veya width/height attribute) gelebilir; max-width burada
   inline width'i de ezerek görselin konteynerden taşmasını (responsive
   olmama sorununu) engeller. */
.p-page-content img {
    max-width: 100%;
    height: auto;
}

/* Ara başlıklar (h3) bölüm başlıklarından (h2) belirgin şekilde küçük olsun. */
.p-page-content h3 {
    font-size: 1.15rem;
    margin-top: 1.25rem;
}

/* Uzun URL'ler/kelimeler dar ekranda kartı taşırmasın. */
.p-page-content {
    overflow-wrap: break-word;
}

.p-page-content a {
    overflow-wrap: anywhere;
}

/* CKEditor tabloları: dar ekranda sayfayı genişletmek yerine kendi içinde yatay kaydırılır. */
.p-page-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 0 0 1.25rem;
    font-size: .875rem;
}

.p-page-content th,
.p-page-content td {
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    vertical-align: top;
    text-align: left;
}

.p-page-content th {
    background-color: #f7f7f7;
    font-weight: 600;
}

@media (max-width: 576px) {
    .p-page-content {
        padding: 20px 16px;
    }

    .p-page-content h1 {
        font-size: 1.6rem;
    }

    .p-page-content h2 {
        font-size: 1.3rem;
    }
}

.u-clear-gap {
    margin: 0;
}

/* Mobil öncelikli: küçük ekranlarda kart görsellerinin oranı korunsun */
@media (max-width: 576px) {
    .listing-card-title {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   İlan verme sihirbazının adım göstergesi (bkz. listings/create.php +
   listing-wizard.js). CoreUI'nin (ücretli) Bootstrap Stepper bileşeninin
   görsel dilinin saf CSS karşılığı: numaralı daireler + bağlantı çizgisi,
   tamamlanan adımda tik işaretine döner. Durumlar (completed/active) JS
   tarafından showStep() içinde class olarak eklenir.
   ========================================================================== */
.wizard-stepper {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.wizard-stepper-step {
    position: relative;
    flex: 1;
    text-align: center;
}

.wizard-stepper-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 17px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #dee2e6;
}

.wizard-stepper-step.completed:not(:last-child)::after {
    background: var(--ilan26-primary);
}

.wizard-stepper-indicator {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #dee2e6;
    color: #6c757d;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: 6px;
}

.wizard-stepper-step.active .wizard-stepper-indicator {
    border-color: var(--ilan26-primary);
    color: var(--ilan26-primary);
}

.wizard-stepper-step.completed .wizard-stepper-indicator {
    background: var(--ilan26-primary);
    border-color: var(--ilan26-primary);
    color: #fff;
}

.wizard-stepper-label {
    display: block;
    font-size: .78rem;
    color: #8a8d86;
}

.wizard-stepper-step.active .wizard-stepper-label {
    color: #1b1d1b;
    font-weight: 600;
}

/* Tamamlanmış adımlara geri dönülebilir (bkz. listing-wizard.js) - bunu
   belli etmek için imleç ve hover rengi eklenir. */
.wizard-stepper-step.completed .wizard-stepper-label {
    cursor: pointer;
}

.wizard-stepper-step.completed .wizard-stepper-label:hover {
    color: var(--ilan26-primary);
    text-decoration: none;
}

/* Dar ekranlarda 5 etiketin yan yana sığması zor - yalnızca daire+çizgi kalır. */
@media (max-width: 575.98px) {
    .wizard-stepper-label {
        display: none;
    }
}

/* Son adımda ("Yayınla") stepper'ın yerini alan animasyonlu tik işareti -
   klasik "stroke-dasharray çizimi" tekniğiyle (bkz. listings/create.php,
   listing-wizard.js). Daire önce çizilir, ardından tik işareti belirir. */
.wizard-success-visual {
    display: flex;
    justify-content: center;
    padding: .5rem 0 1.5rem;
}

.wizard-success-checkmark {
    width: 84px;
    height: 84px;
    animation: wizard-success-pop .4s ease-out;
}

@keyframes wizard-success-pop {
    from {
        transform: scale(.6);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.wizard-success-checkmark-circle {
    stroke: #198754;
    stroke-width: 2.5;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: wizard-success-circle .5s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.wizard-success-checkmark-check {
    stroke: #198754;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: wizard-success-check .35s cubic-bezier(0.65, 0, 0.45, 1) .5s forwards;
}

@keyframes wizard-success-circle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes wizard-success-check {
    to {
        stroke-dashoffset: 0;
    }
}

/* Sihirbazdaki doğrulama uyarısı (bkz. listings/create.php #wizardAlert) - sayfa
   akışından bağımsız, sabit konumlu; hangi adımda/scroll konumunda olunursa
   olsun görünür. */
.wizard-fixed-alert {
    position: fixed;
    top: 100px;
    left: 50%;
    z-index: 9999;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .15);
    /* Bootstrap'ın .fade/.show ikilisiyle aynı desen (bkz. listing-wizard.js
       showError/hideAlert) - burada opacity yerine/yanında transform: scale()
       ile zoom-in (açılış) / zoom-out (kapanış) elde edilir. */
    opacity: 0;
    transform: translateX(-50%) scale(.85);
    transition: opacity .2s ease, transform .2s ease;
}

.wizard-fixed-alert.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

@media (max-width: 575.98px) {
    .wizard-fixed-alert {
        top: 80px;
    }
}

/* İlan verme sihirbazı adım 2'de boş bırakılan zorunlu alan (bkz.
   listing-wizard.js highlightInvalidField/highlightInvalidDescriptionEditor) -
   veri girilince (input/change ya da CKEditor'ün "change" event'i) otomatik kalkar. */
.wizard-invalid-field {
    border-color: #f70808 !important;
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, #fd0d0d 25%, transparent) !important;
}

/* Checkbox grubu gibi kendi border'ı olmayan alan sarmalayıcıları (örn. çoklu
   seçim dinamik özellikler) için ayrıca gerçek bir border eklenir. */
.wizard-invalid-field-group {
    border: 1px solid #f70808 !important;
    border-radius: .375rem;
    padding: .75rem;
}

/* İletişim Tercihleri (bkz. listings/create.php #contactPreferences,
   listing-wizard.js renderContactPreferences) - 3 kanal masaüstünde yan yana
   eşit boşlukla, mobilde alt alta dizilir. */
#contactPreferences {
    display: flex;
    justify-content: space-between;
}

@media (max-width: 767.98px) {
    #contactPreferences {
        display: flex;
        justify-content: space-between;
        flex-direction: column;
    }
}
/*
 * Kaydırma çubuğu alanı her sayfada ayrılır: kısa sayfalarda (giriş, kayıt, 404) çubuk
 * kaybolunca ortalanmış header/içerik yana kaymasın. Bootstrap modal açılırken body'ye
 * çubuk genişliği kadar padding-right ekler; alan zaten ayrıldığı için bu iptal edilir
 * (aksi halde modal açılınca sayfa sola kayar).
 */
html {
  scrollbar-gutter: stable;
}

body.modal-open,
body[style*="padding-right"] {
  padding-right: 0 !important;
}
