/* ── REWA TOUR — Journey Timeline (Creative Design) ── */

.rewa-journey {
  position: relative;
  padding: 96px 0;
  background: linear-gradient(170deg, #0a2e38 0%, #0c3b46 40%, #0e4452 100%);
  color: #fff;
  overflow: hidden;
  scroll-margin-top: 80px;
}

/* Ambient background effects */
.rewa-journey::before {
  content: '';
  position: absolute;
  top: -200px;
  inset-inline-end: -150px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(95, 208, 224, 0.08), transparent 65%);
  pointer-events: none;
}

.rewa-journey::after {
  content: '';
  position: absolute;
  bottom: -180px;
  inset-inline-start: -120px;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 164, 78, 0.06), transparent 65%);
  pointer-events: none;
}

.rewa-journey__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* ── Header ── */
.rewa-journey__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 72px;
}

.rewa-journey__kicker {
  color: #5fd0e0;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: block;
}

.rewa-journey__title {
  font-family: 'Tajawal', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 4vw, 42px);
  margin: 12px 0 14px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff, #a9e8f0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rewa-journey__subtitle {
  color: #8bb8c2;
  font-size: 17px;
  margin: 0;
  line-height: 1.65;
}

/* ── Timeline Container ── */
.rewa-journey__timeline {
  position: relative;
  padding: 20px 0;
}

/* ── The animated center line ── */
.rewa-journey__line {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: rgba(95, 208, 224, 0.1);
  border-radius: 100px;
  overflow: hidden;
}

[dir='rtl'] .rewa-journey__line {
  transform: translateX(50%);
}

.rewa-journey__line-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: linear-gradient(180deg, #5fd0e0, #0891b2, #e0a44e);
  border-radius: 100px;
  transition: height 0.1s linear;
}

/* Traveling glow on the line */
.rewa-journey__line-glow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5fd0e0;
  box-shadow: 0 0 16px 4px rgba(95, 208, 224, 0.6);
  opacity: 0;
  transition: top 0.15s linear, opacity 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.rewa-journey__line-glow--visible {
  opacity: 1;
}

/* ── Step Item ── */
.rewa-journey__step {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 48px;
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rewa-journey__step:last-child {
  margin-bottom: 0;
}

.rewa-journey__step--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Alternating sides */
.rewa-journey__step:nth-child(odd) {
  flex-direction: row-reverse;
  text-align: end;
}

.rewa-journey__step:nth-child(even) {
  flex-direction: row;
  text-align: start;
}

/* ── Marker (center node on timeline) ── */
.rewa-journey__marker {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  width: 80px;
}

.rewa-journey__num {
  font-family: 'Tajawal', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #5fd0e0;
  letter-spacing: 1px;
  opacity: 0.6;
}

.rewa-journey__icon-ring {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(95, 208, 224, 0.15), rgba(14, 116, 144, 0.1));
  border: 2px solid rgba(95, 208, 224, 0.2);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
}

.rewa-journey__step--visible .rewa-journey__icon-ring {
  border-color: rgba(95, 208, 224, 0.4);
  box-shadow: 0 0 24px rgba(95, 208, 224, 0.15);
}

/* Rotating dashed orbit */
.rewa-journey__icon-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px dashed rgba(95, 208, 224, 0.2);
  animation: rewaJourneyOrbit 20s linear infinite;
}

@keyframes rewaJourneyOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rewa-journey__icon-ring i {
  font-size: 26px;
  color: #5fd0e0;
  transition: transform 0.4s ease;
}

.rewa-journey__step--visible .rewa-journey__icon-ring i {
  animation: rewaJourneyIconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rewaJourneyIconPop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* Active step glow pulse */
.rewa-journey__step--active .rewa-journey__icon-ring {
  border-color: #5fd0e0;
  box-shadow: 0 0 32px rgba(95, 208, 224, 0.35);
  transform: scale(1.08);
}

.rewa-journey__step--active .rewa-journey__icon-ring::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(95, 208, 224, 0.4);
  animation: rewaJourneyPulse 2s ease-in-out infinite;
}

@keyframes rewaJourneyPulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.15); opacity: 0; }
}

.rewa-journey__step--active .rewa-journey__num {
  opacity: 1;
  color: #e0a44e;
}

/* ── Content Card ── */
.rewa-journey__content {
  flex: 1;
  max-width: 420px;
  padding: 28px 26px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}

/* Card shimmer effect */
.rewa-journey__content::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(95, 208, 224, 0.04), transparent);
  transition: inset-inline-start 0.8s ease;
}

.rewa-journey__step--visible .rewa-journey__content::before {
  inset-inline-start: 200%;
}

