/* ========================================
   حلول كتبي - Landing Page CSS
   ======================================== */

/* === CSS Variables === */
:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --secondary: #34a853;
  --secondary-light: #e6f4ea;
  --accent: #fbbc04;
  --text-primary: #1a1a2e;
  --text-secondary: #5f6368;
  --text-light: #80868b;
  --bg-main: #f8f9fa;
  --bg-white: #ffffff;
  --bg-gradient-start: #eaf1fb;
  --bg-gradient-end: #f8f9fa;
  --border-color: #e8eaed;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-card: 0 2px 8px rgba(26,115,232,0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Tajawal', 'Segoe UI', sans-serif;
  --max-width: 1200px;
}

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

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

body {
  font-family: var(--font-main);
  background: var(--bg-main);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* === Header === */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: box-shadow var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-menu a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  background: none;
  border: none;
}

.menu-toggle:hover {
  background: var(--primary-light);
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === Hero Section === */
.hero {
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-white) 50%, var(--secondary-light) 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26,115,232,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(52,168,83,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: linear-gradient(135deg, rgba(26,115,232,0.1), rgba(52,168,83,0.1));
  border: 1px solid rgba(26,115,232,0.2);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  animation: fadeIn 0.8s ease;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--secondary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease;
}

.hero h1 span {
  color: var(--primary);
  position: relative;
}

.hero h1 span::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 0;
  width: 100%;
  height: 8px;
  background: rgba(26,115,232,0.15);
  border-radius: 4px;
  z-index: -1;
}

.hero-description {
  font-size: 1.1rem;
  line-height: 2;
  color: var(--text-secondary);
  margin-bottom: 32px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: default;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(26,115,232,0.3);
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,115,232,0.4);
}

.hero-btn svg {
  width: 20px;
  height: 20px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 48px;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* === Section Shared === */
.section {
  padding: 70px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--primary-light);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.5;
}

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

/* === Features Section === */
.features {
  background: var(--bg-white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition);
}

.feature-card:hover {
  border-color: rgba(26,115,232,0.2);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

.feature-icon.blue {
  background: var(--primary-light);
  color: var(--primary);
}

.feature-icon.green {
  background: var(--secondary-light);
  color: var(--secondary);
}

.feature-icon.orange {
  background: #fef7e0;
  color: #e8a000;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* === Grades Section === */
.grades {
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-main));
}

.grades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.grade-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition);
  cursor: default;
}

.grade-card:hover {
  border-color: rgba(26,115,232,0.3);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.grade-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
}

.grade-icon.primary {
  background: var(--primary-light);
  color: var(--primary);
}

.grade-icon.secondary {
  background: #fef7e0;
  color: #e8a000;
}

.grade-icon.tertiary {
  background: var(--secondary-light);
  color: var(--secondary);
}

.grade-info h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.grade-info p {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* === SEO Content Section === */
.seo-content {
  background: var(--bg-white);
}

.seo-content-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.seo-content-wrapper h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.seo-content-wrapper h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 28px;
  margin-bottom: 12px;
}

.seo-content-wrapper p {
  font-size: 1rem;
  line-height: 2;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.seo-content-wrapper strong {
  color: var(--text-primary);
  font-weight: 600;
}

.seo-highlight-box {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 28px 0;
  border-right: 4px solid var(--primary);
}

.seo-highlight-box p {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 0;
}

/* === Timeline Section === */
.timeline-section {
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-main));
}

.timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  right: 24px;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 16px 0;
  position: relative;
}

.timeline-dot {
  width: 50px;
  min-width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: transform var(--transition);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.1);
}

.timeline-dot.done {
  background: var(--secondary);
  color: white;
}

.timeline-dot.progress {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px rgba(26,115,232,0.2);
}

.timeline-dot.pending {
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  color: var(--text-light);
}

.timeline-dot svg {
  width: 22px;
  height: 22px;
}

.timeline-content {
  flex: 1;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  transition: all var(--transition);
}

.timeline-item:hover .timeline-content {
  box-shadow: var(--shadow-sm);
}

.timeline-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 0.85rem;
  color: var(--text-light);
}

.timeline-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 50px;
  margin-top: 6px;
}

.timeline-status.done {
  background: var(--secondary-light);
  color: var(--secondary);
}

.timeline-status.progress {
  background: var(--primary-light);
  color: var(--primary);
}

.timeline-status.pending {
  background: #f1f3f4;
  color: var(--text-light);
}

/* === Footer === */
.footer {
  background: var(--text-primary);
  color: #c4c9d4;
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-about .footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.9;
  color: #9ca3af;
}

.footer-links h4 {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  font-size: 0.9rem;
  color: #9ca3af;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links ul li a:hover {
  color: white;
  padding-right: 6px;
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #6b7280;
}

/* === Scroll to Top Button === */
.scroll-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

.scroll-top svg {
  width: 20px;
  height: 20px;
}

/* ========================================
   Responsive Design
   ======================================== */

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .nav-menu {
    position: fixed;
    top: 64px;
    right: 0;
    left: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    transition: all var(--transition);
    z-index: 999;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-menu a {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 50px 0 40px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .section {
    padding: 50px 0;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 24px 18px;
  }

  .grades-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .timeline::before {
    right: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-btn {
    padding: 12px 28px;
    font-size: 0.9rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .grades-grid {
    grid-template-columns: 1fr;
  }

  .grade-card {
    padding: 18px 16px;
  }

  .seo-highlight-box {
    padding: 20px;
  }

  .timeline-dot {
    width: 42px;
    min-width: 42px;
    height: 42px;
  }

  .timeline-content {
    padding: 14px 16px;
  }
}

/* === Print Styles === */
@media print {
  .header,
  .scroll-top,
  .hero-btn {
    display: none;
  }
  
  body {
    color: #000;
    background: #fff;
  }
  
  .section {
    padding: 20px 0;
  }
}
