@import url('https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@400;500;700;900&family=Assistant:wght@300;400;500;600;700;800&display=swap');

:root {
  --ink: #07070a;
  --panel: #14120c;
  --panel-light: #1d1a13;
  --gold: #c9a227;
  --gold-bright: #eccf74;
  --gold-dim: #6b5a26;
  --ivory: #f4efe1;
  --muted: #a89c82;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--ivory);
  font-family: 'Assistant', sans-serif;
  direction: rtl;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, .font-display {
  font-family: 'Frank Ruhl Libre', serif;
  margin: 0;
}

p { margin: 0; }

::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 6px; }

.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 7, 10, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(107, 90, 38, 0.3);
}
.site-header .container {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header .logo img { height: 56px; width: auto; object-fit: contain; }
.site-nav { display: none; align-items: center; gap: 32px; }
.site-nav a {
  font-size: 14px;
  color: rgba(244, 239, 225, 0.8);
  transition: color .2s;
}
.site-nav a:hover, .site-nav a.active { color: var(--gold-bright); }
.site-nav .btn-outline { border: 1px solid var(--gold); color: var(--gold-bright); padding: 8px 16px; font-size: 14px; }
.site-nav .btn-outline:hover { background: var(--gold); color: var(--ink); }

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span { display: block; width: 24px; height: 1px; background: var(--gold); }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(107, 90, 38, 0.3);
  background: var(--panel);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { font-size: 16px; color: rgba(244, 239, 225, 0.85); }

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .menu-toggle { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  padding: 12px 28px;
  border: none;
  cursor: pointer;
  transition: background .2s;
  font-family: 'Assistant', sans-serif;
  font-size: 15px;
}
.btn:hover { background: var(--gold-bright); }
.btn-ghost {
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  padding: 12px 28px;
  transition: all .2s;
  font-size: 15px;
}
.btn-ghost:hover { background: var(--gold); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 64px 20px 80px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .07;
  background: radial-gradient(circle at 50% 0%, #c9a227 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }
.hero img.hero-logo { height: 112px; width: auto; margin: 0 auto 32px; object-fit: contain; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .3em; font-size: 12px; margin-bottom: 16px; }
.hero h1 { font-size: 40px; line-height: 1.15; }
.hero p.lead { color: rgba(244,239,225,.7); font-size: 17px; margin-top: 24px; max-width: 560px; margin-inline: auto; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 36px; }

@media (min-width: 768px) {
  .hero h1 { font-size: 56px; }
}

/* ---------- Skyline divider (signature element) ---------- */
.skyline-divider { width: 100%; height: 46px; display: block; }
.skyline-divider path { fill: none; stroke: var(--gold); stroke-width: 1.25; opacity: .7; }

/* ---------- Sections ---------- */
.section { padding: 64px 20px; max-width: 1152px; margin: 0 auto; }
@media (min-width: 768px) { .section { padding: 96px 20px; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; gap: 16px; flex-wrap: wrap; }
.section h2 { font-size: 30px; }
@media (min-width: 768px) { .section h2 { font-size: 36px; } }

/* ---------- Property grid & cards ---------- */
.grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: block;
  background: var(--panel);
  border: 1px solid rgba(107, 90, 38, 0.2);
  transition: border-color .2s;
}
.card:hover { border-color: rgba(201, 162, 39, 0.6); }
.card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--panel-light); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .thumb img { transform: scale(1.05); }
.card .thumb.empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; height: 100%; }
.card .body { padding: 20px; }
.card .row-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card h3 { font-size: 18px; line-height: 1.3; }
.card .badge { font-size: 11px; text-transform: uppercase; letter-spacing: .15em; color: var(--gold-bright); border: 1px solid rgba(201,162,39,.5); padding: 2px 8px; white-space: nowrap; }
.badge { font-size: 11px; text-transform: uppercase; letter-spacing: .15em; color: var(--gold-bright); border: 1px solid rgba(201,162,39,.5); padding: 2px 8px; white-space: nowrap; }
.card .city { color: var(--muted); font-size: 14px; margin-top: 4px; }
.card .meta { display: flex; gap: 16px; margin-top: 12px; font-size: 14px; color: rgba(244,239,225,.8); }
.card .price { color: var(--gold-bright); font-size: 20px; margin-top: 16px; }

.muted { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--panel); border-top: 1px solid rgba(107,90,38,.3); margin-top: 96px; }
.footer-grid { display: grid; gap: 40px; padding: 48px 20px; max-width: 1152px; margin: 0 auto; font-size: 14px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-grid h3 { color: var(--gold-bright); font-size: 20px; margin-bottom: 12px; }
.footer-grid h4 { color: var(--gold); text-transform: uppercase; letter-spacing: .15em; font-size: 12px; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; color: rgba(244,239,225,.7); }
.footer-grid ul a:hover { color: var(--gold-bright); }
.footer-grid p { color: rgba(244,239,225,.7); line-height: 1.7; }
.footer-bottom { text-align: center; font-size: 12px; color: rgba(244,239,225,.4); padding-bottom: 24px; }

/* ---------- WhatsApp float button ---------- */
.wa-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  transition: background .2s;
}
.wa-float:hover { background: var(--gold-bright); }
.wa-float span.label { display: none; font-size: 14px; }
@media (min-width: 640px) { .wa-float span.label { display: inline; } }

