/* ==========================================================================
   منصة صاد التعليمية - Saad Educational Platform
   Design System & Landing Page Stylesheet (SaaS EdTech Theme)
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Brand Palette */
  --primary-gold: #C9A227;
  --primary-gold-hover: #b38e1f;
  --primary-gold-light: rgba(201, 162, 39, 0.12);
  --dark-navy: #1F2A44;
  --dark-navy-surface: #172035;
  --dark-navy-light: #2A3859;
  --bg-white: #FFFFFF;
  --bg-light: #F8F9FA;
  --text-dark: #222222;
  --text-muted: #64748B;
  --text-light-muted: #94A3B8;

  /* Typography */
  --font-headline: 'Alexandria', 'Cairo', sans-serif;
  --font-body: 'Cairo', sans-serif;

  /* Geometry & Spacing */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* Elevation & Shadows */
  --shadow-sm: 0 4px 12px rgba(31, 42, 68, 0.04);
  --shadow-md: 0 10px 30px rgba(31, 42, 68, 0.08);
  --shadow-lg: 0 20px 40px rgba(31, 42, 68, 0.12);
  --shadow-gold: 0 10px 25px rgba(201, 162, 39, 0.3);

  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- Global Reset & Base Typography --- */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-headline {
  font-family: var(--font-headline);
  font-weight: 700;
  color: var(--dark-navy);
  letter-spacing: -0.02em;
}

/* --- Scroll Progress Bar --- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-gold) 0%, #E6C657 100%);
  z-index: 1060;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* --- Glassmorphism Utilities --- */
.glass-card {
    background: rgb(4, 3, 49);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.glass-card-dark {
  background: rgba(31, 42, 68, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  color: #FFFFFF;
}

/* --- Custom Navbar --- */
.saad-navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1050;
  padding: 0.85rem 0;
  transition: var(--transition-normal);
  background: rgba(31, 42, 68, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.saad-navbar.scrolled {
  padding: 0.65rem 0;
  background: rgba(23, 32, 53, 0.98) !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.saad-navbar .navbar-brand {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 1.45rem;
  color: #FFFFFF !important;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.saad-navbar .brand-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary-gold) 0%, #E6C657 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-navy);
  font-size: 1.35rem;
  box-shadow: var(--shadow-gold);
}

.saad-navbar .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 600;
  font-size: 0.60rem;
  padding: 0.6rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  text-decoration: none;
}

.saad-navbar .nav-link:hover,
.saad-navbar .nav-link.active {
  color: var(--primary-gold) !important;
  background: rgba(255, 255, 255, 0.06);
}

/* --- Buttons --- */
.btn-saad-primary {
  background: linear-gradient(135deg, var(--primary-gold) 0%, #D4AC2B 100%);
  color: var(--dark-navy) !important;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius-pill);
  border: none;
  box-shadow: var(--shadow-gold);
  transition: var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
}

.btn-saad-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(201, 162, 39, 0.45);
  background: linear-gradient(135deg, #D4AC2B 0%, #b38e1f 100%);
  color: var(--dark-navy) !important;
}

.btn-saad-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius-pill);
  transition: var(--transition-normal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  backdrop-filter: blur(8px);
  text-decoration: none;
}

.btn-saad-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.btn-saad-outline-dark {
  background: transparent;
  color: var(--dark-navy) !important;
  border: 2px solid var(--dark-navy);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.7rem 1.7rem;
  border-radius: var(--radius-pill);
  transition: var(--transition-normal);
  text-decoration: none;
}

.btn-saad-outline-dark:hover {
  background: var(--dark-navy);
  color: #FFFFFF !important;
  transform: translateY(-2px);
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  background: radial-gradient(circle at 80% 20%, #2A3859 0%, var(--dark-navy) 60%, #151C2E 100%);
  padding: 10rem 0 7rem;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #FFFFFF;
}

.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.15) 0%, rgba(201, 162, 39, 0) 70%);
  top: 10%;
  right: -100px;
  border-radius: 50%;
  pointer-events: none;
}

.hero-glow-secondary {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0) 70%);
  bottom: -150px;
  left: -150px;
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(201, 162, 39, 0.15);
  border: 1px solid rgba(201, 162, 39, 0.4);
  color: #F3E086;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.hero-headline {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 1.25;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
}

.hero-headline span.gold-text {
  background: linear-gradient(135deg, #F5D77F 0%, var(--primary-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: rgba(255, 255, 255, 0.75);
  max-width: 600px;
  margin-bottom: 2.2rem;
  line-height: 1.8;
}

/* Laptop SaaS Mockup Container */
.laptop-mockup-wrapper {
  position: relative;
  perspective: 1000px;
  margin: 0 auto;
}

.laptop-frame {
  background: #0f172a;
  border-radius: 20px 20px 4px 4px;
  padding: 12px 12px 0 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
}

.laptop-screen {
  background: #172035;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  aspect-ratio: 16 / 10;
}

.laptop-base {
  height: 16px;
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  border-radius: 0 0 20px 20px;
  position: relative;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.laptop-base::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 5px;
  background: #475569;
  border-radius: 0 0 4px 4px;
}

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

.section-tag {
  display: inline-block;
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary-gold);
  background: var(--primary-gold-light);
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  font-weight: 800;
  color: var(--dark-navy);
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto;
}

