/* ============================================================
   چرخ گستر سهند - Testimonial Timeline (اصلاح‌شده)
   نسخه: 2.0
   کاملاً Responsive - Mobile First
   ============================================================ */

:root {
  --atlas-deep-blue: #0a1a2f;
  --atlas-mid-blue: #0d2240;
  --atlas-tech-blue: #134074;
  --atlas-gold: #d4af37;
  --atlas-gold-light: #e5c767;
  --atlas-copper: #b87333;
  --atlas-white: #ffffff;
  --atlas-text-on-dark: #ccd6e0;
  --atlas-text-muted: #8899aa;
  --transition-mechanical: 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.2);
  --font-primary: 'IRANSans', 'Vazirmatn', 'Tahoma', sans-serif;
}

/* ==================== سکشن اصلی ==================== */
.testimonial-timeline-section {
  background: linear-gradient(180deg, var(--atlas-deep-blue) 0%, #0a1628 100%);
  padding: 6rem 1.5rem;
  font-family: var(--font-primary);
  direction: rtl;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* ==================== چرخ‌دنده‌های پس‌زمینه ==================== */
.tl-gear-bg {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
  color: var(--atlas-gold);
}

.tl-gear-1 {
  top: 5%;
  right: -120px;
  width: 380px;
  height: 380px;
  animation: tlSlowRotate 60s linear infinite, tlGearGlow1 3s ease-in-out infinite;
}

@keyframes tlGearGlow1 {

  0%,
  100% {
    filter:
      drop-shadow(0 0 25px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 60px rgba(212, 175, 55, 0.6)) drop-shadow(0 0 100px rgba(212, 175, 55, 0.3));
  }

  50% {
    filter:
      drop-shadow(0 0 40px rgba(255, 225, 50, 1)) drop-shadow(0 0 90px rgba(212, 175, 55, 0.9)) drop-shadow(0 0 150px rgba(212, 175, 55, 0.5));
  }
}

.tl-gear-2 {
  bottom: 8%;
  left: -100px;
  width: 260px;
  height: 260px;
  animation: tlSlowRotate 45s linear infinite reverse, tlGearGlow2 3.5s ease-in-out infinite;
}

@keyframes tlGearGlow2 {

  0%,
  100% {
    filter:
      drop-shadow(0 0 20px rgba(255, 200, 80, 0.8)) drop-shadow(0 0 45px rgba(184, 115, 51, 0.6)) drop-shadow(0 0 75px rgba(184, 115, 51, 0.3));
  }

  50% {
    filter:
      drop-shadow(0 0 35px rgba(255, 215, 100, 1)) drop-shadow(0 0 70px rgba(200, 140, 70, 0.9)) drop-shadow(0 0 110px rgba(184, 115, 51, 0.5));
  }
}

@keyframes tlSlowRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ==================== ذرات ==================== */
.tl-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.tl-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--atlas-gold);
  border-radius: 50%;
  animation: tlFloat linear infinite;
  opacity: 0;
}

@keyframes tlFloat {
  0% {
    transform: translateY(105vh) scale(0);
    opacity: 0;
  }

  15% {
    opacity: 0.7;
  }

  85% {
    opacity: 0.1;
  }

  100% {
    transform: translateY(-10vh) scale(2);
    opacity: 0;
  }
}

/* ==================== کانتینر ==================== */
.tl-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ==================== هدر ==================== */
.tl-header {
  text-align: center;
  margin-bottom: 4rem;
}

.tl-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.1);
  color: var(--atlas-gold);
  padding: 0.4rem 1.4rem;
  border-radius: 50px;
  font-size: 0.8rem;
  letter-spacing: 2px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  margin-bottom: 1.2rem;
}

.tl-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--atlas-gold);
  border-radius: 50%;
  animation: tlDotPulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--atlas-gold);
}

@keyframes tlDotPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.6);
    opacity: 0.3;
  }
}

.tl-title {
  color: var(--atlas-white);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
  line-height: 1.3;
}

.tl-title-accent {
  color: var(--atlas-gold);
}

