/* ============================================================
   MARRAKECH ROYAL STAYS — Main Stylesheet
   Brand: #191919 (primary) | #ECE9E5 (soft bg) | #FFFFFF (white)
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

/* Arabic Font — ITF Fatimah (scoped to Arabic mode only) */
@font-face {
  font-family: 'FatimahArabic';
  src: url('../assets/fonts/itfFatimahArabic-Bold.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --primary:        #191919;
  --primary-dark:   #000000;
  --primary-light:  #333333;
  --secondary:      #6F6A64;
  --secondary-light:#8a8580;
  --gold:           #C9A96E;
  --gold-light:     #e0c68e;
  --white:          #FFFFFF;
  --cream:          #ECE9E5;
  --cream-dark:     #D8D4CE;
  --bg-light:       #ECE9E5;
  --dark:           #191919;
  --text-dark:      #191919;
  --text-medium:    #3d3d3d;
  --text-light:     #6F6A64;
  --border:         rgba(25,25,25,0.12);
  --shadow-sm:      0 2px 12px rgba(25,25,25,.08);
  --shadow-md:      0 8px 32px rgba(25,25,25,.12);
  --shadow-lg:      0 20px 60px rgba(25,25,25,.18);
  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --transition:     all .3s cubic-bezier(.4,0,.2,1);
  --ease-spring:    cubic-bezier(.34,1.56,.64,1);
  --ease-out:       cubic-bezier(.0,0,.2,1);
  --font-heading:   'Playfair Display', Georgia, serif;
  --font-serif:     'Playfair Display', Georgia, serif;
  --font-body:      'Inter', system-ui, sans-serif;
  --font-accent:    'Cormorant Garamond', Georgia, serif;
  --header-h:       90px;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}

body.rtl { direction: rtl; text-align: right; }
body.rtl .nav-links { flex-direction: row-reverse; }
body.rtl .contact-item { flex-direction: row-reverse; }
body.rtl .form-actions { flex-direction: row-reverse; }
body.rtl .form-note { text-align: right; }
body.rtl input, body.rtl textarea, body.rtl select { text-align: right; direction: rtl; }

/* ── Arabic Font — activated only when body.rtl is present ─── */
body.rtl,
body.rtl p,
body.rtl span,
body.rtl li,
body.rtl a,
body.rtl label,
body.rtl td,
body.rtl th,
body.rtl blockquote,
body.rtl .section-label,
body.rtl .section-title,
body.rtl .section-subtitle,
body.rtl .card-title,
body.rtl .card-desc,
body.rtl .nav-link,
body.rtl .footer-text,
body.rtl .badge,
body.rtl .tag,
body.rtl .price,
body.rtl .meta,
body.rtl [class*="text-"] {
  font-family: 'FatimahArabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  line-height: 1.9;
}

body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl h5,
body.rtl h6 {
  font-family: 'FatimahArabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  line-height: 1.6;
  font-weight: 700;
}

body.rtl button,
body.rtl .btn,
body.rtl .btn-primary,
body.rtl .btn-secondary,
body.rtl .btn-outline {
  font-family: 'FatimahArabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

body.rtl input,
body.rtl textarea,
body.rtl select {
  font-family: 'FatimahArabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.8;
}

body.rtl input::placeholder,
body.rtl textarea::placeholder {
  font-family: 'FatimahArabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  opacity: 0.65;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--transition); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select {
  font-family: inherit;
  outline: none;
  border: none;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  line-height: 1.25;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.2rem; }

p { color: var(--text-medium); line-height: 1.75; }

.text-gold { color: var(--gold); }
.text-secondary { color: var(--secondary); }
.text-center { text-align: center; }
.text-white { color: var(--white) !important; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-pad { padding: 90px 0; }
.section-pad-sm { padding: 60px 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* ── Section Headers ─────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 0.9rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 10px;
}


.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--primary);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-light);
  max-width: 560px;
  line-height: 1.75;
}

.section-header { margin-bottom: 50px; }
.section-header.centered { text-align: center; }
.section-header.centered .section-sub { margin: 0 auto; }

.divider-gold {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  margin: 16px 0;
}

.section-header.centered .divider-gold { margin: 16px auto; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .04em;
  transition:
    transform .25s var(--ease-spring),
    box-shadow .25s var(--ease-out),
    background .2s var(--ease-out),
    border-color .2s var(--ease-out),
    color .2s var(--ease-out);
  border: 2px solid transparent;
  white-space: nowrap;
  will-change: transform;
}