/* ---------- Forms ---------- */
.input, textarea.input {
  width: 100%;
  background: var(--ink);
  border: 1px solid rgba(107,90,38,.3);
  padding: 12px 16px;
  color: var(--ivory);
  outline: none;
  font-family: 'Assistant', sans-serif;
  font-size: 15px;
}
.input:focus { border-color: var(--gold); }
.input::placeholder { color: var(--muted); }
label.field-label { display: block; font-size: 12px; color: var(--gold); text-transform: uppercase; letter-spacing: .15em; margin-bottom: 8px; }
.field { margin-bottom: 16px; }

/* ---------- About page ---------- */
.about-grid { display: grid; gap: 48px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 380px 1fr; } }
.about-photo { border: 1px solid rgba(107,90,38,.4); padding: 8px; max-width: 380px; margin: 0 auto; }
@media (min-width: 900px) { .about-photo { margin: 0; } }
.about-copy { display: flex; flex-direction: column; gap: 20px; font-size: 18px; line-height: 1.8; color: rgba(244,239,225,.85); }
.about-highlight { color: var(--gold-bright); font-size: 20px; }
.stat-grid { display: grid; gap: 20px; grid-template-columns: 1fr; text-align: center; margin-top: 48px; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-box { border: 1px solid rgba(107,90,38,.2); padding: 32px 16px; }
.stat-box .font-display { font-size: 24px; margin-top: 8px; }

/* ---------- Property detail ---------- */
.detail-grid { display: grid; gap: 40px; grid-template-columns: 1fr; margin-top: 24px; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.detail-main-img { aspect-ratio: 4/3; background: var(--panel); border: 1px solid rgba(107,90,38,.2); overflow: hidden; }
.detail-main-img img { width: 100%; height: 100%; object-fit: cover; }
.thumb-row { display: flex; gap: 12px; margin-top: 16px; overflow-x: auto; }
.thumb-row button { width: 80px; height: 80px; flex-shrink: 0; border: 1px solid rgba(107,90,38,.2); padding: 0; cursor: pointer; background: none; }
.thumb-row button.active { border-color: var(--gold); }
.thumb-row img { width: 100%; height: 100%; object-fit: cover; }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.detail-stats .stat-box .font-display { font-size: 20px; margin: 0; }
.detail-stats .stat-box p:last-child { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---------- Admin ---------- */
.admin-login-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.admin-login-box { width: 100%; max-width: 380px; }
.admin-login-box img { height: 80px; margin: 0 auto 32px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; gap: 16px; flex-wrap: wrap; }
.admin-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  border: 1px solid rgba(107,90,38,.2);
  padding: 16px;
  margin-bottom: 12px;
}
.admin-list-item .thumb { width: 64px; height: 64px; flex-shrink: 0; background: var(--panel-light); overflow: hidden; }
.admin-list-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-list-item .info { flex: 1; min-width: 0; }
.admin-list-item .info p:first-child { font-family: 'Frank Ruhl Libre', serif; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-list-item .info p:last-child { color: var(--muted); font-size: 14px; margin-top: 2px; }
.admin-list-item .action-link { font-size: 14px; color: var(--gold-bright); cursor: pointer; background: none; border: none; }
.admin-list-item .action-danger { font-size: 14px; color: #f87171; cursor: pointer; background: none; border: none; }

.property-form { background: var(--panel); border: 1px solid rgba(107,90,38,.3); padding: 24px; margin-bottom: 40px; }
.property-form h2 { font-size: 24px; margin-bottom: 16px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.checkbox-field { display: flex; align-items: center; gap: 8px; margin-top: 24px; font-size: 14px; }
.checkbox-field input { width: 16px; height: 16px; }
.image-upload-preview { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.image-upload-preview .thumb-wrap { position: relative; width: 96px; height: 96px; border: 1px solid rgba(107,90,38,.3); }
.image-upload-preview .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.image-upload-preview .remove-btn {
  position: absolute; top: -8px; left: -8px;
  background: var(--ink); border: 1px solid var(--gold); color: var(--gold-bright);
  width: 24px; height: 24px; font-size: 12px; cursor: pointer;
}
.form-actions { display: flex; gap: 12px; padding-top: 8px; }
.btn-cancel { border: 1px solid rgba(107,90,38,.4); color: rgba(244,239,225,.7); padding: 10px 24px; background: none; cursor: pointer; }
.btn-cancel:hover { border-color: var(--gold); }
.error-text { color: #f87171; font-size: 14px; }

.reveal { animation: revealUp .7s ease-out both; }
@keyframes revealUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } }
