/* ==========================================================================
   OSSMEN — main stylesheet (light theme only)
   Palette copied from the reference design.
   ========================================================================== */

/* Self-hosted fonts (SIL Open Font License): no third-party requests, cached for a year. */
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500 600; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-600.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700 900; font-display: swap; src: url("../fonts/ibm-plex-sans-arabic-700.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  color-scheme: light only;

  --primary: #1a3c6e;
  --primary-light: #2563eb;
  --primary-dark: #0f2040;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --gold: #d9a441;
  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;
  --green: #059669;

  --bg: #f1f5f9;
  --white: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, .06);
  --shadow: 0 4px 20px rgba(0, 0, 0, .08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .14);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: .25s ease;

  --topbar-h: 36px;
  --header-h: 68px;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Plus Jakarta Sans", system-ui, "Segoe UI", Tahoma, sans-serif;
  --heading-tracking: -0.022em;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[dir="rtl"] body { font-family: var(--font-ar); line-height: 1.75; --heading-tracking: 0; }
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: var(--heading-tracking); }
::selection { background: rgba(245, 158, 11, .25); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.icon { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.icon-fill { fill: currentColor; stroke: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 200; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { top: 8px; }

.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 24px; border-radius: 8px;
  font-weight: 700; font-size: .95rem; line-height: 1.2; white-space: nowrap;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-wa { background: var(--whatsapp); color: #fff; min-height: 50px; font-size: 1rem; }
.btn-wa:hover { background: var(--whatsapp-dark); }
.btn-outline-light { border: 1.5px solid rgba(255, 255, 255, .5); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; }

.topbar { background: var(--accent); color: var(--primary-dark); font-size: .8rem; height: var(--topbar-h); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 16px; }
.topbar-contacts, .topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-right { gap: 14px; }
.topbar a { display: inline-flex; align-items: center; gap: 6px; transition: opacity var(--transition); }
.topbar a:hover { opacity: .7; }
.currency-select select {
  appearance: none; background-color: rgba(15, 32, 64, .1); border: 0; border-radius: 4px;
  padding: 2px 26px 2px 8px; font-size: .75rem; font-weight: 700; color: var(--primary-dark); cursor: pointer; background-position: right 6px center; background-size: 12px;
}

.nav { background: var(--primary-dark); border-bottom: 2px solid var(--accent); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; }
.logo-mark { width: 40px; height: 37px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; direction: ltr; }
.logo-name { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 1.3rem; letter-spacing: .22em; }
.logo-tagline { white-space: nowrap; font-size: .5rem; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); margin-top: 6px; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  position: relative; display: block; padding: 6px 0;
  color: rgba(255, 255, 255, .75); font-weight: 600; font-size: .95rem; transition: color var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--accent);
}
.nav-mobile-extra { display: none; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; padding: 3px; border-radius: 8px; background: rgba(255, 255, 255, .08); }
.lang-switch a {
  min-width: 40px; padding: 5px 10px; border-radius: 6px; text-align: center;
  font-size: .78rem; font-weight: 800; color: rgba(255, 255, 255, .6); transition: background var(--transition), color var(--transition);
}
.lang-switch a:hover { color: #fff; }
.lang-switch a.active { background: var(--accent); color: #fff; }

.nav-toggle {
  display: none; width: 42px; height: 42px; align-items: center; justify-content: center;
  border-radius: 8px; color: #fff; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .07);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 540px; display: flex; align-items: center;
  color: #fff; text-align: center;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 60%, #1e4d8f);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg picture, .hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-img.is-placeholder { opacity: .12; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 32, 64, .55), rgba(15, 32, 64, .45) 60%, rgba(15, 32, 64, .7)); }

.hero-content { padding-block: 56px; max-width: 900px; }
.hero-badge {
  display: inline-block; padding: 6px 16px; margin-bottom: 20px;
  border: 1px solid rgba(245, 158, 11, .4); border-radius: 999px; background: rgba(245, 158, 11, .15);
  color: #fbbf24; font-size: .85rem; font-weight: 700;
}
.hero h1 { font-size: clamp(1.95rem, 4.8vw, 3.1rem); font-weight: 800; line-height: 1.12; text-shadow: 0 2px 24px rgba(0, 0, 0, .3); text-wrap: balance; }
.hero p { margin: 18px auto 0; max-width: 680px; font-size: clamp(1rem, 1.6vw, 1.15rem); color: rgba(255, 255, 255, .9); text-wrap: pretty; }
.hero-stats { display: flex; justify-content: center; gap: clamp(24px, 6vw, 56px); margin-top: 36px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: clamp(1.5rem, 3vw, 1.85rem); font-weight: 800; line-height: 1.1; }
.hero-stats span { font-size: .82rem; color: rgba(255, 255, 255, .75); }

/* Inner page hero */
.page-hero {
  position: relative; overflow: hidden; color: #fff; text-align: center; padding-block: 64px 72px;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .06) 1px, transparent 0) 0 0 / 22px 22px,
    linear-gradient(120deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 130%);
}
.page-hero h1 { font-size: clamp(1.65rem, 3.8vw, 2.5rem); font-weight: 800; max-width: 900px; margin-inline: auto; text-wrap: balance; }
.page-hero p { margin: 16px auto 0; max-width: 620px; color: rgba(255, 255, 255, .8); font-size: 1.05rem; }

/* ==========================================================================
   Filters
   ========================================================================== */
.filter-bar {
  position: sticky; top: calc(var(--topbar-h) + var(--header-h) + 2px); z-index: 40;
  background: var(--white); border-top: 3px solid var(--accent); box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
}
.filter-form { display: flex; align-items: flex-end; gap: 16px; padding-block: 18px; }
.filter-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 160px; min-width: 0; }
.filter-field.filter-sm { flex: 1 1 100px; }
.filter-field > span { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); white-space: nowrap; }
.filter-field select, .filter-field input,
.field select, .field input, .contact-form input, .contact-form textarea,
.owner-form > input, .owner-form textarea {
  width: 100%; height: 44px; padding: 0 14px;
  background-color: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  font-size: .92rem; transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
select {
  appearance: none; cursor: pointer; padding-inline-end: 36px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
html[dir="rtl"] select { background-position: left 12px center; }
.filter-field input::placeholder, input::placeholder, textarea::placeholder { color: #94a3b8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-light) !important; background-color: #fff !important; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.filter-meta { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; height: 44px; }
.filter-reset { font-size: .82rem; font-weight: 600; color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.filter-reset:hover { color: var(--primary); }
.filter-results-desktop { font-size: .88rem; color: var(--text-muted); white-space: nowrap; }
.filter-results-desktop strong, .filter-results strong { color: var(--primary); font-weight: 800; }
.filter-toggle { display: none; }

/* ==========================================================================
   Property cards
   ========================================================================== */
.properties-section { background: var(--bg); padding-block: 40px 64px; }
.properties-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.property-card {
  display: flex; flex-direction: column; overflow: hidden; cursor: pointer;
  background: var(--white); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px rgba(15, 23, 42, .05);
  transition: transform var(--transition), box-shadow var(--transition);
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.property-card[hidden] { display: none; }

.card-media { position: relative; aspect-ratio: 10 / 7; background: #e2e8f0; overflow: hidden; }
.card-track, .modal-track {
  display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.card-track::-webkit-scrollbar, .modal-track::-webkit-scrollbar { display: none; }
.card-slide, .modal-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
.card-slide picture, .card-img, .modal-slide img { width: 100%; height: 100%; object-fit: cover; }
.card-img { transition: transform .6s ease; }
.modal-slide img { object-fit: contain; } /* show portrait photos entirely */
.property-card:hover .card-img { transform: scale(1.04); }

.carousel-btn {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2;
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, .45); color: #fff; backdrop-filter: blur(4px);
  opacity: 0; transition: opacity var(--transition), background var(--transition);
}
.carousel-btn:hover { background: rgba(0, 0, 0, .65); }
.carousel-btn.prev { inset-inline-start: 10px; }
.carousel-btn.next { inset-inline-end: 10px; }
html[dir="rtl"] .carousel-btn .icon { transform: scaleX(-1); }
.property-card:hover .carousel-btn, .property-card:focus-within .carousel-btn, .modal-media .carousel-btn { opacity: 1; }
/* Touch screens: no hover, so keep small arrows visible (swipe also works). */
@media (hover: none) { .card-media .carousel-btn { opacity: .85; width: 30px; height: 30px; } }

.carousel-dots { position: absolute; bottom: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 5px; z-index: 2; pointer-events: none; }
.carousel-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .5); transition: background var(--transition), transform var(--transition); }
.carousel-dots span.active { background: #fff; transform: scale(1.3); }

.card-badges { position: absolute; top: 12px; inset-inline: 12px; display: flex; justify-content: space-between; gap: 8px; z-index: 2; pointer-events: none; }
.badge { padding: 5px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .01em; line-height: 1.2; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.badge-sale { background: var(--accent); }
.badge-rent { background: var(--green); }
.badge-category { background: rgba(15, 23, 42, .72); backdrop-filter: blur(6px); }

.fav-btn {
  position: absolute; bottom: 14px; inset-inline-end: 14px; z-index: 3;
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(0, 0, 0, .4); color: #fff; transition: background var(--transition), transform var(--transition);
}
.fav-btn:hover { transform: scale(1.1); }
.fav-btn[aria-pressed="true"] { background: #fff; color: #ef4444; }
.fav-btn[aria-pressed="true"] .icon { fill: currentColor; }

.card-body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 18px; }
.card-title { font-size: 1.08rem; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-location { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .88rem; color: var(--text-muted); }
.ref-badge { flex-shrink: 0; margin-inline-start: 6px; padding: 2px 8px; border-radius: 4px; background: var(--primary); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .02em; }
.card-features { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 14px 16px; font-size: .8rem; }
.card-features span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--bg); color: #334155; font-weight: 600; }
.card-features .icon { color: var(--primary); }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); flex-wrap: wrap; row-gap: 12px; }
.card-price { font-size: 1.3rem; font-weight: 800; color: var(--primary); line-height: 1.1; letter-spacing: -.01em; }
.card-price-request { font-size: 1rem; letter-spacing: 0; white-space: nowrap; }
.card-price-unit { font-size: .75rem; color: var(--text-muted); font-weight: 600; letter-spacing: .02em; }
.card-price-sqm { font-size: .72rem; color: var(--text-muted); }
.card-actions { display: flex; gap: 6px; }
.btn-call, .btn-wa-card {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px;
  border-radius: 6px; font-size: .8rem; font-weight: 700; color: #fff; transition: background var(--transition);
}
.btn-call { background: var(--primary); }
.btn-call:hover { background: var(--primary-dark); }
.btn-wa-card { background: var(--whatsapp); }
.btn-wa-card:hover { background: var(--whatsapp-dark); }

.empty-state { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 60px 16px; text-align: center; color: var(--text-muted); }
.empty-state[hidden] { display: none; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section-header { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-title { font-size: clamp(1.6rem, 3.2vw, 2.15rem); font-weight: 800; color: var(--primary); text-wrap: balance; }
.section-subtitle { margin-top: 12px; color: var(--text-muted); font-size: 1.05rem; text-wrap: pretty; }

/* Stats */
.stats-section { background: var(--primary-dark); padding-block: 64px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat strong { display: block; font-size: clamp(2rem, 4vw, 2.4rem); font-weight: 800; color: var(--accent); line-height: 1.1; }
.stat span { display: block; margin-top: 6px; font-size: .9rem; color: rgba(255, 255, 255, .7); }

/* Sell / rent out */
.sell-section { background: var(--primary); padding-block: 88px; }
.sell-section .section-title { color: #fff; }
.sell-section .section-subtitle { color: rgba(255, 255, 255, .65); }
.sell-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.sell-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 36px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius-lg);
  color: #fff; transition: background var(--transition), transform var(--transition);
}
.sell-card:hover { background: rgba(255, 255, 255, .1); transform: translateY(-3px); }
.sell-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .12); color: var(--accent); margin-bottom: 22px; }
.sell-card h3 { font-size: 1.15rem; font-weight: 800; }
.sell-card p { margin: 12px 0 28px; max-width: 420px; font-size: .92rem; color: rgba(255, 255, 255, .7); }

/* How it works */
.hiw-section { background: var(--bg); padding-block: 88px; }
.hiw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.hiw-card {
  position: relative; padding: 40px 28px 32px; text-align: center; overflow: hidden;
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.hiw-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.hiw-number { position: absolute; top: 14px; inset-inline-end: 20px; font-size: 3rem; font-weight: 800; color: rgba(26, 60, 110, .07); line-height: 1; }
.hiw-icon { width: 68px; height: 68px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, .25); }
.hiw-card h3 { font-size: 1.15rem; font-weight: 800; color: var(--primary); }
.hiw-card p { margin-top: 10px; font-size: .9rem; color: var(--text-muted); }

/* Alerts */
.alert-section { background: linear-gradient(120deg, var(--primary) 0%, var(--primary-light) 100%); padding-block: 72px; color: #fff; text-align: center; }
.alert-inner { max-width: 760px; }
.alert-section h2 { font-size: clamp(1.5rem, 3vw, 1.95rem); font-weight: 800; }
.alert-section p { margin-top: 12px; color: rgba(255, 255, 255, .8); }
.alert-form { display: flex; max-width: 460px; margin: 28px auto 12px; border-radius: 8px; overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); }
.alert-form input { flex: 1; min-width: 0; height: 48px; padding: 0 16px; border: 0; background: #fff; color: var(--text); }
.alert-form input:focus { box-shadow: none; }
.alert-form .btn { border-radius: 0; min-height: 48px; padding-inline: 20px; }
.alert-section small { color: rgba(255, 255, 255, .6); font-size: .78rem; }

/* Why us */
.whyus-section { background: var(--white); padding-block: 88px; }
.whyus-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.whyus-card { padding: 28px 22px; text-align: center; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); transition: transform var(--transition), box-shadow var(--transition), background var(--transition); }
.whyus-card:hover { background: #fff; transform: translateY(-4px); box-shadow: var(--shadow); }
.whyus-icon { width: 56px; height: 56px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 12px; background: var(--primary); color: #fff; }
.whyus-card h3 { font-size: 1rem; font-weight: 700; }
.whyus-card p { margin-top: 10px; font-size: .88rem; color: var(--text-muted); }

/* Testimonials */
.testimonials-section { background: var(--bg); padding-block: 88px; }
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card { margin: 0; display: flex; flex-direction: column; padding: 30px 28px; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.stars { display: flex; gap: 3px; color: var(--accent); }
.stars .star { fill: currentColor; stroke-width: 1; }
.testimonial-card blockquote { margin: 18px 0 22px; flex: 1; font-style: italic; font-size: .92rem; line-height: 1.8; color: var(--text-muted); }
.testimonial-card figcaption { display: flex; align-items: center; gap: 14px; padding-top: 18px; border-top: 1px solid var(--border); }
.testimonial-card figcaption strong { display: block; font-size: .95rem; }
.testimonial-card figcaption small { display: block; font-size: .78rem; color: var(--text-muted); }
.avatar { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: .85rem; }

/* Contact */
.contact-section { background: var(--white); padding-block: 88px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-form, .owner-form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form textarea, .owner-form textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 110px; }
.contact-form input:invalid.touched, .owner-form :is(input, select):invalid.touched { border-color: #ef4444; }
.form-error { color: #dc2626; font-size: .85rem; font-weight: 600; }
.contact-info h3 { font-size: 1.15rem; font-weight: 800; color: var(--primary); margin-bottom: 18px; }
.contact-info li { display: flex; align-items: center; gap: 14px; padding-block: 16px; border-bottom: 1px solid var(--border); }
.contact-info small { display: block; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.contact-info a, .contact-info li div > span { font-weight: 600; font-size: .95rem; overflow-wrap: anywhere; }
.contact-info a:hover { color: var(--primary-light); }
.ci-icon { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; background: var(--bg); color: var(--primary); }
.ci-icon.ci-wa { background: #e8f9ef; color: var(--whatsapp); }

/* Owner forms (Vendre / Mettre en location) */
.owner-section { background: var(--bg); padding-block: 72px; }
.owner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.pill { display: inline-block; padding: 5px 14px; border-radius: 999px; background: #dbeafe; color: var(--primary-light); font-size: .82rem; font-weight: 700; }
.owner-intro h2 { margin-top: 18px; font-size: clamp(1.4rem, 2.6vw, 1.6rem); font-weight: 800; }
.owner-intro p { margin-top: 8px; color: var(--text-muted); }
.check-list { margin-top: 22px; display: grid; gap: 12px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 600; color: var(--text-muted); }
.check-list .icon { color: var(--accent); }
.owner-form { padding: 32px; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--primary-dark); color: rgba(255, 255, 255, .7); padding-top: 56px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 40px; }
.footer-brand p { margin-top: 18px; max-width: 300px; color: rgba(255, 255, 255, .85); line-height: 1.7; }
.footer-socials { display: flex; gap: 10px; margin-top: 20px; }
.footer-socials a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .08); color: #fff; transition: background var(--transition); }
.footer-socials a:hover { background: var(--accent); }
.footer-title { margin-bottom: 18px; font-size: .95rem; font-weight: 800; color: #fff; }
.footer-links, .footer-contact { display: grid; gap: 10px; }
.footer a:hover { color: var(--accent); }
.footer-contact a, .footer-contact span { display: inline-flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.footer-bottom { margin-top: 44px; padding-block: 24px; border-top: 1px solid rgba(255, 255, 255, .08); text-align: center; font-size: .82rem; color: rgba(255, 255, 255, .5); }

/* Floating WhatsApp */
.wa-float {
  position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 60;
  width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%;
  background: var(--whatsapp); color: #fff; box-shadow: 0 8px 24px rgba(37, 211, 102, .45);
  transition: transform var(--transition), background var(--transition);
}
.wa-float:hover { transform: scale(1.08); background: var(--whatsapp-dark); }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--whatsapp); z-index: -1; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.6); opacity: 0; } }

/* ==========================================================================
   Property modal
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 32px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .6); backdrop-filter: blur(4px); animation: fade .2s ease; }
.modal-card {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 920px; max-height: calc(100dvh - 64px);
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); animation: pop .25s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 5; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: #fff; border: 1px solid var(--border); color: var(--text-muted); }
.modal-close:hover { color: var(--text); }
.modal-media { position: relative; min-height: 420px; background: #0f172a; }
.modal-track { position: absolute; inset: 0; }
.modal-counter { position: absolute; bottom: 12px; inset-inline-end: 12px; z-index: 2; padding: 2px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .75rem; font-weight: 700; }
.modal-content { display: flex; flex-direction: column; padding: 32px 28px 24px; overflow-y: auto; }
.modal-title { padding-inline-end: 40px; font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.modal-location { display: flex; align-items: center; gap: 6px; margin: 6px 0 10px; font-size: .9rem; color: var(--text-muted); }
.ref-badge-lg { align-self: flex-start; margin: 0; padding: 4px 10px; border-radius: 6px; font-size: .78rem; }
.modal-price-block { margin-top: 18px; padding-block: 16px; border-block: 1px solid var(--border); }
.modal-price { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.modal-currency { font-weight: 700; color: var(--text-muted); }
.modal-sqm, .modal-approx { font-size: .8rem; color: var(--text-muted); }
.modal-approx { font-style: italic; }
.modal-features { display: flex; gap: 28px; padding-block: 16px; }
.modal-features div { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--primary); }
.modal-features div[hidden] { display: none; }
.modal-features strong { color: var(--text); font-size: 1rem; }
.modal-features span { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.modal-description h3 { font-size: .9rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.modal-description p { margin-top: 8px; font-size: .9rem; line-height: 1.8; color: var(--text-muted); white-space: pre-line; }
.modal-actions { display: grid; gap: 10px; margin-top: 22px; }
.modal-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 8px; font-weight: 700; color: #fff; transition: background var(--transition); }
.modal-btn-call { background: var(--primary); }
.modal-btn-call:hover { background: var(--primary-dark); }
.modal-btn-wa { background: var(--whatsapp); }
.modal-btn-wa:hover { background: var(--whatsapp-dark); }
body.modal-open { overflow: hidden; }


/* Scroll reveal (only when JS is running, so content never stays hidden) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: .88rem; }
  .whyus-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .properties-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-form { flex-wrap: wrap; }
  .filter-field, .filter-field.filter-sm { flex: 1 1 calc(33.333% - 16px); }
  .filter-meta { flex: 1 1 100%; justify-content: space-between; height: auto; }
  .hide-sm { display: none !important; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .topbar { display: none; }
  .filter-bar { top: calc(var(--header-h) + 2px); }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 100%; inset-inline: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 16px; background: var(--primary-dark); border-bottom: 2px solid var(--accent);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .2);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-links.open { visibility: visible; opacity: 1; transform: none; }
  .nav-links a { padding: 14px 4px; font-size: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  .nav-links a.active { color: var(--accent); }
  .nav-links a.active::after { display: none; }
  .nav-mobile-extra { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px 4px; color: rgba(255, 255, 255, .75); font-weight: 600; }
  .nav-mobile-extra select { width: auto; height: 36px; padding: 0 12px; border-radius: 6px; background-color: rgba(255, 255, 255, .1); border: 0; color: #fff; font-weight: 700; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
  .nav-mobile-extra option { color: var(--text); }

  .hero { min-height: 480px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .sell-grid, .contact-grid, .owner-grid { grid-template-columns: 1fr; }
  .contact-grid, .owner-grid { gap: 40px; }
  .hiw-grid, .testimonials-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  /* Collapsible filters */
  .filter-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 52px; font-weight: 700; color: var(--text); }
  .filter-toggle > span { display: inline-flex; align-items: center; gap: 8px; }
  .filter-results { font-weight: 500; color: var(--text-muted); font-size: .9rem; }
  .filter-toggle[aria-expanded="true"] .filter-results .icon { transform: rotate(180deg); }
  .filter-count { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; }
  .filter-count[hidden] { display: none; }
  .filter-form { display: none; padding-top: 4px; }
  .filter-form.open { display: flex; }
  .filter-field, .filter-field.filter-sm { flex: 1 1 calc(50% - 16px); }
  .filter-results-desktop { display: none; }
}

@media (max-width: 640px) {
  .container { padding-inline: 16px; }
  .logo-mark { width: 34px; height: 31px; }
  .logo-name { font-size: 1.1rem; }
  .lang-switch a { min-width: 34px; padding: 5px 7px; }

  .hero { min-height: 0; }
  .hero-content { padding-block: 48px 52px; }
  .hero-badge { margin-bottom: 16px; }
  .hero-stats { gap: 20px; }
  .page-hero { padding-block: 44px 48px; }

  .properties-section { padding-block: 24px 48px; }
  .properties-grid { grid-template-columns: 1fr; gap: 20px; }
  .card-footer { flex-wrap: wrap; }
  .card-actions { width: 100%; }
  .card-actions a { flex: 1; justify-content: center; min-height: 42px; font-size: .88rem; }

  .stats-section { padding-block: 48px; }
  .sell-section, .hiw-section, .whyus-section, .testimonials-section, .contact-section { padding-block: 60px; }
  .owner-section { padding-block: 40px 56px; }
  .section-header { margin-bottom: 32px; }
  .sell-card { padding: 32px 20px; }
  .whyus-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .owner-form { padding: 22px 18px; }
  .alert-form { flex-direction: column; border-radius: 10px; }
  .alert-form .btn { border-radius: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .wa-float { width: 52px; height: 52px; bottom: 18px; inset-inline-end: 18px; }

  .modal { padding: 0; place-items: end center; }
  .modal-card { grid-template-columns: 1fr; max-height: 92dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow-y: auto; animation: sheet .3s ease; }
  @keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
  .modal-media { min-height: 0; aspect-ratio: 4 / 3; }
  .modal-content { overflow: visible; padding: 22px 18px 28px; }
  .modal-features { justify-content: space-around; }
}

@media (max-width: 380px) {
  .logo-tagline { display: none; }
  .card-actions { width: 100%; }
  .card-actions a { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