.tl-subtitle {
  color: var(--atlas-text-muted);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ==================== Wrapper ==================== */
.tl-wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

/* ==================== شفت ==================== */
.tl-shaft {
  position: absolute;
  right: 50%;
  top: 0;
  bottom: 0;
  width: 8px;
  transform: translateX(50%);
  z-index: 0;
  border-radius: 4px;
  background: linear-gradient(180deg,
      transparent 0%,
      rgba(212, 175, 55, 0.1) 8%,
      rgba(212, 175, 55, 0.25) 30%,
      rgba(184, 115, 51, 0.35) 50%,
      rgba(212, 175, 55, 0.25) 70%,
      rgba(212, 175, 55, 0.1) 92%,
      transparent 100%);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.tl-weld {
  position: absolute;
  left: -5px;
  right: -5px;
  height: 3px;
  background: var(--atlas-gold);
  border-radius: 2px;
  z-index: 1;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
  animation: tlWeldGlow 3s ease-in-out infinite;
}

.tl-weld:nth-child(1) {
  top: 0;
  animation-delay: 0s;
}

.tl-weld:nth-child(2) {
  top: 33%;
  animation-delay: 1s;
}

.tl-weld:nth-child(3) {
  top: 66%;
  animation-delay: 2s;
}

.tl-weld:nth-child(4) {
  top: 100%;
  animation-delay: 3s;
}

@keyframes tlWeldGlow {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
  }

  50% {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
  }
}

/* ==================== آیتم‌ها ==================== */
.tl-items {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  position: relative;
  z-index: 1;
}

.tl-item {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1.2);
}

.tl-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ساید چپ و راست */
.tl-item:nth-child(odd) {
  flex-direction: row;
}

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

/* ==================== کارت ==================== */
.tl-card {
  flex: 1;
  max-width: 400px;
  background: linear-gradient(145deg, rgba(19, 64, 116, 0.25), rgba(10, 26, 47, 0.5));
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 14px;
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth);
  backdrop-filter: blur(8px);
}

.tl-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--atlas-gold), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.tl-card:hover {
  border-color: rgba(212, 175, 55, 0.45);
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(212, 175, 55, 0.2) inset;
}

.tl-card:hover::before {
  opacity: 1;
}

/* آیکون نقل‌قول */
.tl-quote-icon {
  color: var(--atlas-gold);
  margin-bottom: 0.8rem;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.tl-card:hover .tl-quote-icon {
  opacity: 1;
}

/* ستاره‌ها */
.tl-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 1rem;
}

.tl-star {
  color: var(--atlas-gold);
  animation: tlStarShine 2.5s ease-in-out infinite;
}

.tl-star:nth-child(1) {
  animation-delay: 0s;
}

.tl-star:nth-child(2) {
  animation-delay: 0.3s;
}

.tl-star:nth-child(3) {
  animation-delay: 0.6s;
}

.tl-star:nth-child(4) {
  animation-delay: 0.9s;
}

.tl-star:nth-child(5) {
  animation-delay: 1.2s;
}

@keyframes tlStarShine {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 2px rgba(212, 175, 55, 0.2));
  }

  50% {
    transform: scale(1.25);
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.7));
  }
}

/* متن نقل‌قول */
.tl-quote-text p {
  color: var(--atlas-text-on-dark);
  font-size: 0.9rem;
  line-height: 2;
  margin: 0 0 1.3rem 0;
}

.tl-quote-text strong {
  color: var(--atlas-gold-light);
  font-weight: 700;
}

/* نویسنده */
.tl-author {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.12);
}

.tl-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--atlas-gold), var(--atlas-copper));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--atlas-deep-blue);
  flex-shrink: 0;
  border: 2px solid var(--atlas-gold);
  transition: all 0.5s ease;
}

.tl-card:hover .tl-author-avatar {
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
  transform: rotateY(180deg);
}

.tl-author-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tl-author-name {
  color: var(--atlas-white);
  font-weight: 700;
  font-size: 0.9rem;
}

.tl-author-role {
  color: var(--atlas-gold);
  font-size: 0.75rem;
  font-weight: 500;
}

.tl-author-date {
  color: var(--atlas-text-muted);
  font-size: 0.7rem;
}

