:root {
  color-scheme: light;
  --primary: #0b2e59;
  --primary-2: #0f5f99;
  --cyan: #18bfea;
  --cyan-2: #7ce4ff;
  --magenta: #d93a8c;
  --bg: #f5fafd;
  --surface: #ffffff;
  --surface-2: #eef8fc;
  --text: #102033;
  --muted: #5c6f82;
  --border: #d8e5ef;
  --shadow: 0 22px 55px rgba(11, 46, 89, 0.12);
  --shadow-soft: 0 14px 30px rgba(11, 46, 89, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --container: 1180px;
  --header-height: 84px;
  --focus: 0 0 0 4px rgba(24, 191, 234, 0.28);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --primary: #1ec8f2;
  --primary-2: #56d9f6;
  --cyan: #1ec8f2;
  --cyan-2: #7ce4ff;
  --magenta: #f05aa6;
  --bg: #071b2f;
  --surface: #0d2a45;
  --surface-2: #102f4e;
  --text: #f4faff;
  --muted: #b8c7d6;
  --border: #1e4664;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 16px 36px rgba(0, 0, 0, 0.24);
  --focus: 0 0 0 4px rgba(30, 200, 242, 0.32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "Noto Sans Arabic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body[dir="rtl"], html[dir="rtl"] body {
  font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 10px; }

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.section { padding: 88px 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: 34px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-kicker, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-2);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-kicker::before, .eyebrow::before {
  content: "";
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
}
html[dir="rtl"] .section-kicker::before, html[dir="rtl"] .eyebrow::before { order: 2; }
h1, h2, h3 { line-height: 1.14; margin: 0 0 14px; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.4rem, 8vw, 5.3rem); color: var(--primary); }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); color: var(--text); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 16px; color: var(--muted); }
.small { font-size: 0.88rem; }

.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 9999;
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
  box-shadow: var(--shadow-soft);
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
}
.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}
.brand-logo {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: cover;
}
.brand-text { display: grid; line-height: 1.1; }
.brand-text strong { color: var(--primary); letter-spacing: -0.02em; }
.brand-text small { color: var(--muted); font-size: 0.76rem; font-weight: 700; margin-top: 4px; }
.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-inline: auto;
}
.primary-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 750;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.primary-nav a:hover, .primary-nav a:focus-visible { background: var(--surface-2); color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.segmented {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
}
.segmented button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  min-width: 42px;
  border-radius: 999px;
  font-weight: 850;
}
.segmented button.active { background: var(--primary); color: #fff; }
.theme-select {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 12px;
  max-width: 112px;
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 999px;
}

.hero {
  min-height: calc(100vh - var(--header-height));
  display: grid;
  align-items: center;
  overflow: hidden;
  padding-top: 64px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 12%, color-mix(in srgb, var(--cyan) 28%, transparent) 0 22%, transparent 36%),
    radial-gradient(circle at 8% 22%, color-mix(in srgb, var(--magenta) 13%, transparent) 0 16%, transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 86%, transparent), var(--bg));
  opacity: 0.92;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: 42px;
}
.hero-content { max-width: 740px; }
.hero-subtitle {
  color: var(--primary-2);
  font-size: clamp(1.2rem, 2.6vw, 2rem);
  font-weight: 850;
  margin-top: -6px;
}
.hero-arabic {
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  color: var(--magenta);
  font-weight: 850;
  margin-bottom: 12px;
}
.hero-lead { font-size: 1.12rem; max-width: 660px; color: var(--muted); }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 850;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--primary); border-color: var(--border); }
.full-width { width: 100%; }

.hero-card {
  position: relative;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--cyan), transparent 46%, var(--magenta));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.hero-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 22px;
  background: var(--surface-2);
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.quick-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
}
.quick-card strong { display: block; color: var(--text); font-size: 0.92rem; }
.quick-card small { color: var(--muted); font-size: 0.76rem; }
.icon, .card-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: color-mix(in srgb, var(--cyan) 18%, var(--surface));
  color: var(--primary);
  font-weight: 900;
}

.intro-band { padding: 28px 0 36px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.stat strong { display: block; font-size: 1.45rem; color: var(--primary); line-height: 1; margin-bottom: 8px; }
.stat span { color: var(--muted); font-weight: 650; }

.split-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 42px; align-items: start; }
.section-copy p { font-size: 1.02rem; }
.values-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.value-card, .service-card, .info-card, .faq-item, .contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}
.value-card { padding: 22px; }
.value-card span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--primary);
  background: var(--surface-2);
  font-weight: 900;
  margin-bottom: 16px;
}
.value-card h3 { color: var(--text); }