/* --- Statistics Section --- */
.stats-section {
  margin-top: -4rem;
  position: relative;
  z-index: 20;
}

.stat-card-saad {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(31, 42, 68, 0.06);
  transition: var(--transition-normal);
}

.stat-card-saad:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 162, 39, 0.3);
}

.stat-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-gold-light);
  color: var(--primary-gold);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1.25rem;
}

.stat-number {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 2.5rem;
  color: var(--dark-navy);
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

/* --- Why Saad Cards --- */
.why-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(31, 42, 68, 0.05);
  transition: var(--transition-normal);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.why-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 0%;
  background: var(--primary-gold);
  transition: var(--transition-normal);
}

.why-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.why-card:hover::before {
  height: 100%;
}

.why-icon {
  width: 60px;
  height: 60px;
  background: var(--bg-light);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--dark-navy);
  margin-bottom: 1.5rem;
  transition: var(--transition-normal);
}

.why-card:hover .why-icon {
  background: var(--dark-navy);
  color: var(--primary-gold);
}

/* --- Stage & Subject Cards --- */
.stage-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  border: 1px solid rgba(31, 42, 68, 0.06);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  text-align: center;
  height: 100%;
}

.stage-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(201, 162, 39, 0.4);
}

.subject-badge-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border: 1px solid rgba(31, 42, 68, 0.06);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.subject-badge-card:hover {
  transform: translateX(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-gold);
}

/* --- Teacher Cards --- */
.teacher-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid rgba(31, 42, 68, 0.06);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  height: 100%;
}

.teacher-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.teacher-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dark-navy) 0%, #2A3859 100%);
  color: var(--primary-gold);
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  border: 4px solid var(--bg-light);
  box-shadow: var(--shadow-sm);
}

/* --- Timeline Section --- */
.timeline-wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 50%;
  width: 4px;
  background: rgba(31, 42, 68, 0.1);
  transform: translateX(50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-content {
  width: 45%;
  background: var(--bg-white);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(31, 42, 68, 0.06);
}

.timeline-node {
  width: 48px;
  height: 48px;
  background: var(--primary-gold);
  color: var(--dark-navy);
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  box-shadow: 0 0 0 6px var(--bg-light);
  z-index: 2;
}

/* --- Feature Pills / Cards --- */
.feature-pill {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  border: 1px solid rgba(31, 42, 68, 0.06);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.feature-pill:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(201, 162, 39, 0.3);
}

/* --- Mockup Device Preview --- */
.preview-screen-box {
  background: var(--dark-navy);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: #FFFFFF;
  box-shadow: var(--shadow-lg);
}

/* --- FAQ Accordion --- */
.saad-accordion .accordion-item {
  border: 1px solid rgba(31, 42, 68, 0.08);
  border-radius: var(--radius-md) !important;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.saad-accordion .accordion-button {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark-navy);
  background: var(--bg-white);
  padding: 1.25rem 1.5rem;
  box-shadow: none !important;
}

.saad-accordion .accordion-button:not(.collapsed) {
  color: var(--primary-gold);
  background: rgba(201, 162, 39, 0.05);
}

.saad-accordion .accordion-button::after {
  margin-right: auto;
  margin-left: 0;
}

.saad-accordion .accordion-body {
  padding: 1.25rem 1.5rem;
  color: var(--text-muted);
  line-height: 1.8;
  background: var(--bg-white);
}

/* --- Back To Top --- */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 48px;
  height: 48px;
  background: var(--dark-navy);
  color: var(--primary-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  z-index: 1040;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background: var(--primary-gold);
  color: var(--dark-navy);
  transform: translateY(-4px);
}

/* --- Mobile Menu Drawer --- */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1055;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
}

.mobile-nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-overlay .nav-link {
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFFFFF !important;
}

.mobile-nav-close {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #FFFFFF;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Viewport Animations (Scroll-triggered) --- */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.fade-up {
  transform: translateY(40px);
}

.fade-right {
  transform: translateX(-40px);
}

.fade-left {
  transform: translateX(40px);
}

.zoom-in {
  transform: scale(0.92);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Stagger Delay Classes */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Custom Navbar Toggler & Collapse styling (matching screenshot) */
.custom-toggler {
  border: 2px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 12px !important;
  padding: 6px 12px !important;
  background: transparent;
  transition: var(--transition-fast);
}

.custom-toggler:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #FFFFFF !important;
}

/* --- Responsive Adaptations --- */
@media (max-width: 991.98px) {
  .saad-navbar .navbar-collapse {
    background: #172035;
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  }
  .hero-section {
    padding: 8rem 0 5rem;
    text-align: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .timeline-line {
    right: 24px;
    transform: none;
  }
  .timeline-item, .timeline-item:nth-child(even) {
    flex-direction: row;
    margin-bottom: 2.5rem;
  }
  .timeline-node {
    right: 0;
    transform: none;
  }
  .timeline-content {
    width: calc(100% - 60px);
    margin-right: 60px;
  }
}

@media (max-width: 575.98px) {
  .hero-headline {
    font-size: 2rem;
  }
  .stats-section {
    margin-top: 2rem;
  }
  .stat-card-saad {
    padding: 1.5rem 1rem;
  }
  .stat-number {
    font-size: 2rem;
  }
}

