/* ==========================================================================
   منصة ذكاء التعليمية - التصميم الأساسي والهوية البصرية السعودية
   ========================================================================== */

:root {
  /* ألوان اللوجو والهوية البصرية */
  --primary-blue: #0d47a1;
  --primary-blue-hover: #083478;
  --secondary-orange: #ff6f00;
  --secondary-orange-hover: #e65100;
  --accent-gold: #d4af37;
  --saudi-green: #006c35;
  
  /* ألوان الخلفيات والنصوص */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-alt: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-white: #ffffff;
  
  /* الظلال والحدود */
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(13, 71, 161, 0.08);
  --shadow-lg: 0 10px 25px rgba(13, 71, 161, 0.12);
  --shadow-xl: 0 20px 35px rgba(0, 0, 0, 0.15);
  
  /* الإطارات والانتقالات */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-fast: all 0.2s ease-in-out;
  --transition-normal: all 0.3s ease-in-out;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  overflow-x: hidden;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.07);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  transition: var(--transition-normal);
}

.main-header .container {
  max-width: 1360px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  gap: 0.65rem;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  perspective: 600px;
}

.brand-logo img {
  height: 50px;
  width: 50px;
  object-fit: contain;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 60%, #f1f5f9 100%);
  padding: 2.5px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 8px 18px -2px rgba(13, 71, 161, 0.28),
    0 2px 6px rgba(0, 0, 0, 0.08),
    inset 0 2px 4px rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(13, 71, 161, 0.15);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
  transform: translateZ(0);
}

.brand-logo:hover img {
  transform: translateY(-3px) rotateY(-8deg) rotateX(4deg) scale(1.08);
  box-shadow: 
    0 14px 26px -4px rgba(13, 71, 161, 0.35),
    0 4px 12px rgba(255, 111, 0, 0.25),
    inset 0 2px 4px rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(13, 71, 161, 0.2);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  font-size: 1.22rem;
  font-weight: 900;
  color: var(--primary-blue);
  line-height: 1.2;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--secondary-orange);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 1px;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-blue);
  background-color: rgba(13, 71, 161, 0.06);
}

.nav-link.active {
  color: var(--primary-blue);
  background-color: rgba(13, 71, 161, 0.08);
  font-weight: 800;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 8px;
  left: 8px;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary-orange), var(--primary-blue));
  border-radius: 4px;
}

.mobile-menu-cta {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), #1565c0);
  color: var(--text-white);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(13, 71, 161, 0.25);
  transition: var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-blue-hover), var(--primary-blue));
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(13, 71, 161, 0.35);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary-orange), #f57c00);
  color: var(--text-white);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(255, 111, 0, 0.25);
  transition: var(--transition-normal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--secondary-orange-hover), var(--secondary-orange));
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 111, 0, 0.35);
}

/* ==========================================================================
   أزرار وتنسيقات الواتساب ثلاثية الأبعاد (Green 3D WhatsApp Styles)
   ========================================================================== */

.btn-whatsapp-header,
.btn-whatsapp-action,
.btn-whatsapp-full {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  font-family: 'Cairo', 'Tajawal', sans-serif;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-whatsapp-header {
  padding: 9px 20px;
  font-size: 0.95rem;
}

.btn-whatsapp-action {
  padding: 11px 24px;
  font-size: 0.96rem;
}

.btn-whatsapp-full {
  width: 100%;
  padding: 12px 20px;
  font-size: 0.95rem;
  justify-content: center;
}

.btn-whatsapp-header:hover,
.btn-whatsapp-action:hover,
.btn-whatsapp-full:hover {
  background: linear-gradient(135deg, #20ba5a 0%, #0d7366 100%);
  transform: translateY(-2px);
  box-shadow: 0 7px 22px rgba(37, 211, 102, 0.5);
  color: #ffffff;
}

/* أيقونة الواتساب المجسمة ثلاثية الأبعاد (3D WhatsApp Badge Icon) */
.wa-icon-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #6ee7b7 0%, #25d366 45%, #065f46 100%);
  box-shadow: 0 2.5px 6px rgba(0, 0, 0, 0.28), inset 0 1px 1.5px rgba(255, 255, 255, 0.8), inset 0 -1.5px 2px rgba(0, 0, 0, 0.4);
  color: #ffffff;
  font-size: 0.88rem;
  flex-shrink: 0;
  line-height: 1;
}

.wa-icon-3d i {
  color: #ffffff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
  margin: 0;
}

.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--primary-blue);
  font-size: 1.25rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.mobile-nav-toggle:hover {
  background: rgba(13, 71, 161, 0.08);
  color: var(--primary-blue);
}

.mobile-nav-toggle.active {
  background: var(--primary-blue);
  color: #ffffff;
  border-color: var(--primary-blue);
}

.nav-backdrop {
  display: none;
}

/* ==========================================================================
   Section Headers & Common Layout
   ========================================================================== */

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-badge {
  display: inline-block;
  background-color: rgba(255, 111, 0, 0.1);
  color: var(--secondary-orange);
  font-size: 0.9rem;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  border: 1px solid rgba(255, 111, 0, 0.2);
}

.section-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--primary-blue);
  line-height: 1.3;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
}

.py-section {
  padding: 4.5rem 0;
}

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

/* ==========================================================================
   3D Footer Brand Logo Styling
   ========================================================================== */
.footer-logo-3d {
  width: 58px;
  height: 58px;
  background: radial-gradient(circle at 35% 30%, #ffffff 55%, #f1f5f9 100%);
  border-radius: 50%;
  padding: 3px;
  border: 2.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 10px 24px rgba(0, 0, 0, 0.4),
    0 0 16px rgba(255, 111, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.9),
    inset 0 -2px 5px rgba(13, 71, 161, 0.25);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: perspective(500px) translateZ(0);
  object-fit: contain;
  display: block;
}

.footer-logo-3d:hover {
  transform: perspective(500px) translateY(-3px) rotateY(-8deg) scale(1.08);
  box-shadow: 
    0 16px 32px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(255, 111, 0, 0.45),
    inset 0 2px 4px rgba(255, 255, 255, 0.95);
}