.services-section { background: color-mix(in srgb, var(--surface-2) 64%, var(--bg)); }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.service-card { padding: 20px; display: flex; flex-direction: column; min-height: 100%; }
.service-card .service-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.service-card h3 { margin-bottom: 0; }
.service-card p { font-size: 0.95rem; }
.service-list {
  padding: 0;
  margin: 8px 0 18px;
  list-style: none;
  display: grid;
  gap: 8px;
}
.service-list li {
  position: relative;
  padding-inline-start: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}
.service-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}
.service-card .btn { margin-top: auto; width: 100%; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
.gallery-item img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-caption {
  position: absolute;
  inset-inline: 12px;
  bottom: 12px;
  background: rgba(7, 27, 47, 0.74);
  color: #fff;
  border-radius: 14px;
  padding: 8px 10px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.info-card { padding: 22px; }
.info-card .card-icon { margin-bottom: 16px; }
.contact-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 9px; }
.contact-list.compact { gap: 6px; }
.contact-list li { color: var(--muted); }
.contact-list a { color: var(--primary); font-weight: 800; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.social-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary);
  font-weight: 800;
  border: 1px solid var(--border);
}
.map-card {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, transparent), transparent),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.map-card p { margin-bottom: 0; }

.contact-section { background: linear-gradient(135deg, color-mix(in srgb, var(--cyan) 9%, transparent), transparent 55%); }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 42px; align-items: start; }
.contact-form { padding: 24px; }
.form-row { display: grid; gap: 8px; margin-bottom: 16px; }
.form-row label { color: var(--text); font-weight: 850; }
.form-row input, .form-row textarea {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--text);
  padding: 14px 14px;
  min-width: 0;
  width: 100%;
}
.form-row textarea { resize: vertical; }
.privacy-note {
  padding: 12px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--magenta) 9%, var(--surface));
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--magenta) 22%, var(--border));
}
.form-status { margin: 12px 0 0; font-weight: 800; color: var(--primary); }

.faq-list { display: grid; gap: 12px; max-width: 900px; }
.faq-item { overflow: hidden; }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 900;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--primary);
  flex: 0 0 auto;
}
.faq-item[open] summary::after { content: "⌃"; }
.faq-item p { padding: 0 20px 18px; margin: 0; }