.rewa-journey__content:hover {
  border-color: rgba(95, 208, 224, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.rewa-journey__step--active .rewa-journey__content {
  border-color: rgba(95, 208, 224, 0.25);
  background: linear-gradient(145deg, rgba(95, 208, 224, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Arrow pointer from card to marker */
.rewa-journey__content::after {
  content: '';
  position: absolute;
  top: 30px;
  width: 14px;
  height: 14px;
  background: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transform: rotate(45deg);
}

.rewa-journey__step:nth-child(odd) .rewa-journey__content::after {
  inset-inline-end: -7px;
  border-top: none;
  border-inline-start: none;
}

.rewa-journey__step:nth-child(even) .rewa-journey__content::after {
  inset-inline-start: -7px;
  border-bottom: none;
  border-inline-end: none;
}

.rewa-journey__step-title {
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 19px;
  margin: 0 0 8px;
  color: #fff;
  line-height: 1.4;
}

.rewa-journey__step-desc {
  color: #8bb8c2;
  font-size: 15px;
  margin: 0;
  line-height: 1.65;
}

/* ── Connector lines from marker to card ── */
.rewa-journey__connector {
  flex-shrink: 0;
  width: 40px;
  position: relative;
}

.rewa-journey__connector::before {
  content: '';
  position: absolute;
  top: 38px;
  inset-inline-start: 0;
  inset-inline-end: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(95, 208, 224, 0.3), rgba(95, 208, 224, 0.05));
  opacity: 0;
  transition: opacity 0.5s ease 0.3s;
}

.rewa-journey__step:nth-child(even) .rewa-journey__connector::before {
  background: linear-gradient(90deg, rgba(95, 208, 224, 0.05), rgba(95, 208, 224, 0.3));
}

.rewa-journey__step--visible .rewa-journey__connector::before {
  opacity: 1;
}

/* ── Floating decorative airplane ── */
.rewa-journey__plane {
  position: absolute;
  inset-inline-start: 50%;
  top: 0;
  transform: translateX(-50%);
  z-index: 4;
  font-size: 20px;
  color: #e0a44e;
  opacity: 0;
  transition: top 0.15s linear, opacity 0.5s ease;
  filter: drop-shadow(0 2px 8px rgba(224, 164, 78, 0.4));
  pointer-events: none;
}

[dir='rtl'] .rewa-journey__plane {
  transform: translateX(50%) scaleX(-1);
}

.rewa-journey__plane--visible {
  opacity: 1;
}

/* ── Final CTA badge ── */
.rewa-journey__cta {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}

.rewa-journey__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0e7490, #0891b2);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  font-family: inherit;
  border: none;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(14, 116, 144, 0.35);
  transition: transform 0.25s, box-shadow 0.25s;
}

.rewa-journey__cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(14, 116, 144, 0.45);
}

.rewa-journey__cta-btn i {
  font-size: 20px;
}

/* ══════════════════════════════════════════
   REDUCED MOTION
   ══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .rewa-journey__icon-ring::before {
    animation: none;
  }

  .rewa-journey__step--active .rewa-journey__icon-ring::after {
    animation: none;
  }

  .rewa-journey__step--visible .rewa-journey__icon-ring i {
    animation: none;
  }

  .rewa-journey__step {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .rewa-journey__content::before {
    display: none;
  }

  .rewa-journey__line-fill {
    height: 100% !important;
    transition: none;
  }
}

/* ══════════════════════════════════════════
   TABLET — 1024px
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .rewa-journey__content {
    max-width: 360px;
    padding: 24px 22px;
  }

  .rewa-journey__connector {
    width: 28px;
  }
}

/* ══════════════════════════════════════════
   MOBILE — 768px
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  .rewa-journey {
    padding: 72px 0;
  }

  .rewa-journey__header {
    margin-bottom: 48px;
  }

  .rewa-journey__line {
    inset-inline-start: 32px;
    transform: none;
  }

  [dir='rtl'] .rewa-journey__line {
    transform: none;
  }

  .rewa-journey__plane {
    inset-inline-start: 32px;
    transform: translateX(-50%);
  }

  [dir='rtl'] .rewa-journey__plane {
    transform: translateX(50%) scaleX(-1);
  }

  /* All steps same direction on mobile */
  .rewa-journey__step,
  .rewa-journey__step:nth-child(odd),
  .rewa-journey__step:nth-child(even) {
    flex-direction: row;
    text-align: start;
  }

  [dir='rtl'] .rewa-journey__step,
  [dir='rtl'] .rewa-journey__step:nth-child(odd),
  [dir='rtl'] .rewa-journey__step:nth-child(even) {
    flex-direction: row-reverse;
    text-align: start;
  }

  .rewa-journey__marker {
    width: 64px;
  }

  .rewa-journey__icon-ring {
    width: 52px;
    height: 52px;
  }

  .rewa-journey__icon-ring i {
    font-size: 22px;
  }

  .rewa-journey__icon-ring::before {
    inset: -5px;
  }

  .rewa-journey__connector {
    width: 16px;
  }

  .rewa-journey__content {
    max-width: none;
    padding: 20px 18px;
    border-radius: 16px;
  }

  /* Hide card arrow on mobile */
  .rewa-journey__content::after {
    display: none;
  }

  .rewa-journey__step-title {
    font-size: 17px;
  }

  .rewa-journey__step-desc {
    font-size: 14px;
  }

  .rewa-journey__step {
    margin-bottom: 28px;
  }

  .rewa-journey__num {
    font-size: 12px;
  }

  .rewa-journey__line-glow {
    inset-inline-start: 32px;
    left: auto;
    transform: translateX(-50%);
  }

  [dir='rtl'] .rewa-journey__line-glow {
    transform: translateX(50%);
  }
}

/* ══════════════════════════════════════════
   SMALL PHONES — 480px
   ══════════════════════════════════════════ */
@media (max-width: 480px) {
  .rewa-journey__inner {
    padding: 0 16px;
  }

  .rewa-journey__line {
    inset-inline-start: 24px;
  }

  .rewa-journey__plane {
    inset-inline-start: 24px;
  }

  .rewa-journey__marker {
    width: 48px;
  }

  .rewa-journey__icon-ring {
    width: 44px;
    height: 44px;
  }

  .rewa-journey__icon-ring i {
    font-size: 19px;
  }

  .rewa-journey__icon-ring::before {
    display: none;
  }

  .rewa-journey__connector {
    width: 12px;
  }

  .rewa-journey__content {
    padding: 16px 14px;
  }

  .rewa-journey__step-title {
    font-size: 16px;
  }

  .rewa-journey__step-desc {
    font-size: 13.5px;
  }

  .rewa-journey__step {
    margin-bottom: 22px;
  }

  .rewa-journey__cta-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
  }

  .rewa-journey__line-glow {
    inset-inline-start: 24px;
  }
}
