/* ============================================
   STEP 2 REDESIGN - PRECISION COMPONENT ATTACHMENT
   Modern Sleek Tech Aesthetic with Dark Background
   ============================================ */

/* Import distinctive tech font */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800&family=Rajdhani:wght@300;400;500;600;700&display=swap');

/* Step 2 Container - Uses technology-style background from section-transitions.css */
.snap-page[data-step="2"] {
  background: transparent;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: clamp(3rem, 6vh, 5rem) clamp(1.5rem, 5vw, 6rem);
  min-height: 100vh;
}

/* Background handled by section-transitions.css */

/* ============================================
   HEADER SECTION
   ============================================ */

.step2-modern-header {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 1300px;
  animation: slideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Orange Accent Line */
.step2-accent-line {
  width: clamp(60px, 8vw, 120px);
  height: 3px;
  background: linear-gradient(90deg,
      transparent 0%,
      #ff6b00 30%,
      #ff8c00 50%,
      #ff6b00 70%,
      transparent 100%);
  margin: 0 auto clamp(1.5rem, 3vh, 2.5rem);
  box-shadow: 0 0 20px rgba(255, 107, 0, 0.6),
    0 0 40px rgba(255, 107, 0, 0.3);
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    opacity: 1;
    filter: brightness(1);
  }

  50% {
    opacity: 0.8;
    filter: brightness(1.3);
  }
}

/* Main Title */
.step2-main-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: #ff6b00;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin: 0;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(255, 107, 0, 0.3);
  animation: titleFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes titleFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ============================================
   VIDEO/MEDIA ROW
   ============================================ */

.step2-video-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  width: 100%;
  max-width: 1050px;
  position: relative;
  z-index: 1;
  animation: mediaFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

@keyframes mediaFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Video/Image Container */
.step2-video-container {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(255, 107, 0, 0.2);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.1),
    0 4px 12px rgba(255, 107, 0, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  animation: containerSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.step2-video-container:nth-child(1) {
  animation-delay: 0.5s;
}

.step2-video-container:nth-child(2) {
  animation-delay: 0.7s;
}

@keyframes containerSlideIn {
  from {
    opacity: 0;
    transform: translateX(-30px) rotateY(-5deg);
  }

  to {
    opacity: 1;
    transform: translateX(0) rotateY(0);
  }
}

.step2-video-container:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255, 107, 0, 0.5);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 8px 24px rgba(255, 107, 0, 0.3),
    0 0 0 1px rgba(255, 107, 0, 0.2);
}


.step2-video-container::after {
  bottom: 10px;
  right: 10px;
  border-left: none;
  border-top: none;
}

.step2-video-container:hover::before,
.step2-video-container:hover::after {
  width: 40px;
  height: 40px;
  border-color: rgba(255, 107, 0, 0.9);
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.5);
}

/* Video Element */
.step2-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  min-height: 350px;
  filter: brightness(0.95) contrast(1.05);
  transition: filter 0.4s ease;
}

.step2-video-container:hover .step2-video {
  filter: brightness(1) contrast(1.08);
}

/* Image Element */
.step2-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  min-height: 350px;
  filter: brightness(0.95) contrast(1.05);
  transition: filter 0.4s ease;
}

.step2-video-container:hover .step2-image {
  filter: brightness(1) contrast(1.08);
}

/* ============================================
   DESCRIPTION SECTION
   ============================================ */

.step2-description-section {
  max-width: 1300px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 4vh, 3rem) clamp(1rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  border: 2px solid rgba(255, 107, 0, 0.15);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(255, 107, 0, 0.1);
  animation: sectionFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s both;
  backdrop-filter: blur(10px);
}

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Label Tag */
.step2-label-tag {
  display: inline-block;
  font-family: 'Orbitron', monospace;
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ff6b00;
  background: linear-gradient(90deg,
      rgba(255, 107, 0, 0.15) 0%,
      rgba(255, 107, 0, 0.25) 100%);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 107, 0, 0.3);
  margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
  box-shadow:
    0 0 20px rgba(255, 107, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: tagPulse 3s ease-in-out infinite;
}