/* All buttons lift + scale slightly on hover */
.btn:hover { transform: translateY(-3px) scale(1.02); }
.btn:active { transform: translateY(-1px) scale(.99); transition-duration: .1s; }

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 10px 28px rgba(25,25,25,.35);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #b8923e);
  color: var(--white);
  border-color: transparent;
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 10px 28px rgba(201,169,110,.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(25,25,25,.2);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.7);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
  box-shadow: 0 8px 24px rgba(255,255,255,.18);
}

/* Transparent WhatsApp button — green icon, no fill */
.btn-whatsapp {
  background: transparent;
  color: var(--text-dark);
  border-color: rgba(37,211,102,.45);
}
.btn-whatsapp i {
  color: #25D366;
}
.btn-whatsapp:hover {
  background: rgba(37,211,102,.07);
  border-color: #25D366;
  box-shadow: 0 6px 20px rgba(37,211,102,.15);
  color: var(--text-dark);
}

/* WhatsApp button on dark/image backgrounds */
.hero .btn-whatsapp,
.cta-banner .btn-whatsapp,
.page-hero .btn-whatsapp,
.booking-panel .btn-whatsapp,
.form-section--dark .btn-whatsapp {
  color: rgba(255,255,255,.9);
  border-color: rgba(37,211,102,.5);
}
.hero .btn-whatsapp:hover,
.cta-banner .btn-whatsapp:hover,
.page-hero .btn-whatsapp:hover,
.booking-panel .btn-whatsapp:hover,
.form-section--dark .btn-whatsapp:hover {
  color: #fff;
  background: rgba(37,211,102,.12);
  border-color: rgba(37,211,102,.7);
  box-shadow: 0 6px 20px rgba(37,211,102,.18);
}

.btn-sm { padding: 9px 20px; font-size: .82rem; }
.btn-lg { padding: 17px 40px; font-size: 1rem; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  /* Separate transitions so each property eases independently */
  transition:
    height .4s var(--ease-out),
    box-shadow .4s var(--ease-out),
    background .4s var(--ease-out),
    border-color .4s var(--ease-out);
}

.site-header.scrolled {
  height: 76px;
  background: rgba(255,255,255,.99);
  border-bottom-color: transparent;
  box-shadow:
    0 1px 0 rgba(25,25,25,.08),
    0 4px 24px rgba(25,25,25,.08),
    0 12px 40px rgba(25,25,25,.04);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

/* Logo */
.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 0 8px;
}

/* Hide any logo text — only the image mark is shown */
.logo-text { display: none !important; }

.logo img,
.navbar-logo img,
.header-logo img,
.site-logo img {
  height: auto !important;
  width: auto !important;
  max-height: 70px !important;
  object-fit: contain !important;
  display: block;
  transition: max-height .4s var(--ease-out);
}

.site-header.scrolled .logo img,
.site-header.scrolled .navbar-logo img,
.site-header.scrolled .header-logo img,
.site-header.scrolled .site-logo img {
  max-height: 58px !important;
}

/* Nav */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  padding: 8px 12px;
  font-size: .84rem;
  font-weight: 500;
  color: var(--text-medium);
  border-radius: var(--radius-sm);
  letter-spacing: .02em;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform .25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--cream);
  border-radius: 30px;
  padding: 4px;
}

.lang-btn {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--text-light);
  background: transparent;
  border: none;
  transition: var(--transition);
  cursor: pointer;
}

.lang-btn.active {
  background: var(--primary);
  color: var(--white);
}

.lang-btn:hover:not(.active) { color: var(--primary); }

/* Search bar in header */
.header-search {
  position: relative;
  width: 220px;
}

.header-search input {
  width: 100%;
  padding: 9px 16px 9px 38px;
  border-radius: 30px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  font-size: .85rem;
  color: var(--text-dark);
  transition: var(--transition);
}

.header-search input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(25,25,25,.1);
}

.header-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: .85rem;
  pointer-events: none;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 2px solid var(--border);
  padding: 24px;
  z-index: 999;
  box-shadow: var(--shadow-md);
  flex-direction: column;
  gap: 6px;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  padding: 12px 16px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:hover { color: var(--primary); background: var(--cream); }

.mobile-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  flex-wrap: wrap;
}

