/* Taha Emlak: one stylesheet for all pages. Works in RTL (Arabic) and LTR (English/Turkish). */
:root {
  --brand: #0e5a4c;
  --brand-dark: #0a4339;
  --accent: #c8963e;
  --ink: #1c2321;
  --muted: #5d6865;
  --bg: #f7f5f0;
  --surface: #ffffff;
  --line: #e4e0d6;
  --wa: #1fa855;
  --sold: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(14,90,76,.07);
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8em 1.4em; border-radius: 10px; border: 0; background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s; }
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn-wa { background: var(--wa); }
.btn-wa:hover { background: #178a45; }
.btn-ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: #fff; border-color: var(--brand); }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247,245,240,.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo span { display: flex; flex-direction: column; line-height: 1.1; }
.logo strong { font-size: 1.15rem; }
.logo small { color: var(--muted); font-size: .78rem; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { color: var(--ink); padding: .5em .8em; border-radius: 8px; font-weight: 500; }
.main-nav a:hover, .main-nav a.active { background: #ece8de; text-decoration: none; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-inline-start: 8px; background: #fff; }
.lang-switch button { border: 0; background: none; font: inherit; font-size: .85rem; font-weight: 600; padding: .25em .7em; border-radius: 999px; cursor: pointer; color: var(--muted); }
.lang-switch button.active { background: var(--brand); color: #fff; }
.menu-btn { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* hero */
.hero { background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 70%); color: #fff; padding: 72px 0 88px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(200,150,62,.35), transparent 65%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); max-width: 18ch; }
.hero-sub { font-size: 1.1rem; max-width: 56ch; opacity: .9; margin: 0 0 28px; }
.search-box { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; background: #fff; color: var(--ink); padding: 16px; border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0,0,0,.18); align-items: end; }

/* form fields */
label > span { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; padding: .7em .8em; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(14,90,76,.12); }

/* sections */
.section { padding: 64px 0; }
.section.alt { background: #efece4; }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.link-more { font-weight: 600; }
.page-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }

/* type tiles */
.type-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.type-tile { display: flex; flex-direction: column; gap: 4px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); transition: transform .15s, box-shadow .15s; }
.type-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.type-tile svg { width: 40px; height: 40px; color: var(--brand); margin-bottom: 8px; }
.type-tile strong { font-size: 1.2rem; }
.type-tile span { color: var(--muted); }

/* listing cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); transition: transform .15s; }
.card:hover { transform: translateY(-3px); text-decoration: none; }
.card-media { position: relative; aspect-ratio: 4 / 3; background: #e7e3d9; display: grid; place-items: center; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media.empty svg { width: 64px; height: 64px; color: #a7a091; }
.type-chip { position: absolute; top: 12px; inset-inline-start: 12px; background: rgba(255,255,255,.95); color: var(--brand); font-size: .8rem; font-weight: 700; padding: .25em .7em; border-radius: 999px; }
.type-chip.static { position: static; display: inline-block; background: #e3efe9; margin-bottom: 8px; }
.badge { position: absolute; top: 12px; inset-inline-end: 12px; background: var(--accent); color: #fff; font-size: .78rem; font-weight: 700; padding: .25em .7em; border-radius: 999px; }
.badge.sold { background: var(--sold); }
.badge.reserved { background: #7a5b1c; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.05rem; margin: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .9rem; }
.facts span { display: inline-flex; align-items: center; gap: 4px; }
.price { font-weight: 700; color: var(--brand); font-size: 1.2rem; margin-top: auto; direction: ltr; text-align: start; unicode-bidi: plaintext; }
.price.big { font-size: 1.7rem; margin: 4px 0 16px; }
.empty-msg { grid-column: 1 / -1; padding: 32px; text-align: center; background: var(--surface); border-radius: var(--radius); color: var(--muted); }

/* why */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 20px; }
.why { background: var(--surface); padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); }
.why-num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #f3e8d3; color: #8a6420; font-weight: 700; margin-bottom: 10px; }
.why h3 { font-size: 1.05rem; }
.why p { margin: 0; color: var(--muted); }

/* sell */
.sell { background: var(--ink); color: #fff; }
.sell-inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
.sell p { opacity: .85; }
.sell-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: var(--surface); color: var(--ink); padding: 20px; border-radius: var(--radius); }
.sell-form .full { grid-column: 1 / -1; }

/* listings page */
.filter-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; background: var(--surface); padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 12px; }
.count { margin: 20px 0 0; }

/* property page */
.back { display: inline-block; margin-bottom: 16px; font-weight: 600; }
.prop-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
.gallery-main { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: #e7e3d9; display: grid; place-items: center; align-content: center; gap: 8px; color: #8d8676; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main.empty svg { width: 80px; height: 80px; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: 0 0 88px; height: 66px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; }
.thumbs button.active { border-color: var(--brand); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.prop-desc { margin-top: 28px; background: var(--surface); padding: 24px; border-radius: var(--radius); }
.prop-desc h2 { font-size: 1.2rem; }
.prop-side { position: sticky; top: 88px; background: var(--surface); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.prop-side h1 { font-size: 1.4rem; margin: 0; }
.spec { margin: 0 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.spec div { background: #fff; padding: 10px 12px; }
.spec dt { font-size: .8rem; color: var(--muted); }
.spec dd { margin: 0; font-weight: 600; }

/* footer */
.site-footer { background: #13201d; color: #d6dcd9; padding: 56px 0 0; }
.site-footer .logo { color: #fff; }
.site-footer .logo small, .site-footer .muted { color: #9aa7a3; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer a { color: #e7ecea; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.contact-list, .footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact-list li { display: flex; align-items: center; gap: 10px; }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); }
.socials a:hover { background: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding: 18px 16px; font-size: .85rem; color: #9aa7a3; }

/* floating WhatsApp button */
.wa-fab { position: fixed; bottom: 20px; inset-inline-end: 20px; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 60; }
.wa-fab svg { width: 30px; height: 30px; }

/* responsive */
@media (max-width: 960px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .sell-inner, .prop-grid { grid-template-columns: 1fr; }
  .prop-side { position: static; }
  .filter-bar { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .main-nav { display: none; position: absolute; top: 68px; inset-inline: 0; flex-direction: column; align-items: stretch; background: var(--bg); padding: 12px 16px 20px; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08); }
  .nav-open .main-nav { display: flex; }
  .main-nav a { padding: .8em; }
  .lang-switch { margin: 8px 0 0; align-self: flex-start; }
  .search-box { grid-template-columns: 1fr 1fr; }
  .search-box .btn { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .hero { padding: 48px 0 56px; }
  .search-box, .sell-form, .filter-bar { grid-template-columns: 1fr; }
  .type-tiles, .why-grid, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
}
