/* --- 1. التنسيقات العامة الأساسية (Desktop First) --- */
.origin-section {
  min-height: 100vh;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow: hidden;
  position: relative;
}

.origin-container {
  max-width: 1200px;
  width: 100%;
  text-align: center;
  z-index: 2;
}

.origin-title {
  font-size: 48px;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 10px;
  font-family: 'Teko', sans-serif;
}

.origin-desc {
  font-size: 18px;
  max-width: 850px;
  margin: 0 auto 50px;
  opacity: 0.8;
  line-height: 1.4;
  font-family: 'Teko', sans-serif;
}

/* حاوية التايم لاين */
.timeline-wrapper {
  position: relative;
  height: 600px;
  margin-top: 20px;
}

.timeline-item {
  position: absolute;
  width: 150px; /* زيادة العرض قليلاً للاحتواء */
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}

.icon-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon-circle img {
  width: 40px;
  height: auto;
}

.year {
  color: #8a4fff;
  font-size: 22px;
  font-weight: 600;
}

.timeline-item h5 {
  white-space: nowrap;
  font-size: 16px;
  font-family: 'Teko', sans-serif;
  margin: 6px 0;
  text-transform: uppercase;
}

.timeline-item p {
  font-size: 12px;
  font-family: 'Teko', sans-serif;
  opacity: 0.7;
  line-height: 1.2;
}

/* توزيع العناصر في النسخة المكتبية */
.item-2018 { top: 0; left: 50%; transform: translateX(-50%); }
.item-2020 { top: 35%; left: 5%; }
.item-today { top: 35%; right: 10%; }

/* رائد الفضاء */
.astronaut-center {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  z-index: 1;
}

.astronaut-center img {
  width: 100%;
  display: block;
}

.glow-effect {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(138, 79, 255, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

/* زخارف SVG */
.origin-frame-svg {
  position: absolute;
  top: 10%; left: -25%; width: 100%; height: 100%; z-index: 0;
}

.origin-frame-bottom-svg {
  position: absolute;
  bottom: -80%; left: 0%; width: 100%; height: 100%; z-index: 0;
}

/* --- 2. Tablet View (769px to 1168px) --- */
@media (min-width: 769px) and (max-width: 1168px) {
  .origin-title {
    font-size: 56px;
    margin-bottom: 20px;
  }

  .origin-desc {
    font-size: 20px;
    max-width: 850px;
    line-height: 1.6;
    opacity: 0.9;
  }

  .timeline-wrapper {
    height: 700px;
    margin-top: 40px;
  }

  .icon-circle {
    width: 110px;
    height: 110px;
  }

  .year {
    font-size: 28px;
  }

  .timeline-item h5 {
    font-size: 20px;
  }

  .timeline-item p {
    font-size: 14px;
    width: 200px;
    white-space: normal;
  }

  .astronaut-center {
    width: 520px;
    bottom: -50px;
  }

  .origin-frame-svg, 
  .origin-frame-bottom-svg {
    display: none !important;
  }
}

/* --- 3. Mobile View (Up to 768px) --- */
@media (max-width: 768px) {
  .origin-title {
    font-size: 32px;
  }

  .origin-desc {
    font-size: 15px;
    padding: 0 10px;
    margin-bottom: 30px;
  }

  .timeline-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    height: auto;
    gap: 30px;
    margin-top: 10px;
  }

  .timeline-item {
    position: relative; /* إلغاء التموضع المطلق للموبايل */
    width: 45%;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }

  .item-2018 {
    width: 100%; /* جعل أول عنصر يأخذ العرض كاملاً */
    order: 1;
  }

  .item-2020 { order: 2; }
  .item-today { order: 3; }

  .icon-circle {
    width: 75px;
    height: 75px;
  }

  .year {
    font-size: 18px;
  }

  .timeline-item p {
    white-space: normal;
    font-size: 11px;
  }

  .astronaut-center {
    position: relative;
    order: 4;
    width: 90%;
    margin-top: 40px;
    bottom: 0;
    left: 0;
    transform: none;
  }

  .origin-frame-svg, 
  .origin-frame-bottom-svg {
    display: none;
  }
}