/* ── Hero Section ────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/home-hero.jpeg');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  background-color: #1e0f08;
}

/* Rich multi-layer overlay — ensures text legibility over any photo */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      160deg,
      rgba(0,0,0,.68) 0%,
      rgba(0,0,0,.45) 35%,
      rgba(0,0,0,.38) 60%,
      rgba(0,0,0,.62) 100%
    );
}


.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-accent);
  font-size: 1rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.15;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}

.hero h1 em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
  line-height: 1;
}

.hero-stat-label {
  font-size: .8rem;
  color: rgba(255,255,255,.7);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 4px;
  display: block;
}

/* Hero Search Box */
.hero-search-box {
  position: relative;
  z-index: 2;
  margin-top: -50px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 36px;
}

.hero-search-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 12px;
}

.search-tab {
  padding: 8px 20px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-light);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: .03em;
}

.search-tab.active, .search-tab:hover {
  color: var(--primary);
  background: var(--cream);
}

.search-tab.active {
  color: var(--white);
  background: var(--primary);
}

.hero-search-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 16px;
  align-items: end;
}

.search-field label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.search-field input,
.search-field select {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--cream);
  font-size: .9rem;
  color: var(--text-dark);
  transition: var(--transition);
}

.search-field input:focus,
.search-field select:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(25,25,25,.1);
}

/* ── Categories Section ──────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.category-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 20px 28px;
  text-align: center;
  border: 1.5px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-6px);
}

.category-icon {
  width: 64px;
  height: 64px;
  background: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.6rem;
  color: var(--primary);
  transition: var(--transition);
}

.category-card:hover .category-icon {
  background: var(--primary);
  color: var(--white);
}

.category-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.category-card p {
  font-size: .82rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ── Why Choose Us ───────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.feature-card {
  padding: 36px 28px;
  background: var(--white);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.feature-card h4 { margin-bottom: 10px; }
.feature-card p { font-size: .9rem; }

/* ── Listings Grid ───────────────────────────────────────────── */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── CTA Banner ──────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 70px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}


.cta-content { position: relative; z-index: 1; }
.cta-content h2 {
  color: var(--white);
  margin-bottom: 12px;
  font-size: 2.2rem;
}

.cta-content p { color: rgba(255,255,255,.8); max-width: 500px; }

.cta-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ── Blog Section ────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Blog page layout classes */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.blog-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.blog-grid--two { grid-template-columns: repeat(2, 1fr); }

.blog-featured-card { grid-column: span 2; }

.blog-featured-inner {
  display: grid;
  grid-template-columns: 300px 1fr;
}

/* ── Testimonials ────────────────────────────────────────────── */
.testimonials-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.testimonial-card:hover { box-shadow: var(--shadow-md); }

.testimonial-stars {
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.testimonial-text {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--text-medium);
  font-style: italic;
  margin-bottom: 20px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b8894a, var(--gold));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--white);
  font-size: .9rem;
}

.author-info strong { display: block; font-size: .9rem; color: var(--primary); }
.author-info span { font-size: .8rem; color: var(--text-light); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.85);
  padding: 80px 0 0;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand p {
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  line-height: 1.8;
  margin: 16px 0 24px;
  max-width: 300px;
}

.footer-logo-text {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
}

.footer-logo-text span {
  display: block;
  font-size: .65rem;
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}

.social-links { display: flex; gap: 10px; flex-wrap: wrap; }

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--primary);
  transform: translateY(-3px);
}

.footer-col h5 {
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  margin-bottom: 20px;
}

.footer-links li { margin-bottom: 10px; }
.footer-links a {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  transition: var(--transition);
}
.footer-links a:hover { color: var(--white); padding-left: 4px; }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-contact-item i {
  color: rgba(255,255,255,.55);
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
}

.footer-contact-item span {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  color: rgba(255,255,255,.45);
  font-size: .82rem;
}

.footer-bottom a { color: rgba(255,255,255,.7); }

/* ── WhatsApp Floating Button ────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  width: 60px;
  height: 60px;
  background: linear-gradient(145deg, #2ee86e, #20c45a);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  /* Layered glow: ambient + focused */
  box-shadow:
    0 4px 15px rgba(37,211,102,.45),
    0 8px 32px rgba(37,211,102,.25),
    0 0 0 0 rgba(37,211,102,.3);
  transition:
    transform .3s var(--ease-spring),
    box-shadow .3s var(--ease-out);
  text-decoration: none;
  will-change: transform;
}

