/* Korobit İlan — Find Houses inspired corporate theme */
:root {
  --primary: #274abb;
  --primary-dark: #1e3a8a;
  --accent: #f5a623;
  --accent-hover: #e09410;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --surface: #ffffff;
  --bg: #f8fafc;
  --hero-overlay: rgba(15, 23, 42, 0.72);
  --radius: 12px;
  --shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
  --font: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-body: 'Lato', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1240px, 92vw); margin: 0 auto; }

/* Header */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background .3s, box-shadow .3s;
}
.site-header.is-scrolled {
  position: fixed;
  background: rgba(255,255,255,.97);
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
}
.site-header.is-scrolled .logo-tag { background: rgba(231,111,81,0.12); }
.site-header.is-scrolled .nav a { color: var(--text); }
.site-header.is-scrolled .nav a:hover { color: var(--primary); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.logo-img {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}
.logo-tag {
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  background: rgba(255,255,255,0.15);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: -.02em;
}
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a {
  color: rgba(255,255,255,.92);
  text-decoration: none;
  font-family: var(--font);
  font-weight: 600;
  font-size: .9rem;
  transition: color .2s;
}
.nav a:hover { color: #fff; }
.nav-cta {
  background: var(--accent) !important;
  color: #1a1a2e !important;
  padding: .55rem 1.1rem;
  border-radius: 8px;
  font-weight: 700 !important;
}
.nav-cta:hover { background: var(--accent-hover) !important; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.site-header.is-scrolled .nav-toggle { background: rgba(39,74,187,0.08); }
.site-header.is-scrolled .nav-toggle span { background: var(--primary); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
body.nav-open { overflow: hidden; }

/* Hero */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 7rem 0 4rem;
  background: var(--hero-overlay) url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=1920&q=80') center/cover no-repeat;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,.55) 0%, rgba(15,23,42,.75) 100%);
}
.hero .container { position: relative; z-index: 1; width: 100%; }
.hero-text { text-align: center; margin-bottom: 2rem; }
.hero-text h1 {
  font-family: var(--font);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 .5rem;
  letter-spacing: -.03em;
}
.hero-text p {
  margin: 0;
  color: rgba(255,255,255,.88);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

/* Search panel */
.search-wrap {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
}
.search-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: #f9fafb;
}
.search-tabs button {
  flex: 1;
  max-width: 180px;
  border: 0;
  background: transparent;
  padding: 1rem 1.25rem;
  font-family: var(--font);
  font-weight: 700;
  font-size: .95rem;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all .2s;
}
.search-tabs button.active {
  color: var(--primary);
  background: #fff;
  border-bottom-color: var(--primary);
}
.search-form { padding: 1.25rem 1.5rem 1.5rem; }
.search-main {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: .75rem;
  align-items: end;
}
@media (max-width: 900px) {
  .search-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .search-main { grid-template-columns: 1fr; }
}
.field label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: .35rem;
  font-family: var(--font);
}
.field input, .field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .8rem 1rem;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(39,74,187,.12);
}
.btn-search {
  border: 0;
  background: var(--accent);
  color: #1a1a2e;
  font-family: var(--font);
  font-weight: 800;
  font-size: .95rem;
  padding: .85rem 1.75rem;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .15s;
  height: fit-content;
}
.btn-search:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-advanced {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  font-size: .85rem;
  padding: .85rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  height: fit-content;
}
.search-advanced {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
}
.search-advanced.is-open { display: grid; }
.live-status {
  text-align: center;
  margin-top: .75rem;
  font-size: .85rem;
  color: rgba(255,255,255,.75);
  min-height: 1.2em;
}

/* Section titles */
.section { padding: 4rem 0; }
.section--white { background: var(--surface); }
.section-head { margin-bottom: 2rem; }
.section-head .eyebrow {
  font-family: var(--font);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--primary);
  margin: 0 0 .25rem;
}
.section-head h2 {
  font-family: var(--font);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  margin: 0;
  color: var(--text);
  position: relative;
  padding-left: 1rem;
}
.section-head h2::before {
  content: '';
  position: absolute;
  left: 0; top: .15em; bottom: .15em;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}

/* Category services */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.25rem;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}
.cat-card__icon {
  width: 56px; height: 56px;
  margin: 0 auto .75rem;
  background: rgba(39,74,187,.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
}
.cat-card h3 {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 .35rem;
}
.cat-card p { margin: 0; font-size: .82rem; color: var(--muted); }

/* Property cards */
.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: .95rem;
}
.results-bar strong { color: var(--primary); font-size: 1.1rem; }
.prop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.prop-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15,23,42,.06);
  border: 1px solid var(--border);
  transition: transform .25s, box-shadow .25s;
}
.prop-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.prop-card__media {
  display: block;
  position: relative;
  aspect-ratio: 16/11;
  overflow: hidden;
}
.prop-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.prop-card:hover .prop-card__media img { transform: scale(1.05); }
.prop-card__ph {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}
.prop-card__tag {
  position: absolute;
  top: 12px;
  padding: .3rem .65rem;
  border-radius: 6px;
  font-family: var(--font);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.tag-cat { left: 12px; background: var(--primary); color: #fff; }
.tag-sale { right: 12px; background: #10b981; color: #fff; }
.tag-rent { right: 12px; background: #f59e0b; color: #fff; }
.prop-card__body { padding: 1.15rem 1.25rem 1.25rem; }
.prop-card__title {
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 .4rem;
  line-height: 1.35;
}
.prop-card__title a { color: inherit; text-decoration: none; }
.prop-card__title a:hover { color: var(--primary); }
.prop-card__loc {
  margin: 0 0 .75rem;
  font-size: .85rem;
  color: var(--muted);
}
.prop-card__loc i { color: var(--primary); margin-right: .25rem; }
.prop-card__specs {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0 0 .75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}
.prop-card__specs li {
  font-size: .8rem;
  color: var(--primary);
  font-weight: 600;
}
.prop-card__specs i { margin-right: .2rem; opacity: .85; }
.prop-card__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}
.prop-card__price {
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
}
.prop-card__firm {
  font-size: .75rem;
  color: var(--muted);
  text-align: right;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cities */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.city-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 140px;
  text-decoration: none;
  color: #fff;
  display: flex;
  align-items: flex-end;
  background: var(--primary-dark) center/cover;
  transition: transform .2s;
}
.city-card:hover { transform: scale(1.02); }
.city-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.7) 0%, transparent 60%);
}
.city-card__body {
  position: relative;
  z-index: 1;
  padding: 1rem 1.15rem;
}
.city-card h3 {
  font-family: var(--font);
  margin: 0 0 .15rem;
  font-size: 1.1rem;
  font-weight: 700;
}
.city-card span { font-size: .82rem; opacity: .9; }