/* ==================== گره (Node) ==================== */
.tl-node {
  flex: 0 0 65px;
  width: 65px;
  height: 65px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tl-node-gear {
  width: 55px;
  height: 55px;
  color: var(--atlas-gold);
  animation: tlIdleGear 8s linear infinite, tlNodeGlow 2s ease-in-out infinite;
  transition: all 0.3s ease;
}

@keyframes tlNodeGlow {

  0%,
  100% {
    filter:
      drop-shadow(0 0 12px rgba(255, 215, 0, 1)) drop-shadow(0 0 25px rgba(212, 175, 55, 0.8)) drop-shadow(0 0 45px rgba(212, 175, 55, 0.4));
  }

  50% {
    filter:
      drop-shadow(0 0 22px rgba(255, 235, 50, 1)) drop-shadow(0 0 45px rgba(212, 175, 55, 1)) drop-shadow(0 0 70px rgba(212, 175, 55, 0.6));
  }
}

.tl-node:hover .tl-node-gear {
  animation: tlGearBurst 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards, tlNodeGlowHover 1s ease-in-out infinite;
}

@keyframes tlNodeGlowHover {

  0%,
  100% {
    filter:
      drop-shadow(0 0 30px rgba(255, 230, 0, 1)) drop-shadow(0 0 60px rgba(255, 200, 0, 1)) drop-shadow(0 0 90px rgba(212, 175, 55, 0.9)) drop-shadow(0 0 130px rgba(229, 199, 103, 0.5));
  }

  50% {
    filter:
      drop-shadow(0 0 45px rgba(255, 245, 80, 1)) drop-shadow(0 0 90px rgba(255, 220, 30, 1)) drop-shadow(0 0 130px rgba(212, 175, 55, 1)) drop-shadow(0 0 180px rgba(229, 199, 103, 0.8));
  }
}

@keyframes tlIdleGear {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes tlGearBurst {
  0% {
    transform: rotate(0deg) scale(1);
  }

  40% {
    transform: rotate(180deg) scale(1.35);
  }

  70% {
    transform: rotate(300deg) scale(1.1);
  }

  100% {
    transform: rotate(360deg) scale(1);
  }
}

.tl-node-ring {
  position: absolute;
  width: 65px;
  height: 65px;
  border: 2px solid rgba(212, 175, 55, 0.25);
  border-radius: 50%;
  animation: tlNodePulse 3s ease-out infinite;
  pointer-events: none;
}

.tl-node-ring:nth-child(2) {
  animation-delay: 1.5s;
}

@keyframes tlNodePulse {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

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

@media (max-width: 768px) {
  .testimonial-timeline-section {
    padding: 4rem 1rem;
  }

  .tl-title {
    font-size: 1.5rem;
  }

  .tl-wrapper {
    max-width: 100%;
  }

  /* شفت میره سمت راست */
  .tl-shaft {
    right: 28px;
    left: auto;
    transform: none;
    width: 6px;
  }

  .tl-items {
    gap: 2.8rem;
  }

  /* همه آیتم‌ها در یک جهت */
  .tl-item,
  .tl-item:nth-child(odd),
  .tl-item:nth-child(even) {
    flex-direction: row;
    gap: 1.2rem;
    padding-right: 0;
  }

  .tl-card {
    flex: 1;
    max-width: 100%;
    padding: 1.3rem;
  }

  .tl-node {
    flex: 0 0 45px;
    width: 45px;
    height: 45px;
    order: -1;
  }

  .tl-node-gear {
    width: 38px;
    height: 38px;
  }

  .tl-node-ring {
    width: 45px;
    height: 45px;
  }

  .tl-quote-text p {
    font-size: 0.82rem;
    line-height: 1.9;
  }
}

@media (max-width: 480px) {
  .testimonial-timeline-section {
    padding: 3rem 0.8rem;
  }

  .tl-header {
    margin-bottom: 2.5rem;
  }

  .tl-title {
    font-size: 1.25rem;
  }

  .tl-shaft {
    right: 18px;
    width: 4px;
  }

  .tl-items {
    gap: 2.2rem;
  }

  .tl-item,
  .tl-item:nth-child(odd),
  .tl-item:nth-child(even) {
    gap: 0.8rem;
  }

  .tl-card {
    padding: 1rem;
  }

  .tl-node {
    flex: 0 0 35px;
    width: 35px;
    height: 35px;
  }

  .tl-node-gear {
    width: 30px;
    height: 30px;
  }

  .tl-node-ring {
    width: 35px;
    height: 35px;
  }

  .tl-quote-text p {
    font-size: 0.75rem;
  }

  .tl-author-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .tl-author-name {
    font-size: 0.8rem;
  }
}