.whatsapp-float:hover {
  transform: scale(1.12) translateY(-3px);
  box-shadow:
    0 8px 24px rgba(37,211,102,.55),
    0 16px 48px rgba(37,211,102,.3),
    0 0 0 6px rgba(37,211,102,.10);
}

/* Tooltip label */
.whatsapp-float::after {
  content: 'WhatsApp';
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: #1a1a1a;
  color: var(--white);
  font-size: .75rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: .04em;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.whatsapp-float:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Pulse ring */
.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(37,211,102,.5);
  animation: wa-pulse 2.4s var(--ease-out) infinite;
}

@keyframes wa-pulse {
  0%   { transform: scale(1);   opacity: .8; }
  70%  { transform: scale(1.55); opacity: 0;  }
  100% { transform: scale(1.55); opacity: 0;  }
}

/* ── Scroll To Top ───────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 98px;
  z-index: 900;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  border: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: var(--transition);
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top:hover { background: var(--primary-dark); }

/* ── Success Popup ───────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 50px 44px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  position: relative;
  transform: translateY(20px) scale(.96);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #25D366, #1ebe5d);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2rem;
  color: var(--white);
}

.modal-box h3 { color: var(--primary); margin-bottom: 16px; }
.modal-box p { color: var(--text-medium); line-height: 1.8; margin-bottom: 8px; }

.modal-note {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 20px 0;
  border-left: 3px solid var(--primary);
  text-align: left;
  font-size: .88rem;
  color: var(--text-medium);
  line-height: 1.7;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cream);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-light);
  font-size: .85rem;
  transition: var(--transition);
}

.modal-close:hover { background: var(--border); color: var(--primary); }

/* ── Page Hero (inner pages) ─────────────────────────────────── */
.page-hero {
  padding: calc(var(--header-h) + 60px) 0 70px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .04;
  background-image:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,1) 0,
      rgba(255,255,255,1) 1px,
      transparent 0,
      transparent 50%);
  background-size: 28px 28px;
}

.page-hero-content { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,.75); font-size: 1rem; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: .82rem;
  color: rgba(255,255,255,.6);
}

.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb i { font-size: .65rem; }

/* ── Filters Bar ─────────────────────────────────────────────── */
.filters-bar {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-field { flex: 1; min-width: 160px; }
.filter-field label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
}

.filter-field select,
.filter-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--cream);
  font-size: .88rem;
  color: var(--text-dark);
  transition: var(--transition);
}

.filter-field select:focus,
.filter-field input:focus {
  border-color: var(--primary);
  background: var(--white);
}

