/* ===================================================
   YASARI TRADING CO., LTD — MAIN CSS DESIGN SYSTEM
   Developed by: Mostafa Rasem — Nabel Advertising
   =================================================== */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+SC:wght@300;400;500;700;900&display=swap');

/* ─── CSS Variables / Design Tokens ─── */
:root {
  /* Brand Colors */
  --yasari-red:          #E31E24;
  --yasari-red-dark:     #C01519;
  --yasari-red-light:    #FF3B41;
  --yasari-red-glow:     rgba(227, 30, 36, 0.25);

  --corporate-blue:      #1B3A6B;
  --corporate-blue-mid:  #2952A0;
  --corporate-blue-light:#3D6DB5;
  --corporate-blue-glow: rgba(27, 58, 107, 0.3);

  /* Light Theme */
  --bg-primary:          #FFFFFF;
  --bg-secondary:        #F4F7FC;
  --bg-tertiary:         #EDF1F9;
  --surface:             #FFFFFF;
  --surface-elevated:    #FFFFFF;
  --border:              rgba(27, 58, 107, 0.12);
  --border-light:        rgba(27, 58, 107, 0.06);

  --text-primary:        #0F1B30;
  --text-secondary:      #3D5070;
  --text-muted:          #6B7FA3;
  --text-inverse:        #FFFFFF;

  --shadow-sm:   0 2px 8px rgba(27, 58, 107, 0.08);
  --shadow-md:   0 4px 20px rgba(27, 58, 107, 0.12);
  --shadow-lg:   0 8px 40px rgba(27, 58, 107, 0.16);
  --shadow-xl:   0 20px 60px rgba(27, 58, 107, 0.2);

  /* Navbar */
  --nav-bg:              rgba(255,255,255,0.95);
  --nav-border:          rgba(27, 58, 107, 0.1);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-2xl: 40px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow:   0.5s ease;
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-ar: 'Noto Kufi Arabic', 'Segoe UI', Arial, sans-serif;
  --font-en: 'Inter', 'Segoe UI', Arial, sans-serif;
  --font-zh: 'Noto Sans SC', 'PingFang SC', Arial, sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;
  --text-6xl:  3.75rem;
  --text-7xl:  4.5rem;

  /* Z-index */
  --z-base: 1;
  --z-dropdown: 100;
  --z-navbar: 1000;
  --z-overlay: 2000;
  --z-modal: 3000;
}

/* ─── Dark Theme ─── */
[data-theme="dark"] {
  --bg-primary:          #0D1B2E;
  --bg-secondary:        #111E33;
  --bg-tertiary:         #162640;
  --surface:             #162640;
  --surface-elevated:    #1D3050;
  --border:              rgba(61, 109, 181, 0.2);
  --border-light:        rgba(61, 109, 181, 0.1);

  --text-primary:        #E8EEF9;
  --text-secondary:      #9AAFCC;
  --text-muted:          #5A7499;
  --text-inverse:        #FFFFFF;

  --shadow-sm:   0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md:   0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg:   0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-xl:   0 20px 60px rgba(0, 0, 0, 0.6);

  --nav-bg:      rgba(13, 27, 46, 0.95);
  --nav-border:  rgba(61, 109, 181, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-en);
  line-height: 1.6;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  overflow-x: hidden;
}

/* Arabic language direction */
body[dir="rtl"], [dir="rtl"] {
  font-family: var(--font-ar);
}

body[lang="zh"], [lang="zh"] {
  font-family: var(--font-zh);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--corporate-blue-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--corporate-blue-mid); }

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-primary);
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { font-family: var(--font-ar); }

