/* 
 * Scrollytelling Widget CSS - Version 5.0 (Mobile Horizontal Timeline)
 */

/* Base container and sticky behavior */
.scrolly-container {
  position: relative;
  width: 100%;
}

.scrolly-sticky-content {
  position: sticky;
  top: 0;
  height: 80vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== DESKTOP LAYOUT ===== */
.desktop-layout {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 80px 1fr; /* Image - Timeline - Text */
  align-items: center;
  height: 50%;
  margin: 0 auto;
  padding: 0 5vw; /* Use viewport width for responsive padding */
  box-sizing: border-box;
}

/* Base column styles */
.scrolly-column {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Base item styles for fade animation */
.scrolly-item {
  position: absolute;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  will-change: opacity;
}

.scrolly-item.active {
  opacity: 1;
}

/* Image column specific styles */
.scrolly-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scrolly-image img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

/* Text column and content styles */
.scrolly-text {
  width: 100%;
}

.text-title {
  padding-left: 15px;
  border-left: 3px solid #FF6B35; /* Accent line */
  margin-bottom: 1rem;
  font-weight: bold;
  font-size: 1.5rem;
}

.text-description h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.text-description ul {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}

.text-description li {
  position: relative;
  padding-left: 15px;
  margin-bottom: 0.5rem;
}

.text-description li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #FF6B35; /* Bullet point color */
}

/* --- 实线弧形时间线样式 (Desktop) --- */
.scrolly-arc-column {
  display: flex;
  justify-content: center;
}

.arc-container {
  position: relative;
  width: 50px;
  height: 350px;
}

.arc-container svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.arc-path {
  stroke-width: 2px; /* 默认线条粗细，可通过Elementor控制面板调整 */
  stroke: #E0E0E0;
  fill: none;
  stroke-linecap: round; /* 圆角端点 */
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
  /* 移除虚线样式，改为实线 */
}

.arc-dots {
  position: absolute;
  width: 100%;
  height: 100%;
}

.arc-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #E0E0E0;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  z-index: 10;
}

.arc-dot.active {
  background-color: #FF6B35; /* 橙色激活状态 */
  border-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.3);
}

.arc-highlight {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #FF6B35;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.3);
  transition: all 0.3s ease-out;
  z-index: 11;
}

/* ===== MOBILE LAYOUT ===== */
.mobile-layout {
  display: none; /* 默认隐藏，移动端显示 */
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 2rem 1.5rem;
  box-sizing: border-box;
}

/* Mobile Image Section */
.mobile-image-section {
  position: relative;
  width: 100%;
  height: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.mobile-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Mobile Horizontal Timeline Section */
.mobile-timeline-section {
  width: 100%;
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
}

.mobile-timeline-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  height: 20px;
}

.mobile-timeline-container svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.mobile-timeline-line {
  stroke: #E0E0E0;
  stroke-width: 2;
  stroke-linecap: round;
}

.mobile-timeline-dots {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  box-sizing: border-box;
}

.mobile-timeline-dot {
  width: 12px;
  height: 12px;
  background-color: #E0E0E0;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  transition: all 0.4s ease;
  z-index: 10;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-timeline-dot.active {
  background-color: #FF6B35;
  border-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.3);
  transform: scale(1.1);
}

/* Mobile Text Section */
.mobile-text-section {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-top: 1rem;
}

.mobile-text {
  width: 100%;
  text-align: center;
}

.mobile-text .text-title {
  border-left: none;
  padding-left: 0;
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.mobile-text .text-description {
  text-align: left;
  max-width: 100%;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 767px) {
  /* 隐藏桌面布局 */
  .desktop-layout {
    display: none;
  }
  
  /* 显示移动端布局 */
  .mobile-layout {
    display: flex;
  }
  
  .scrolly-sticky-content {
    height: 90vh; /* 移动端增加高度 */
  }
  
  .mobile-text .text-title {
    font-size: 1.2rem;
  }
  
  .mobile-text .text-description h3 {
    font-size: 1.1rem;
  }
  
  .mobile-text .text-description {
    font-size: 0.9rem;
  }
}

/* 额外的视觉增强 */
.text-content {
  padding: 20px 0;
}

.text-title {
  color: #333;
  line-height: 1.4;
}

.text-description {
  color: #666;
  line-height: 1.6;
}

/* 弧形时间线的渐变背景效果 (Desktop Only) */
.arc-container::before {
  content: '';
  position: absolute;
  left: 30%;
  top: 0;
  width: 0px;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(255, 107, 53, 0.1) 0%, 
    rgba(255, 107, 53, 0.05) 50%, 
    rgba(224, 224, 224, 0.1) 100%);
  transform: translateX(-50%);
  z-index: 5;
  opacity: 0.6;
  border-radius: 1px;
}

/* 圆点悬停效果 */
.arc-dot:hover,
.mobile-timeline-dot:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
}

.mobile-timeline-dot:hover {
  transform: scale(1.2);
}

/* 高亮圆点的脉冲动画 */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 107, 53, 0.1);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.3);
  }
}

.arc-highlight {
  animation: pulse 2s infinite;
}

/* 移动端时间线点击效果 */
.mobile-timeline-dot.active {
  animation: pulse 2s infinite;
}