@keyframes tagPulse {

  0%,
  100% {
    box-shadow:
      0 0 20px rgba(255, 107, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }

  50% {
    box-shadow:
      0 0 30px rgba(255, 107, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

/* Description Title */
.step2-description-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 500;
  color: #2a2a2a;
  line-height: 1.4;
  margin: 0 0 clamp(2.5rem, 5vh, 4rem);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   FEATURE GRID
   ============================================ */

.step2-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2rem, 4vh, 3rem);
}

/* Feature Item */
.step2-feature-item {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: clamp(1.8rem, 3vw, 2.5rem);
  border: 2px solid rgba(255, 107, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  animation: featureSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.step2-feature-item:nth-child(1) {
  animation-delay: 0.9s;
}

.step2-feature-item:nth-child(2) {
  animation-delay: 1.0s;
}

.step2-feature-item:nth-child(3) {
  animation-delay: 1.1s;
}

@keyframes featureSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover glow effect */
.step2-feature-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.step2-feature-item:hover::before {
  opacity: 1;
}

.step2-feature-item:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 107, 0, 0.5);
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(255, 107, 0, 0.25);
}

/* Feature Icon */
.step2-feature-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto clamp(1rem, 2vh, 1.5rem);
  background: linear-gradient(135deg,
      rgba(255, 107, 0, 0.2) 0%,
      rgba(255, 140, 0, 0.3) 100%);
  border-radius: 12px;
  border: 2px solid rgba(255, 107, 0, 0.4);
  position: relative;
  box-shadow:
    0 0 20px rgba(255, 107, 0, 0.3),
    inset 0 0 10px rgba(255, 107, 0, 0.1);
  transition: all 0.4s ease;
}

/* Icon inner glow */
.step2-feature-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, #ff6b00 0%, transparent 70%);
  border-radius: 50%;
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

  0%,
  100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

.step2-feature-item:hover .step2-feature-icon {
  transform: scale(1.1) rotateZ(5deg);
  border-color: rgba(255, 107, 0, 0.7);
  box-shadow:
    0 0 30px rgba(255, 107, 0, 0.5),
    inset 0 0 15px rgba(255, 107, 0, 0.2);
}

/* Feature Title */
.step2-feature-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  color: #ff8c00;
  margin-bottom: clamp(0.75rem, 1.5vh, 1rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

/* Feature Description */
.step2-feature-description {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  font-weight: 400;
  color: #555;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
  .snap-page[data-step="2"] {
    padding: clamp(2rem, 4vh, 3rem) clamp(1rem, 3vw, 2rem);
    gap: clamp(1.5rem, 3vh, 2.5rem);
  }

  .step2-video-row {
    gap: clamp(1.5rem, 3vw, 2rem);
  }

  .step2-video,
  .step2-image {
    min-height: 250px;
  }

  .step2-feature-grid {
    gap: clamp(1rem, 2vw, 1.5rem);
  }

  .step2-description-section {
    padding: clamp(1.5rem, 3vh, 2rem) clamp(0.75rem, 2vw, 1.5rem);
  }
}

@media (max-width: 480px) {
  .step2-main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .step2-description-title {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
  }

  .step2-video,
  .step2-image {
    min-height: 200px;
  }
}

#cowos_chip_info_icon {
  right: 17%;
  bottom: 18%;
}



/* Tooltip wrapper - positions the content */
.info-tooltip {
  position: absolute;
  right: calc(100% + 60px);
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sideview-info-icon.has-tooltip:hover .info-tooltip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Connecting line - JS controls position, width, and rotation */
.info-tooltip__line {
  height: 2px;
  background: linear-gradient(90deg,
      #ff6b00 0%,
      rgba(255, 107, 0, 0.8) 100%);
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

/* Dot at the end of the line (near icon) */
.info-tooltip__line::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #ff6b00;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 107, 0, 0.6);
}

/* Dot at start of line (near content) */
.info-tooltip__line::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #ff6b00;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 107, 0, 0.5);
}

/* Tooltip content box */
.info-tooltip__content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #2a2a2a;
  line-height: 1.5;
  max-width: 280px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(255, 107, 0, 0.15);
  white-space: normal;
}

/* Hover animation enhancement */
.sideview-info-icon.has-tooltip:hover .info-tooltip__line {
  animation: lineGlow 1.5s ease-in-out infinite;
}

@keyframes lineGlow {

  0%,
  100% {
    box-shadow: 0 0 5px rgba(255, 107, 0, 0.3);
  }

  50% {
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.6);
  }
}

/* Responsive adjustments for tooltip */
@media (max-width: 768px) {
  .info-tooltip {
    right: auto;
    left: calc(100% + 15px);
    flex-direction: row-reverse;
  }

  .info-tooltip__line::after {
    right: auto;
    left: -4px;
  }

  .info-tooltip__content {
    max-width: 200px;
    font-size: 0.85rem;
    padding: 10px 12px;
  }
}

/* SVG Connector for cowos info icon line */
.cowos-info-line-connector {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 10;
}

#cowos-info-line {
  transition: opacity 0.3s ease, stroke-dashoffset 0.5s ease-out;
}