﻿/* ============================================================
   SMAB — Global Design System
   ============================================================ */

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

:root {
  /* Brand Colors */
  --primary:      #0A1B5E;
  --primary-dk:   #071347;
  --primary-lt:   rgba(10,27,94,0.08);
  --primary-glow: rgba(10,27,94,0.22);

  /* Dark Palette */
  --dark-1:  #040B2A;
  --dark-2:  #071347;
  --dark-3:  #0A1B5E;

  /* Accent */
  --accent-gold:    #D4A017;
  --accent-gold-lt: #F2C14E;
  --accent-gold-dk: #A87C10;
  --accent-gold-glow: rgba(212,160,23,0.3);

  /*  Alert Red (small use only)  */
  --red:     #B22222;
  --red-dk:  #8B1E1E;

  /* Typography */
  --font-head: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Open Sans', 'Segoe UI', Arial, sans-serif;

  /* Spacing */
  --nav-h:    90px;
  --nav-h-sm: 65px;
  --topbar-h: 38px;

  /* Effects */
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow:    0 4px 16px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.16);

  --transition:      0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Backgrounds */
  --bg-main:      #F8F9FA;
  --bg-secondary: #F1F3F5;
  --bg-card:      #FFFFFF;
  --bg-footer:    #040B2A;

  /* Grays */
  --gray-50:  #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #6B7280;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Semantic */
  --white:      #FFFFFF;
  --text:       #111827;
  --text-light: #6B7280;
  --text-muted: #9CA3AF;
  --success:    #16A34A;
  --warning:    #F59E0B;
  --danger:     #B22222;
  --info:       #2563EB;

}

/* ---------- Base ---------- */
html, body {
  overflow-x: hidden !important;
  max-width: 100%;
  width: 100%;
  position: relative;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-main);
  line-height: 1.6;
}

@keyframes goldShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes goldPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(212,160,23,0.3); }
  50%       { box-shadow: 0 4px 32px rgba(212,160,23,0.6); }
}

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

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.15;
  font-weight: 700;
  color: var(--dark-1);
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }
h5 { font-size: 0.95rem; }
h6 { font-size: 0.85rem; }

p { line-height: 1.7; }

.text-primary { color: var(--primary); }
.text-light { color: var(--text-light); }
.text-white { color: var(--white); }
.text-center { text-align: center; }

/* ---------- Layout ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-sm { max-width: 960px; margin: 0 auto; padding: 0 2rem; }
.container-lg { max-width: 1440px; margin: 0 auto; padding: 0 2rem; }

section { padding: 5rem 0; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-xs { gap: 0.5rem; }
.gap-sm { gap: 0.75rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }
.gap-xl { gap: 2rem; }
.gap-2xl { gap: 3rem; }

/* ---------- Section Headers ---------- */
.section-header { text-align: center; margin-bottom: 3.5rem; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.9rem;
}
.section-tag::before,
.section-tag::after {
  content: '';
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold-dk), var(--accent-gold-lt));
  border-radius: 1px;
  opacity: 0.8;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--dark-1);
  line-height: 1.2;
  margin-bottom: 0.9rem;
}
.section-title span { color: var(--accent-gold); }

.section-sub {
  font-size: 0.95rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold-dk) 0%, var(--accent-gold-lt) 50%, var(--accent-gold-dk) 100%);
  border-radius: 2px;
  margin: 1.2rem auto 0;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.82rem;
  color: var(--text-light);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}
.breadcrumb a {
  color: var(--text-light);
  transition: color var(--transition);
}
.breadcrumb a:hover { color: var(--accent-gold); }
.breadcrumb .separator {
  margin: 0 0.5rem;
  color: var(--gray-400);
}
.breadcrumb .current {
  color: var(--accent-gold);
  font-weight: 600;
}

/* ---------- Page Hero Banner ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--dark-1) 0%, var(--dark-3) 100%);
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--white);
  margin-bottom: 0.75rem;
}
.page-hero-title span { color: var(--accent-gold); }
.page-hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  line-height: 1.7;
}
.page-hero .breadcrumb { margin-bottom: 1rem; }
.page-hero .breadcrumb,
.page-hero .breadcrumb a { color: rgba(255,255,255,0.5); }
.page-hero .breadcrumb .current { color: var(--accent-gold); }
.page-hero .breadcrumb a:hover { color: var(--white); }

/* ---------- Animations / Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.revealed { opacity: 1; transform: none; }

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-left.revealed { opacity: 1; transform: none; }

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-right.revealed { opacity: 1; transform: none; }

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-scale.revealed { opacity: 1; transform: none; }

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ---------- RTL Support (Arabic) ---------- */
[dir="rtl"] {
  text-align: right;
}
[dir="rtl"] .section-tag::before { order: 2; }
[dir="rtl"] .section-tag::after { order: 0; }

[dir="rtl"] .breadcrumb .separator {
  transform: scaleX(-1);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
  section { padding: 4rem 0; }
}

@media (max-width: 640px) {
  :root { --nav-h: var(--nav-h-sm); }
  section { padding: 3rem 0; }
  .container { padding: 0 1.25rem; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .section-header { margin-bottom: 2.5rem; }
}

@media (max-width: 400px) {
  .grid-6 { grid-template-columns: 1fr; }
}

/* ---------- Page Loader ---------- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--dark-1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-logo {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 2.5rem;
  color: var(--white);
  letter-spacing: 0.05em;
}
.loader-logo span { color: var(--primary); }

.loader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold-dk), var(--accent-gold-lt), var(--accent-gold-dk));
  background-size: 200% auto;
  border-radius: 2px;
  animation: loaderFill 0.8s ease forwards, goldShimmer 1.5s linear infinite;
}
@keyframes loaderFill {
  0% { width: 0; }
  100% { width: 100%; }
}

/* ---------- Selection ---------- */
::selection {
  background: var(--primary);
  color: var(--white);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--gray-600); }

/* ---------- View Transitions (Native MPA Morphing) ---------- */
@view-transition {
  navigation: auto;
}

/* Custom premium transitions configurations */
::view-transition-group(*) {
  animation-duration: 0.55s;
  animation-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Disable scroll reveal animations on mobile viewports for instant loading & zero empty spaces */
@media (max-width: 768px) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


