/* MOGADOOR premium static website
   Main design system and component styles. */

:root {
  --navy: #071A2D;
  --sand: #E8D8BD;
  --gold: #C6A15B;
  --white: #FAF7F0;
  --terracotta: #B96845;
  --olive: #4F5E45;
  --charcoal: #171717;
  --muted: #6f6a60;
  --line: rgba(7, 26, 45, 0.12);
  --shadow: 0 24px 70px rgba(7, 26, 45, 0.14);
  --radius: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--charcoal);
  background: var(--white);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
.brand-mark {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.05;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.9rem);
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 4.2rem);
}

h3 {
  margin: 0;
  font-size: 1.45rem;
}

p {
  margin: 0;
}

.lead {
  max-width: 710px;
  color: var(--muted);
  font-size: 1.08rem;
}

.section {
  padding: 96px 0;
}

.section.alt {
  background: #f4ecdd;
}

.section.dark {
  color: var(--white);
  background: var(--navy);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.55fr);
  gap: 36px;
  align-items: end;
  margin-bottom: 42px;
}

.section-head.center {
  display: block;
  max-width: 780px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-head.center .lead {
  margin: 18px auto 0;
}

.gold-line {
  width: 70px;
  height: 2px;
  margin-top: 18px;
  background: var(--gold);
}

.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border 180ms ease, color 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--navy);
  background: var(--gold);
}

.btn-dark {
  color: var(--white);
  background: var(--navy);
}

.btn-light {
  color: var(--navy);
  background: var(--white);
}

.btn-outline {
  color: var(--white);
  border-color: rgba(250, 247, 240, 0.65);
  background: transparent;
}

.btn-outline-dark {
  color: var(--navy);
  border-color: rgba(7, 26, 45, 0.2);
  background: transparent;
}

.header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  color: var(--white);
  transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.header.scrolled,
.header.inner {
  color: var(--navy);
  background: rgba(250, 247, 240, 0.95);
  box-shadow: 0 10px 34px rgba(7, 26, 45, 0.09);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--navy);
  border-radius: 50%;
  background: var(--gold);
  font-size: 1.1rem;
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 1.03rem;
  letter-spacing: 0.13em;
}

.brand-text span {
  color: currentColor;
  opacity: 0.75;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.93rem;
  font-weight: 700;
}

.nav-links a {
  position: relative;
  opacity: 0.86;
}

.nav-links a.active,
.nav-links a:hover {
  opacity: 1;
}

.nav-links a.active::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--gold);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-switcher {
  color: currentColor;
  font-size: 0.83rem;
  font-weight: 800;
  opacity: 0.85;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(198, 161, 91, 0.5);
  border-radius: 50%;
  color: currentColor;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: end;
  color: var(--white);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 26, 45, 0.92), rgba(7, 26, 45, 0.54), rgba(7, 26, 45, 0.2)),
    url("../assets/images/hero-essaouira.jpg") center/cover;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  height: 210px;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(7, 26, 45, 0.92));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 890px;
  padding: 170px 0 112px;
}

