:root {
  --gold: #C49F60;
  --gold-soft: #BE9561;
  --white: #ffffff;
  --black: #0F0F0F;
  --overlay: rgba(0, 0, 0, 0.55);
  --font-body: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-label: 'Alexandria', 'Cairo', system-ui, sans-serif;
  --font-form: 'Tajawal', 'Cairo', system-ui, sans-serif;
  --font-serif: 'Cinzel', 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--white);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  user-select: none;
  pointer-events: none;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.25) 40%, rgba(0,0,0,0.55) 100%);
  z-index: 1;
}

/* ---------- Top bar (language switcher) ---------- */
.top-bar {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  padding: 28px 40px 0;
}

body[dir="rtl"] .top-bar {
  justify-content: flex-end;
}

.lang-dropdown {
  position: relative;
  display: inline-block;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  min-height: 39px;
  line-height: 1;
}

.lang-switch:hover { background: #b08d52; }
.lang-switch:active { transform: scale(0.97); }

.lang-switch .caret {
  color: var(--white);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.lang-dropdown.is-open .lang-switch .caret {
  transform: rotate(180deg);
}

.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.lang-flag img, .lang-flag svg { display: block; width: 14px; height: 14px; }

/* Show only the active flag */
.lang-flag [data-flag] { display: none; }
body[dir="rtl"] .lang-flag [data-flag="ar"] { display: inline-flex; }
body[dir="ltr"] .lang-flag [data-flag="en"] { display: inline-flex; }

.lang-current { line-height: 1; }

/* Dropdown menu */
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(196, 159, 96, 0.4);
  border-radius: 10px;
  min-width: 178px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 5;
}

.lang-dropdown.is-open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-menu-header {
  padding: 8px 12px 6px;
  font-size: 12px;
  color: rgba(196, 159, 96, 0.85);
  font-weight: 500;
  border-bottom: 1px solid rgba(196, 159, 96, 0.2);
  margin-bottom: 4px;
}

body[dir="rtl"] .lang-menu-header { text-align: right; }
body[dir="ltr"] .lang-menu-header { text-align: left; }

.lang-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: inherit;
  transition: background 0.15s ease;
}

.lang-menu-item:hover { background: rgba(196, 159, 96, 0.18); }
.lang-menu-item.is-active { background: rgba(196, 159, 96, 0.28); color: var(--gold); }
.lang-menu-item img, .lang-menu-item svg { flex-shrink: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 80px;
  gap: 26px;
}

.logo-wrap {
  display: flex;
  justify-content: center;
}

.logo {
  width: clamp(220px, 28vw, 353px);
  height: auto;
  display: block;
}

.headline {
  margin: 8px 0 0;
  color: var(--gold);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
}

body[dir="rtl"] .headline {
  font-family: var(--font-body);
  font-size: clamp(72px, 11vw, 128px);
  font-weight: 400;
  line-height: 1;
}

body[dir="ltr"] .headline {
  font-family: var(--font-serif);
  font-size: clamp(56px, 8vw, 96px);
  letter-spacing: 0.04em;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(423px, 80vw);
  margin-top: 4px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--gold);
  opacity: 0.9;
}

.divider-diamond {
  width: 12px;
  height: 12px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.tagline {
  max-width: 880px;
  margin: 0;
  font-size: clamp(15px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--white);
  font-weight: 400;
  padding: 0 12px;
}

body[dir="ltr"] .tagline {
  font-style: italic;
  line-height: 1.45;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 3;
  background: var(--black);
  padding: 18px 0;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 28px;
  direction: ltr;
}

.footer-inner > * { direction: ltr; }
body[dir="rtl"] .footer-inner > * { direction: rtl; }

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-label {
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.02em;
  font-weight: 400;
}

/* Social column */
.footer-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(196, 159, 96, 0.55);
  border-radius: 50%;
  color: var(--gold);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.social-link:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

/* Contact column */
.footer-email {
  font-family: var(--font-label);
  font-size: 16px;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
  line-height: 1.4;
}

.footer-email:hover { color: var(--white); }

/* Copyright (center) */
.footer-copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--white);
  text-align: center;
}

/* Subscribe column */
.footer-subscribe-col { min-width: 320px; }

.subscribe-form {
  display: flex;
  align-items: stretch;
  gap: 0;
  height: 42px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(196, 159, 96, 0.35);
}

.subscribe-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-family: var(--font-form);
  font-size: 14px;
  padding: 0 14px;
  min-width: 0;
}

.subscribe-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.subscribe-input:focus { background: rgba(255,255,255,0.05); }

.subscribe-btn {
  background: var(--gold-soft);
  color: #000;
  border: none;
  font-family: var(--font-form);
  font-weight: 700;
  font-size: 14px;
  padding: 0 22px;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.subscribe-btn:hover { background: #cdac74; }
.subscribe-btn:active { transform: scale(0.98); }
.subscribe-btn.is-success { background: #2e7d4f; color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 20px 32px;
    padding: 0 24px;
  }
  .footer-copy { grid-column: 1 / -1; order: 3; }
  .footer-subscribe-col { min-width: 0; }
}

@media (max-width: 720px) {
  .top-bar { padding: 20px 20px 0; }
  .hero { padding: 30px 20px 60px; gap: 20px; }
  .footer { padding: 24px 0; }
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 0 20px;
    gap: 18px;
  }
  .footer-col { align-items: center; }
  .footer-social { justify-content: center; }
  .footer-subscribe-col { width: 100%; max-width: 360px; }
  .subscribe-form { width: 100%; }
}

@media (max-width: 420px) {
  body[dir="rtl"] .headline { font-size: 64px; }
  body[dir="ltr"] .headline { font-size: 48px; }
  .tagline { font-size: 14px; }
  .lang-switch { font-size: 14px; padding: 7px 14px; min-height: 36px; }
}

/* Small motion preference */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