.site-footer {
  background: #06192b;
  color: #f4faff;
  padding: 56px 0 26px;
}
.site-footer p, .site-footer .brand-text small { color: #b8c7d6; }
.site-footer .brand-text strong { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 32px; }
.footer-grid h2 { font-size: 1rem; color: #fff; margin-bottom: 14px; letter-spacing: 0; }
.footer-grid a { display: block; color: #d5ecff; margin: 8px 0; }
.footer-grid a:hover { color: var(--cyan-2); }
.footer-bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #b8c7d6;
  font-size: 0.92rem;
}

.floating-whatsapp {
  position: fixed;
  inset-inline-end: 18px;
  bottom: 18px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #25d366, #11a85a);
  color: #fff;
  box-shadow: 0 18px 38px rgba(17, 168, 90, 0.32);
  font-weight: 900;
}
html[dir="rtl"] .floating-whatsapp { inset-inline-start: 18px; inset-inline-end: auto; }
.floating-whatsapp span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: rgba(255,255,255,0.18);
}
.noscript {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 999;
  padding: 14px;
  background: #f59e0b;
  color: #111827;
  text-align: center;
  font-weight: 800;
}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

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

@media (max-width: 1100px) {
  .primary-nav { position: fixed; inset: var(--header-height) 16px auto 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 12px; flex-direction: column; align-items: stretch; display: none; }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: 12px 14px; }
  .nav-toggle { display: inline-block; margin-inline-start: auto; }
  .header-actions { margin-inline-start: 0; }
  .hero-grid, .split-grid, .contact-grid { grid-template-columns: 1fr; }
  .service-grid, .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  :root { --header-height: 76px; }
  .container { width: min(100% - 24px, var(--container)); }
  .section { padding: 64px 0; }
  .header-inner { gap: 10px; }
  .brand-text small { display: none; }
  .brand-logo { width: 46px; height: 46px; }
  .theme-select { max-width: 92px; padding: 9px 8px; font-size: 0.86rem; }
  .segmented button { min-width: 36px; padding: 7px 8px; }
  .hero { min-height: auto; padding: 54px 0 64px; }
  .hero-actions, .contact-actions { flex-direction: column; }
  .btn { width: 100%; }
  .quick-grid, .values-grid, .service-grid, .info-grid, .stats-grid, .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .gallery-item:first-child { grid-column: span 2; }
  .gallery-item img { min-height: 170px; }
  .map-card { flex-direction: column; align-items: stretch; }
  .floating-whatsapp { inset-inline: 12px; justify-content: center; bottom: 12px; border-radius: 18px; }
  html[dir="rtl"] .floating-whatsapp { inset-inline: 12px; }
  .site-footer { padding-bottom: 88px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 430px) {
  .header-actions { gap: 6px; }
  .brand-text strong { font-size: 0.88rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item:first-child { grid-column: auto; }
}

body.modal-open { overflow: hidden; }

.map-preview-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
}
.map-preview-card::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% 44%;
  height: 240px;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--cyan) 34%, transparent) 0 28%, transparent 62%),
    radial-gradient(circle at 74% 30%, color-mix(in srgb, var(--magenta) 18%, transparent) 0 18%, transparent 50%);
  filter: blur(4px);
  opacity: 0.88;
  pointer-events: none;
}
.map-preview-copy,
.map-preview-actions {
  position: relative;
  z-index: 1;
}
.map-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}
.map-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  padding: 6px 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cyan) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--cyan) 26%, var(--border));
  color: var(--primary);
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.map-modal {
  width: min(100% - 28px, 1040px);
  max-height: min(92vh, 860px);
  padding: 0;
  border: 0;
  border-radius: 32px;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.map-modal::backdrop {
  background:
    radial-gradient(circle at 18% 14%, rgba(24, 191, 234, 0.28), transparent 30%),
    radial-gradient(circle at 82% 86%, rgba(217, 58, 140, 0.22), transparent 28%),
    rgba(3, 13, 24, 0.72);
  backdrop-filter: blur(14px);
}
.map-modal-panel {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, transparent), color-mix(in srgb, var(--surface-2) 88%, transparent)),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}
.map-modal-panel::before {
  content: "";
  position: absolute;
  inset: -35% -20% auto auto;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--cyan) 34%, transparent), transparent 66%);
  pointer-events: none;
}
.map-modal-panel::after {
  content: "";
  position: absolute;
  inset: auto auto -34% -12%;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--magenta) 18%, transparent), transparent 68%);
  pointer-events: none;
}
.map-modal-close {
  position: absolute;
  inset-block-start: 18px;
  inset-inline-end: 18px;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  font-size: 1.7rem;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
}
.map-modal-header {
  position: relative;
  z-index: 2;
  padding: 30px 82px 18px 30px;
}
html[dir="rtl"] .map-modal-header { padding: 30px 30px 18px 82px; }
.map-modal-header h2 {
  font-size: clamp(1.55rem, 3vw, 2.5rem);
  margin-bottom: 8px;
  color: var(--text);
}
.map-modal-header p { max-width: 720px; margin-bottom: 0; }
.map-embed-wrap {
  position: relative;
  z-index: 2;
  margin: 0 18px;
  border-radius: 26px;
  overflow: hidden;
  min-height: min(55vh, 520px);
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), var(--shadow-soft);
}
.map-embed-wrap iframe {
  width: 100%;
  height: min(55vh, 520px);
  min-height: 360px;
  display: block;
  filter: saturate(1.04) contrast(1.02);
}
.map-modal-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 30px 30px;
}
.map-modal-footer p {
  margin: 0;
  font-weight: 750;
}

@media (max-width: 720px) {
  .map-preview-actions,
  .map-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .map-modal {
    width: min(100% - 18px, 1040px);
    max-height: 94vh;
    border-radius: 24px;
  }
  .map-modal-panel { border-radius: 24px; }
  .map-modal-header {
    padding: 72px 18px 14px;
  }
  html[dir="rtl"] .map-modal-header { padding: 72px 18px 14px; }
  .map-embed-wrap {
    margin: 0 10px;
    border-radius: 20px;
    min-height: 330px;
  }
  .map-embed-wrap iframe {
    height: 46vh;
    min-height: 330px;
  }
  .map-modal-footer { padding: 16px 18px 20px; }
}

/* Correctif modale Maps desktop : affichage indépendant du comportement natif <dialog>. */
.map-modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: clamp(10px, 2.5vw, 28px);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 10000;
}
.map-modal[open],
.map-modal.is-open {
  display: grid;
  place-items: center;
}
.map-modal[open]::before,
.map-modal.is-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(24, 191, 234, 0.28), transparent 30%),
    radial-gradient(circle at 82% 86%, rgba(217, 58, 140, 0.22), transparent 28%),
    rgba(3, 13, 24, 0.76);
  backdrop-filter: blur(14px);
}
.map-modal-panel {
  width: min(100%, 1040px);
  max-height: calc(100dvh - clamp(20px, 5vw, 56px));
  overflow: auto;
  isolation: isolate;
}
.map-modal-close { cursor: pointer; }
.map-embed-wrap iframe {
  height: min(52dvh, 500px);
}
body.modal-open {
  overflow: hidden;
  touch-action: none;
}

@supports not (height: 100dvh) {
  .map-modal { height: 100vh; }
  .map-modal-panel { max-height: calc(100vh - 40px); }
}

@media (max-width: 720px) {
  .map-modal {
    padding: 8px;
    align-items: start;
  }
  .map-modal-panel {
    max-height: calc(100dvh - 16px);
  }
}