.hero p {
  max-width: 690px;
  margin-top: 24px;
  color: rgba(250, 247, 240, 0.86);
  font-size: clamp(1.06rem, 2vw, 1.35rem);
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.trust-bar {
  position: relative;
  z-index: 3;
  margin-top: -38px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.trust-item {
  padding: 26px 24px;
  border-right: 1px solid var(--line);
  color: var(--navy);
  font-weight: 850;
}

.trust-item:last-child {
  border-right: 0;
}

.trust-item span,
.metric span {
  display: block;
  color: var(--gold);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1;
}

.intro-grid,
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(320px, 0.55fr);
  gap: 54px;
  align-items: center;
}

.editorial-panel {
  padding: 34px;
  border: 1px solid rgba(198, 161, 91, 0.32);
  border-radius: var(--radius);
  background: #fffaf0;
  box-shadow: var(--shadow);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.metric {
  padding: 18px;
  border-radius: 14px;
  background: rgba(232, 216, 189, 0.45);
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.property-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffbf4;
  box-shadow: 0 16px 42px rgba(7, 26, 45, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.property-image {
  position: relative;
  aspect-ratio: 1.34 / 1;
  overflow: hidden;
  background: var(--sand);
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--navy);
  background: rgba(250, 247, 240, 0.92);
  font-size: 0.74rem;
  font-weight: 900;
}

.property-body {
  padding: 22px;
}

.price {
  color: var(--terracotta);
  font-size: 1.05rem;
  font-weight: 900;
}

.property-body h3 {
  margin-top: 8px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--navy);
  font-weight: 900;
}

.service-grid,
.values-grid,
.testimonial-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card,
.value-card,
.testimonial,
.feature-card,
.step-card {
  border: 1px solid rgba(7, 26, 45, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 251, 244, 0.76);
}

.service-card,
.value-card,
.feature-card {
  padding: 26px;
}

.service-card span,
.value-card span,
.feature-card span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: var(--gold);
  font-weight: 900;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.step-card {
  padding: 22px 18px;
  background: rgba(250, 247, 240, 0.08);
  border-color: rgba(250, 247, 240, 0.14);
}

.step-card strong {
  color: var(--gold);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.7rem;
}

.step-card p {
  margin-top: 12px;
  color: rgba(250, 247, 240, 0.86);
  font-weight: 750;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.check-list li {
  padding: 15px 16px;
  border: 1px solid rgba(198, 161, 91, 0.32);
  border-radius: 14px;
  background: rgba(250, 247, 240, 0.08);
  font-weight: 750;
}

.check-list li::before {
  content: "✓";
  margin-right: 9px;
  color: var(--gold);
}

.testimonial {
  padding: 28px;
}

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

.testimonial strong {
  display: block;
  margin-top: 22px;
  color: var(--navy);
}

.cta-band {
  padding: 74px 0;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(7, 26, 45, 0.96), rgba(7, 26, 45, 0.78)),
    url("../assets/images/hero-essaouira.jpg") center/cover;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.page-hero {
  padding: 154px 0 76px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(7, 26, 45, 0.95), rgba(7, 26, 45, 0.66)),
    url("../assets/images/hero-essaouira.jpg") center/cover;
}

.page-hero .lead {
  margin-top: 18px;
  color: rgba(250, 247, 240, 0.82);
}

.filters {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr) auto;
  gap: 12px;
  padding: 18px;
  margin-top: -38px;
  border-radius: var(--radius);
  background: #fffbf4;
  box-shadow: var(--shadow);
}

.filters input,
.filters select,
.form input,
.form select,
.form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(7, 26, 45, 0.16);
  border-radius: 12px;
  color: var(--navy);
  background: var(--white);
}

.sort-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.gallery {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
}

.gallery img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  border-radius: var(--radius);
  object-fit: cover;
}

.gallery-side {
  display: grid;
  gap: 16px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 40px;
  align-items: start;
}

.detail-panel,
.contact-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffbf4;
  box-shadow: 0 18px 50px rgba(7, 26, 45, 0.08);
}

.contact-card {
  position: sticky;
  top: 104px;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 26px 0;
}

.detail-stats div {
  padding: 16px;
  border-radius: 14px;
  background: rgba(232, 216, 189, 0.5);
}

.detail-stats strong {
  display: block;
  color: var(--navy);
}

.form {
  display: grid;
  gap: 12px;
}

.form textarea {
  min-height: 132px;
  resize: vertical;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 36px;
  align-items: start;
}

.map-placeholder {
  display: grid;
  min-height: 320px;
  place-items: center;
  border-radius: var(--radius);
  color: var(--navy);
  background:
    linear-gradient(135deg, rgba(232, 216, 189, 0.8), rgba(198, 161, 91, 0.24)),
    url("../assets/images/map-essaouira.svg") center/cover;
  font-weight: 900;
}

.faq {
  display: grid;
  gap: 14px;
}

.faq details {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffbf4;
}

.faq summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 900;
}

.footer {
  padding: 56px 0 24px;
  color: rgba(250, 247, 240, 0.82);
  background: var(--charcoal);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, 1fr);
  gap: 34px;
}

.footer h3,
.footer h4 {
  color: var(--white);
}

.footer a {
  display: block;
  margin-top: 10px;
  color: rgba(250, 247, 240, 0.74);
}

.footer-bottom {
  padding-top: 24px;
  margin-top: 34px;
  border-top: 1px solid rgba(250, 247, 240, 0.12);
  color: rgba(250, 247, 240, 0.58);
  font-size: 0.88rem;
}

.whatsapp-float,
.back-to-top {
  position: fixed;
  z-index: 45;
  right: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 14px 38px rgba(7, 26, 45, 0.22);
}

.whatsapp-float {
  bottom: 86px;
  width: 58px;
  height: 58px;
  color: var(--navy);
  background: var(--gold);
  font-weight: 950;
}

.back-to-top {
  bottom: 22px;
  width: 46px;
  height: 46px;
  border: 0;
  color: var(--white);
  background: var(--navy);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 650ms ease, transform 650ms ease;
}

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

.hidden {
  display: none !important;
}
