/* Timeline Steps Frontend CSS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --timeline-gold: #d8a91e;
  --timeline-gold-glow: rgba(216, 169, 30, 0.4);
  --timeline-card-bg: rgba(15, 20, 35, 0.65);
  --timeline-card-border: rgba(255, 255, 255, 0.08);
  --timeline-card-border-hover: rgba(216, 169, 30, 0.5);
  --timeline-text-main: #ffffff;
  --timeline-text-muted: #a1a9b8;
  --timeline-radius: 24px;
}

.timeline-section {
  width: 100%;
  padding: 60px 20px;
  font-family: 'Outfit', sans-serif;
  color: var(--timeline-text-main);
  overflow-x: hidden;
  box-sizing: border-box;
}

.timeline-section * {
  box-sizing: border-box;
}

.timeline-wrapper {
  max-width: var(--timeline-container-width, 1000px);
  margin: 0 auto;
  position: relative;
  min-height: auto;
  padding: 20px 0;
}

/* Central Glowing Line */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(216, 169, 30, 0) 0%,
    rgba(216, 169, 30, 0.8) 15%,
    rgba(216, 169, 30, 0.8) 85%,
    rgba(216, 169, 30, 0) 100%
  );
  z-index: 1;
}



.timeline-item {
  position: relative;
  width: 100%;
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* The central dot */
.timeline-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at top left, #ffd86b, var(--timeline-gold));
  box-shadow:
    0 0 0 6px rgba(216, 169, 30, 0.15),
    0 0 20px var(--timeline-gold-glow);
  z-index: 3;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.timeline-item:hover .timeline-dot {
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow:
    0 0 0 8px rgba(216, 169, 30, 0.25),
    0 0 30px var(--timeline-gold);
}

/* Connecting lines block from dot to card (optional aesthetic) */
.timeline-item::before {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 200px); /* Extends from dot to the card */
  height: 1px;
  background: linear-gradient(90deg, rgba(216, 169, 30, 0.5), rgba(216, 169, 30, 0));
  z-index: 1;
}

.timeline-item.left::before {
  right: 50%;
  background: linear-gradient(270deg, rgba(216, 169, 30, 0.6), rgba(216, 169, 30, 0));
}

.timeline-item.right::before {
  left: 50%;
  background: linear-gradient(90deg, rgba(216, 169, 30, 0.6), rgba(216, 169, 30, 0));
}

/* Card Positioning */
.timeline-item.left {
  justify-content: flex-start;
}

.timeline-item.right {
  justify-content: flex-end;
}

.timeline-item.left .timeline-card {
  margin-right: 50px;
}

.timeline-item.right .timeline-card {
  margin-left: 50px;
}

/* Card Styling - Glassmorphism */
.timeline-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--timeline-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--timeline-card-border);
  border-radius: var(--timeline-radius);
  padding: 30px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 15px 35px rgba(0, 0, 0, 0.4);
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin: 0;
  text-align: left;
}

.timeline-item.left .timeline-card {
  /* Right align text on left cards for symmetry, or keep them left aligned */
  text-align: right;
  border-right: 2px solid transparent;
}

.timeline-item.right .timeline-card {
  text-align: left;
  border-left: 2px solid transparent;
}

.timeline-item:hover .timeline-card {
  transform: translateY(-8px);
  border-color: var(--timeline-card-border-hover);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(216, 169, 30, 0.15);
}

.timeline-card-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.timeline-item.left .timeline-card-header {
  flex-direction: row-reverse;
}

.icon-box {
  width: 58px;
  height: 58px;
  min-width: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(216, 169, 30, 0.2) 0%, rgba(216, 169, 30, 0.05) 100%);
  border: 1px solid rgba(216, 169, 30, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.1), 0 5px 15px rgba(0,0,0,0.2);
  transition: all 0.4s ease;
}

.timeline-card:hover .icon-box {
  background: linear-gradient(135deg, rgba(216, 169, 30, 0.35) 0%, rgba(216, 169, 30, 0.1) 100%);
  transform: scale(1.08) rotate(5deg);
  border-color: rgba(216, 169, 30, 0.5);
  box-shadow: 0 0 20px var(--timeline-gold-glow);
}

.icon-box svg {
  width: var(--timeline-icon-size, 26px);
  height: var(--timeline-icon-size, 26px);
  stroke: var(--timeline-gold);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s ease;
}

.icon-box img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.timeline-card:hover .icon-box svg {
  stroke: #ffffff;
}

.card-content {
  flex: 1;
}

.step-label {
  font-size: var(--timeline-label-size, 13px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--timeline-gold);
  margin-bottom: 12px;
  display: block;
}

.card-title {
  font-family: "Outfit", sans-serif;
  font-size: var(--timeline-title-size, 24px);
  line-height: 1.2;
  font-weight: 700;
  color: var(--timeline-text-main);
  margin-bottom: 15px;
  margin-top: 0;
}

.card-text {
  font-size: var(--timeline-desc-size, 15px);
  line-height: 1.6;
  color: var(--timeline-text-muted);
  margin: 0;
}

/* Animations */
.timeline-item .timeline-card {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(5px);
}

.timeline-item.left .timeline-card {
  transform: translateX(-40px);
}

.timeline-item.right .timeline-card {
  transform: translateX(40px);
}

.timeline-item .timeline-card.show {
  opacity: 1;
  transform: translate(0, 0);
  filter: blur(0);
}

/* Force visibility in Elementor Editor so live preview works */
body.elementor-editor-active .timeline-item .timeline-card {
  opacity: 1 !important;
  transform: translate(0, 0) !important;
  filter: blur(0) !important;
}

/* Responsive Styles */
@media (max-width: 991px) {
  .timeline-section {
    padding: 50px 15px;
  }
  
  .timeline-wrapper {
    padding: 0;
  }

  /* Move line to left on mobile/tablet */
  .timeline-line {
    left: 30px;
    transform: none;
  }
  
  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    justify-content: flex-start;
    padding-left: 65px;
    margin-bottom: 30px;
  }
  
  .timeline-item::before {
    display: none; /* Hide connector line on mobile */
  }

  .timeline-dot {
    left: 30px;
    transform: translate(-50%, -50%);
  }

  .timeline-item.left .timeline-card,
  .timeline-item.right .timeline-card {
    margin: 0;
    max-width: 100%;
    text-align: left;
  }

  .timeline-item.left .timeline-card-header,
  .timeline-item.right .timeline-card-header {
    flex-direction: row;
  }
  
  .timeline-item .timeline-card {
    transform: translateY(30px);
  }
}

@media (max-width: 575px) {
  .timeline-section {
    padding: 40px 12px;
  }

  .timeline-line {
    left: 20px;
  }
  
  .timeline-dot {
    left: 20px;
    width: 14px;
    height: 14px;
    box-shadow: 0 0 0 5px rgba(216, 169, 30, 0.15), 0 0 15px var(--timeline-gold-glow);
  }

  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    padding-left: 45px;
  }

  .timeline-card {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .icon-box {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
  }
  
  .icon-box svg {
    width: 22px;
    height: 22px;
  }

  .card-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .card-text {
    font-size: 14px;
    line-height: 1.5;
  }
}
