/* ============================================
   MoonGate QA — Global Stylesheet
   Theme: White + Gold, Luxury Minimal
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;700&family=Noto+Sans:wght@300;400;500;600&family=Noto+Sans+Arabic:wght@300;400;500;600&display=swap');

/* === RESET & ROOT === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:        #B8962E;
  --gold-light:  #D4AF4A;
  --gold-pale:   #F5EDD6;
  --gold-border: #E8D5A3;
  --white:       #FFFFFF;
  --off-white:   #FAFAF7;
  --bg:          #F7F6F2;
  --text:        #1A1A1A;
  --text-mid:    #444444;
  --text-muted:  #7A7A7A;
  --border:      #E5E0D5;
  --border-dark: #CCC5B5;
  --navy:        #0D1B2A;
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.06);
  --shadow:      0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:   0 12px 40px rgba(0,0,0,0.12);
  --transition:  0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.ar { font-family: 'Noto Sans Arabic', sans-serif; }
.ar h1, .ar h2, .ar h3 { font-family: 'Noto Sans Arabic', sans-serif; }

/* === GOLD LINE DIVIDER === */
.gold-line {
  width: 48px; height: 2px;
  background: var(--gold);
  margin: 20px auto;
}
.gold-line.left { margin-left: 0; }

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 11px 28px;
  border-radius: var(--radius-sm);
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
  letter-spacing: 0.3px;
}
.btn-gold {
  background: var(--gold);
  color: var(--white);
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--white); }

.btn-dark {
  background: var(--navy);
  color: var(--gold-light);
}
.btn-dark:hover { background: #1a2e42; transform: translateY(-1px); }

/* === BADGES === */
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-gold    { background: var(--gold-pale); color: #7A5A00; }
.badge-blue    { background: #EAF3FE; color: #1A5FA8; }
.badge-green   { background: #E8F7EE; color: #1A7A42; }
.badge-orange  { background: #FFF4E0; color: #8A5A00; }
.badge-gray    { background: #F0EFE9; color: #666; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.navbar-brand .brand-gate { color: var(--gold); }
.navbar-brand .brand-dot {
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  margin: 0 2px;
}
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.navbar-nav a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.navbar-nav a:hover,
.navbar-nav a.active { color: var(--gold); background: var(--gold-pale); }

.navbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
}
.lang-toggle button {
  padding: 5px 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
  font-size: 12px;
  font-weight: 600;
}
.lang-toggle button.active {
  background: var(--gold);
  color: var(--white);
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 4px 0;
  transition: all var(--transition);
}

@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .mobile-menu-btn { display: block; }
  .navbar-inner { padding: 0 16px; }
  .navbar-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    gap: 2px;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 56px 32px 32px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--white);
  margin-bottom: 12px;
}
.footer-brand span { color: var(--gold-light); }
.footer-desc { font-size: 13px; line-height: 1.8; margin-bottom: 20px; }
.footer-desc-ar {
  font-family: 'Noto Sans Arabic', sans-serif;
  font-size: 12px;
  line-height: 1.9;
  color: rgba(255,255,255,0.45);
}
.footer-col h4 {
  font-family: 'Noto Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--gold-light); }
.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-compliance {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  line-height: 1.7;
  margin-top: 32px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer { padding: 40px 20px 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ============================================
   PAGE HERO
   ============================================ */
.page-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 64px 32px 56px;
  text-align: center;
}
.page-hero-tag {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 16px;
  display: block;
}
.page-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 6px;
}
.page-hero .subtitle-ar {
  font-family: 'Noto Sans Arabic', sans-serif;
  font-size: clamp(18px, 2.5vw, 26px);
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 20px;
  display: block;
}
.page-hero p {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* ============================================
   FORMS
   ============================================ */
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--off-white);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--gold);
  background: var(--white);
}
.form-field textarea { resize: vertical; min-height: 90px; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,15,25,0.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 36px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--border); }

/* ============================================
   LOADING
   ============================================ */
.loading-dots { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin: 0 3px;
  animation: dotBounce 1s infinite;
}
.dot:nth-child(2) { animation-delay: 0.15s; }
.dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-10px); opacity: 1; }
}

/* ============================================
   UTILITY
   ============================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.section { padding: 64px 0; }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 24px; }

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: 1fr; }
  .page-hero { padding: 40px 16px 36px; }
}