p { color: var(--text-secondary); line-height: 1.8; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ─── Phone Numbers LTR BiDi Fix ─── */
a[href^="tel:"],
.phone-number {
  direction: ltr !important;
  unicode-bidi: embed !important;
  display: inline-block !important;
}

/* ─── RTL Steps Arrow Flip ─── */
[dir="rtl"] .step-arrow {
  transform: scaleX(-1) !important;
  display: inline-block !important;
}

/* ─── Mobile Visibility Helpers ─── */
@media (max-width: 768px) {
  .mobile-hide {
    display: none !important;
  }
}


/* ─── Container ─── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-lg {
  max-width: 1440px;
}

/* ─── Section Padding ─── */
.section {
  padding: var(--space-24) 0;
}
.section-sm { padding: var(--space-16) 0; }
.section-lg { padding: calc(var(--space-24) * 1.5) 0; }

/* ─── Section Header ─── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}
[dir="rtl"] .section-header { text-align: center; }

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, var(--yasari-red-glow), rgba(27,58,107,0.08));
  border: 1px solid var(--yasari-red-glow);
  color: var(--yasari-red);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  line-height: 1.15;
}

.section-title span.highlight {
  background: linear-gradient(135deg, var(--yasari-red), var(--yasari-red-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title span.blue-highlight {
  background: linear-gradient(135deg, var(--corporate-blue), var(--corporate-blue-mid));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-bounce);
  white-space: nowrap;
  text-decoration: none;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--yasari-red), var(--yasari-red-light));
  color: #fff;
  box-shadow: 0 4px 20px var(--yasari-red-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--yasari-red-glow);
  filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  border-color: var(--corporate-blue-light);
  color: var(--corporate-blue-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-white {
  background: #fff;
  color: var(--corporate-blue);
  font-weight: 700;
}
.btn-white:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.8);
  transform: translateY(-2px);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}
.btn-icon { padding: var(--space-3); }

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--corporate-blue-light);
}

.card-body { padding: var(--space-8); }

/* ─── Grid ─── */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

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

/* ─── Flex utilities ─── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ─── Text Utilities ─── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-muted { color: var(--text-muted); }
.text-red { color: var(--yasari-red); }
.text-blue { color: var(--corporate-blue-mid); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* ─── Divider ─── */
.divider {
  width: 60px;
  height: 4px;
  border-radius: var(--radius-full);
  margin: var(--space-4) auto;
}
.divider-red { background: linear-gradient(90deg, var(--yasari-red), var(--yasari-red-light)); }
.divider-blue { background: linear-gradient(90deg, var(--corporate-blue), var(--corporate-blue-mid)); }
[dir="rtl"] .divider { margin: var(--space-4) 0; }

/* ─── Badge ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-red { background: var(--yasari-red-glow); color: var(--yasari-red); border: 1px solid var(--yasari-red); }
.badge-blue { background: var(--corporate-blue-glow); color: var(--corporate-blue-mid); border: 1px solid rgba(41,82,160,0.3); }
.badge-warning { background: rgba(245,158,11,0.1); color: #F59E0B; border: 1px solid rgba(245,158,11,0.3); }
.badge-success { background: rgba(16,185,129,0.1); color: #10B981; border: 1px solid rgba(16,185,129,0.3); }

/* ─── Gradient Backgrounds ─── */
.bg-blue-gradient {
  background: linear-gradient(135deg, var(--corporate-blue) 0%, var(--corporate-blue-mid) 100%);
}
.bg-hero {
  background: linear-gradient(135deg, var(--corporate-blue) 0%, #243E7A 40%, var(--corporate-blue-mid) 100%);
  position: relative;
  overflow: hidden;
}
.bg-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' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.bg-red-gradient {
  background: linear-gradient(135deg, var(--yasari-red) 0%, var(--yasari-red-light) 100%);
}

.bg-secondary { background-color: var(--bg-secondary); }
.bg-surface { background-color: var(--surface); }

/* ─── Page Hero (inner pages) ─── */
.page-hero {
  background: linear-gradient(135deg, var(--corporate-blue) 0%, var(--corporate-blue-mid) 100%);
  padding: 140px 0 80px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(227,30,36,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero .page-hero-content { position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl)); color: #fff; margin-bottom: var(--space-4); }
.page-hero p { color: rgba(255,255,255,0.8); font-size: var(--text-xl); max-width: 700px; }
[dir="rtl"] .page-hero p { max-width: 100%; }

/* ─── Form Styles ─── */
.form-group {
  margin-bottom: var(--space-5);
}
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.form-label span.required { color: var(--yasari-red); margin-inline-start: 4px; }

.form-control {
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  font-family: inherit;
  transition: all var(--transition-normal);
  outline: none;
}
.form-control:focus {
  border-color: var(--corporate-blue-light);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--corporate-blue-glow);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control.error { border-color: var(--yasari-red); box-shadow: 0 0 0 4px var(--yasari-red-glow); }

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

/* ─── Loader / Spinner ─── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Alert ─── */
.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.alert-success { background: rgba(16,185,129,0.1); color: #10B981; border: 1px solid rgba(16,185,129,0.3); }
.alert-error   { background: var(--yasari-red-glow); color: var(--yasari-red); border: 1px solid rgba(227,30,36,0.3); }

/* ─── Social Icons ─── */
.social-links { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.social-link {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: #fff;
  transition: all var(--transition-bounce);
  font-size: 1.1rem;
  text-decoration: none;
}
.social-link:hover { transform: translateY(-3px) scale(1.05); filter: brightness(1.1); }
.social-link.instagram { background: linear-gradient(135deg, #E1306C, #833AB4); }
.social-link.youtube   { background: #FF0000; }
.social-link.facebook  { background: #1877F2; }
.social-link.whatsapp  { background: #25D366; }
.social-link.x-twitter { background: #000000; }
.social-link.tiktok    { background: linear-gradient(135deg, #69C9D0, #EE1D52, #010101); }

/* ─── RTL Adjustments ─── */
[dir="rtl"] .flex { flex-direction: row-reverse; }
[dir="rtl"] .flex.no-reverse { flex-direction: row; }
[dir="rtl"] .social-links { flex-direction: row; }
[dir="rtl"] .section-header { text-align: center; }
[dir="rtl"] .divider { margin-left: 0; margin-right: 0; margin: var(--space-4) auto; }
[dir="rtl"] .page-hero p { margin-right: 0; margin-left: auto; }

/* ─── Animations (base) ─── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.fade-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}
.fade-in {
  opacity: 0;
  transition: opacity 0.8s ease;
}
.fade-in.visible { opacity: 1; }

/* Stagger children */
.stagger-children > * { transition-delay: calc(var(--stagger-delay, 0.1s) * var(--i, 0)); }
.stagger-children > *:nth-child(1) { --i: 1; }
.stagger-children > *:nth-child(2) { --i: 2; }
.stagger-children > *:nth-child(3) { --i: 3; }
.stagger-children > *:nth-child(4) { --i: 4; }
.stagger-children > *:nth-child(5) { --i: 5; }
.stagger-children > *:nth-child(6) { --i: 6; }

/* ─── Pulse animation for "Under Review" badge ─── */
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
  70% { box-shadow: 0 0 0 10px rgba(245,158,11,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
}
.pulse { animation: pulse-ring 2s ease-in-out infinite; }

/* ─── Floating animation ─── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.float { animation: float 4s ease-in-out infinite; }

/* ─── Shimmer effect ─── */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ─── Counter animation ─── */
.counter-number {
  font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--yasari-red), var(--yasari-red-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .btn-lg { padding: var(--space-3) var(--space-6); font-size: var(--text-base); }
  .page-hero { padding: 120px 0 60px; }
}
@media (min-width: 769px) {
  .show-mobile { display: none !important; }
}

/* ─── Selection ─── */
::selection { background: var(--yasari-red); color: #fff; }