/* ── Scroll Reveal Animations ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Directional variants */
.reveal-left {
  opacity: 0;
  transform: translateX(-36px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(36px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }
.reveal-delay-5 { transition-delay: .5s; }

/* ── Hero Entrance Animations ───────────────────────────────── */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Staggered entrance for each hero element — fires on page load */
.hero-eyebrow {
  animation: heroFadeUp .8s var(--ease-spring) .15s both;
}

.hero h1 {
  animation: heroFadeUp .9s var(--ease-spring) .35s both;
}

.hero-sub {
  animation: heroFadeUp .8s var(--ease-spring) .6s both;
}

.hero-actions {
  animation: heroFadeUp .8s var(--ease-spring) .82s both;
}

.hero-stats {
  animation: heroFadeUp .8s var(--ease-spring) 1.05s both;
}

/* Hero search box entrance */
.hero-search-box {
  animation: heroFadeUp .9s var(--ease-spring) 1.1s both;
}

/* ── Utilities ───────────────────────────────────────────────── */
.bg-cream { background: var(--cream); }
.bg-primary { background: var(--primary); }
.border-top { border-top: 1px solid var(--border); }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .05em;
}

.badge-gold { background: rgba(25,25,25,.07); color: var(--secondary); }
.badge-primary { background: rgba(25,25,25,.08); color: var(--primary); }
.badge-green { background: rgba(37,211,102,.12); color: #1a9449; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid > *:last-child { grid-column: 1 / -1; }
}

@media (max-width: 1024px) {
  .hero-search-fields { grid-template-columns: 1fr 1fr; }
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-wrap { grid-template-columns: 1fr 1fr; }
  .header-search { display: none; }
}

@media (max-width: 768px) {
  :root { --header-h: 70px; }
  .logo img,
  .navbar-logo img,
  .header-logo img,
  .site-logo img { max-height: 48px !important; }
  .site-header.scrolled .logo img,
  .site-header.scrolled .navbar-logo img,
  .site-header.scrolled .header-logo img,
  .site-header.scrolled .site-logo img { max-height: 40px !important; }
  .site-header,
  .navbar,
  .site-header .header-inner { min-height: 70px; padding-top: 6px; padding-bottom: 6px; align-items: center; }
  .nav-links, .header-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .lang-switcher { display: flex; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .listings-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .testimonials-wrap { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; padding: 44px 28px; text-align: center; }
  .cta-actions { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-search-fields { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; justify-content: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section-pad { padding: 60px 0; }

  /* ── Blog page mobile ── */
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; top: auto; margin-top: 40px; }
  .blog-grid--two { grid-template-columns: 1fr; }
  .blog-featured-card { grid-column: span 1 !important; }
  .blog-featured-inner { grid-template-columns: 1fr !important; }
  .blog-featured-inner .card-image {
    height: 220px;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
  }
  .blog-featured-inner .card-body { padding: 20px !important; }

  /* ── Section header stacking ── */
  .section-header.flex-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .section-header.flex-between > a,
  .section-header.flex-between > .btn { align-self: flex-start; }

  /* ── Hero search box ── */
  .hero-search-box { padding: 20px 16px; }

  /* ── Car price row ── */
  .car-price-row { flex-wrap: wrap; gap: 10px; }
  .car-price-row > div { width: 100%; justify-content: space-between; }

  /* ── Page hero (inner pages) ── */
  .page-hero { padding: calc(var(--header-h) + 28px) 0 44px; }
  .page-hero h1 { font-size: clamp(1.4rem, 5vw, 1.9rem); }
  .page-hero p { font-size: .92rem; }

  /* ── Filters bar ── */
  .filters-bar { padding: 16px 18px; gap: 10px; }

  /* ── Prevent any rogue overflow ── */
  * { max-width: 100%; box-sizing: border-box; }
  img, video, iframe { max-width: 100%; height: auto; }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-search-box { padding: 16px 14px; }
  .search-tab { padding: 6px 12px; font-size: .8rem; }
  .blog-featured-inner .card-image { height: 180px; }
  .section-sub { max-width: 100%; }
  .container { padding: 0 16px; }

  /* ── Filter fields full-width at 480px ── */
  .filter-field { min-width: 100%; }
  .filters-bar { padding: 14px 16px; }

  /* ── Page hero ── */
  .page-hero { padding: calc(var(--header-h) + 20px) 0 36px; }

  /* ── CTA banner tight padding ── */
  .cta-banner { padding: 36px 20px; }
  .cta-banner h2 { font-size: clamp(1.3rem, 6vw, 1.7rem); }

  /* ── Breadcrumb wrapping ── */
  .breadcrumb { flex-wrap: wrap; gap: 4px; }
}

/* ── Page Hero — photo variants (per-page background images) ─── */
/* Shared behaviour: hide dot-pattern, overlay baked into background */
.page-hero--photo::before,
.page-hero--sales::before,
.page-hero--cars::before,
.page-hero--blog::before,
.page-hero--about::before,
.page-hero--contact::before {
  display: none;
}

/* Rentals page */
.page-hero--photo {
  background:
    linear-gradient(rgba(20, 10, 5, 0.22), rgba(20, 10, 5, 0.22)),
    url('../images/locations-hero.jpg.jpg') center / cover no-repeat;
}

/* Sales page */
.page-hero--sales {
  background:
    linear-gradient(rgba(20, 10, 5, 0.22), rgba(20, 10, 5, 0.22)),
    url('../images/sales-hero.jpg') center / cover no-repeat;
}

/* Luxury Cars page */
.page-hero--cars {
  background:
    linear-gradient(rgba(20, 10, 5, 0.22), rgba(20, 10, 5, 0.22)),
    url('../images/cars-hero.jpg') center / cover no-repeat;
}

/* Blog page */
.page-hero--blog {
  background:
    linear-gradient(rgba(20, 10, 5, 0.22), rgba(20, 10, 5, 0.22)),
    url('../images/blog-hero.jpg') center / cover no-repeat;
}

/* About page */
.page-hero--about {
  background:
    linear-gradient(rgba(20, 10, 5, 0.22), rgba(20, 10, 5, 0.22)),
    url('../images/about-hero.jpg') center / cover no-repeat;
}

/* Contact page */
.page-hero--contact {
  background:
    linear-gradient(rgba(20, 10, 5, 0.22), rgba(20, 10, 5, 0.22)),
    url('../images/contact-hero.jpg') center / cover no-repeat;
}

/* ═══════════════════════════════════════════════════════════════════
   GLOBAL NUMERIC LTR FIX  (v2)
   All prices, areas, counts and phone numbers must display LTR even
   inside Arabic RTL layout.  Uses three mechanisms for reliability:
   1. .num-ltr utility class (apply to any element with a number)
   2. [dir="rtl"] parent-scoped overrides for known selectors
   3. JS applyNumericLTR() in translations.js handles the rest
   ═══════════════════════════════════════════════════════════════════ */

/* ── Utility class ───────────────────────────────────────────────── */
.num-ltr {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  display: inline-block;
}

/* ── Block-level price containers ────────────────────────────────── */
.sd-price-amount,
.sd-price-currency,
.sd-spec-price,
.property-price-large {
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

/* ── Inline-level price / stat numbers ───────────────────────────── */
.sales-price-block strong,
.sales-price-block,
.sd-spec-price strong,
.card-price strong,
.card-price,
.stat-number,
a[href^="tel:"] {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  display: inline-block;
}

/* ── Quick-spec rows (m², bedrooms, baths, terrain…) ─────────────── */
.sd-quick-spec {
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

/* ── Scoped to RTL context: higher specificity overrides any RTL     */
/*    inherited via body.rtl or html[dir="rtl"]                       */
[dir="rtl"] .num-ltr,
[dir="rtl"] .price-ltr,
[dir="rtl"] .sd-price-amount,
[dir="rtl"] .sd-price-currency,
[dir="rtl"] .sd-spec-price,
[dir="rtl"] .sd-spec-price strong,
[dir="rtl"] .property-price-large,
[dir="rtl"] .sales-price-block,
[dir="rtl"] .sales-price-block strong,
[dir="rtl"] .card-price,
[dir="rtl"] .card-price strong,
[dir="rtl"] .sd-quick-spec,
[dir="rtl"] a[href^="tel:"],
[dir="rtl"] .stat-number {
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

/* inline elements inside RTL — must be inline-block for direction to apply */
[dir="rtl"] .sales-price-block strong,
[dir="rtl"] .sd-spec-price strong,
[dir="rtl"] .card-price strong,
[dir="rtl"] a[href^="tel:"],
[dir="rtl"] .stat-number {
  display: inline-block;
}

/* ── RTL form fields should NOT force price text to RTL ───────────── */
body.rtl .sd-price-amount,
body.rtl .sd-quick-spec,
body.rtl .num-ltr {
  direction: ltr !important;
  unicode-bidi: isolate !important;
}

/* ═══════════════════════════════════════════════════════════════════
   HOMEPAGE — "Premium Properties for Sale" responsive grid
   Scoped to .home-sales-grid / #hp-sales-grid so it never affects
   the Sales page grid.
   ═══════════════════════════════════════════════════════════════════ */

/* Desktop: 3 columns */
.home-sales-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 28px;
}

/* Tablet ≤ 1024px: 2 columns */
@media (max-width: 1024px) {
  .home-sales-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile < 768px: 1 column, full width */
@media (max-width: 767px) {
  .home-sales-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  /* Each card spans full viewport-minus-padding width */
  .home-sales-grid .sales-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Card text should never be squeezed vertically */
  .home-sales-grid .card-title { font-size: 1.1rem; }
  .home-sales-grid .card-desc  { font-size: .88rem; }

  /* Image keeps proper aspect-ratio height on mobile */
  .home-sales-grid .sales-card .card-image {
    height: 220px !important;
  }

  /* Card actions: right padding so the floating WA button can't cover the Détails/WA buttons */
  .home-sales-grid .sales-card .card-actions {
    padding-right: 72px;
  }
}

/* Very small screens ≤ 480px */
@media (max-width: 480px) {
  .home-sales-grid {
    gap: 16px;
  }
  .home-sales-grid .sales-card .card-image {
    height: 195px !important;
  }
  .home-sales-grid .sales-card .card-body {
    padding: 14px 16px 12px !important;
  }
}