/* Stats */
.stats-bar {
  background: var(--primary);
  color: #fff;
  padding: 3rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}
@media (max-width: 768px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-item strong {
  display: block;
  font-family: var(--font);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: .35rem;
}
.stat-item span { font-size: .9rem; opacity: .88; }

/* Empty & pager */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  color: var(--muted);
}
.pager {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2.5rem;
}
.pager a {
  text-decoration: none;
  min-width: 40px;
  text-align: center;
  padding: .5rem .75rem;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: .9rem;
  transition: all .2s;
}
.pager a:hover, .pager a.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand {
  font-family: var(--font);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: .75rem;
}
.footer-brand span { color: var(--accent); }
.site-footer h4 {
  color: #fff;
  font-family: var(--font);
  font-size: .95rem;
  margin: 0 0 1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: #94a3b8; text-decoration: none; font-size: .9rem; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.25rem;
  font-size: .85rem;
  text-align: center;
}

/* ── Mobil uyumluluk ── */
@media (max-width: 900px) {
  .container { width: min(1240px, 94vw); }

  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 88vw);
    height: 100dvh;
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 5.5rem 1.25rem 1.5rem;
    background: #fff;
    box-shadow: -8px 0 32px rgba(15,23,42,.15);
    transform: translateX(105%);
    transition: transform .28s ease;
    z-index: 200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav.is-open { transform: translateX(0); }
  .nav a {
    color: var(--text) !important;
    padding: .9rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }
  .nav a:last-child { border-bottom: 0; }
  .nav-cta {
    margin-top: .75rem;
    text-align: center;
    padding: .85rem 1rem !important;
    border-radius: 10px;
  }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s, visibility .28s;
    z-index: 150;
    border: 0;
    padding: 0;
    cursor: pointer;
  }
  .nav-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15,23,42,.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: .65rem 0;
    padding-top: max(.65rem, env(safe-area-inset-top));
  }
  .site-header.is-scrolled {
    background: rgba(255,255,255,.97);
  }

  .hero {
    min-height: auto;
    padding: calc(5.5rem + env(safe-area-inset-top)) 0 2.5rem;
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  }
  .hero-text { margin-bottom: 1.25rem; }
  .hero-text h1 { font-size: clamp(1.65rem, 7vw, 2.25rem); }
  .hero-text p { font-size: .95rem; }

  .search-wrap { border-radius: 14px; }
  .search-tabs button {
    max-width: none;
    padding: .85rem .75rem;
    font-size: .88rem;
  }
  .search-form { padding: 1rem; }
  .search-main {
    grid-template-columns: 1fr;
    gap: .65rem;
  }
  .search-main .field[style] { grid-column: auto !important; }
  .btn-advanced,
  .btn-search {
    width: 100%;
    justify-content: center;
    padding: .95rem 1rem;
    font-size: 1rem;
    min-height: 48px;
  }
  .btn-search { display: flex; align-items: center; gap: .5rem; }

  .section { padding: 2.5rem 0; }
  .section-head { margin-bottom: 1.25rem; }
  .section-head h2 { font-size: 1.45rem; }

  .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
  }
  .cat-card { padding: 1rem .75rem; }
  .cat-card__icon { width: 48px; height: 48px; font-size: 1.15rem; }
  .cat-card h3 { font-size: .92rem; }
  .cat-card p { font-size: .75rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  .prop-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .prop-card__foot {
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
  }
  .prop-card__firm {
    max-width: 100%;
    text-align: left;
    white-space: normal;
  }

  .city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .city-card { min-height: 120px; }

  .stats-bar { padding: 2rem 0; }
  .stats-grid { gap: 1rem; }

  .results-bar { font-size: .88rem; }
  .pager a {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-footer {
    padding: 2rem 0 max(1.25rem, env(safe-area-inset-bottom));
  }
  .footer-grid { gap: 1.5rem; }
}

@media (max-width: 480px) {
  .container { width: 92vw; }
  .logo-img { height: 30px; max-width: 120px; }
  .logo-tag { font-size: .75rem; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .city-grid { grid-template-columns: 1fr; }
  .search-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .search-tabs::-webkit-scrollbar { display: none; }
  .search-tabs button { flex: 0 0 auto; min-width: 33%; }
  .empty-state { padding: 2.5rem 1rem; }
}

/* iOS zoom önleme + dokunma */
@media (max-width: 900px) {
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
}

@media (hover: none) {
  .prop-card:hover,
  .cat-card:hover,
  .city-card:hover {
    transform: none;
  }
}
