/* ============================================
   STEP 1B - PIC AND FIBER ALIGNMENT VIEW
   Modern Sleek Tech Aesthetic
   ============================================ */

@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 1B Container */
.snap-page[data-step="1b"] {
  background: transparent;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 1rem;
  gap: clamp(2rem, 4vh, 3.5rem);
}

/* ============================================
   HEADER SECTION
   ============================================ */

.step1b-modern-header {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 1300px;
  animation: step1bSlideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
}

@keyframes step1bSlideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Orange Accent Line */
.step1b-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: step1bPulseGlow 3s ease-in-out infinite;
}

@keyframes step1bPulseGlow {
  0%, 100% {
    opacity: 1;
    filter: brightness(1);
  }
  50% {
    opacity: 0.8;
    filter: brightness(1.3);
  }
}

/* Main Title */
.step1b-main-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  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: step1bTitleFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes step1bTitleFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* ============================================
   COMBINED CONTAINER (Shared White Background)
   ============================================ */

.step1b-combined-container {
  background: #ffffff;
  border-radius: 20px;
  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);
  padding: .5rem;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: step1bMediaFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
  position: relative;
  max-height: calc(100vh - 10rem);
  overflow: visible;
}

.step1b-combined-container:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 0, 0.4);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 8px 24px rgba(255, 107, 0, 0.25);
}

/* Custom scrollbar for the container */
.step1b-combined-container::-webkit-scrollbar {
  width: 8px;
}

.step1b-combined-container::-webkit-scrollbar-track {
  background: rgba(255, 107, 0, 0.05);
  border-radius: 10px;
}

.step1b-combined-container::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 0, 0.3);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.step1b-combined-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 0, 0.5);
}

/* ============================================
   FIBER MODE CONNECTOR LINES
   ============================================ */

.step1b-fiber-connector {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}

#fiber-to-top-anchor,
#fiber-to-side-anchor {
  stroke: #E91E63;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.9;
  filter: drop-shadow(0 1px 3px rgba(233, 30, 99, 0.3));
}

/* ============================================
   PIC MODE CONNECTOR LINES
   ============================================ */

.step1b-pic-connector {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}

#pic-to-side-label {
  stroke: #00C853;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.9;
  filter: drop-shadow(0 1px 3px rgba(0, 200, 83, 0.3));
}

/* ============================================
   CROSS-SECTION CONNECTOR LINE
   ============================================ */

.step1b-cross-section-connector {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6;
  overflow: visible;
}

#step1b-cross-section-line,
#step1b-fau-cross-section-line {
  stroke: #f97316;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 0.3s ease, stroke-dashoffset 0.5s ease-out;
}

/* ============================================
   IMAGE ROW
   ============================================ */

.step1b-image-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1;
  gap: 0.5rem;
  overflow: visible;
}

@keyframes step1bMediaFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Image Container */
.step1b-image-container {
  position: relative;
  background: transparent;
  border-radius: 12px;
  overflow: visible;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  width: 100%;
}
.micron-precision-text {
    position: relative;
    margin: 0;
    padding: 1.25rem 1.5rem 1rem;
    color: #3d3d4a;
    font-weight: 450;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.7;
    letter-spacing: 0.02em;
    background: linear-gradient(to bottom, rgba(249, 115, 22, 0.03), transparent);
}


.precision-highlight {
    color: #f97316;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.85em;
}

.vertical-coupling-overlay {
    position: absolute;
    top: 12px;
    left: 16px;
    z-index: 10;
    color: #f97316;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: left;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.step1b-image-container:nth-child(1) {
  animation-delay: 0.5s;
}

.step1b-image-container:nth-child(2) {
  animation-delay: 0.7s;
}

.step1b-image-container:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 107, 0, 0.3);
}

/* Image Element */
.step1b-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 378px;
  border-radius: 8px;
}

.step1b-image-container:hover .step1b-image {
  filter: brightness(1) contrast(1.08);
}

/* Image Label */
.step1b-image-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  padding: 2rem 1.5rem 1rem;
  text-align: center;
}

.step1b-image-label span {
  font-family: 'Orbitron', monospace;
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
  .snap-page[data-step="1b"] {
    padding: clamp(2rem, 4vh, 3rem) clamp(1rem, 3vw, 2rem);
    gap: clamp(1.5rem, 3vh, 2.5rem);
  }

  .step1b-combined-container {
    padding: 1rem;
    gap: 1rem;
    max-width: 95%;
  }

  .step1b-image-row {
    gap: clamp(1.5rem, 3vw, 2rem);
  }

  .step1b-image {
    max-height: 35vh;
  }
}

@media (max-width: 480px) {
  .step1b-main-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .step1b-combined-container {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .step1b-image {
    max-height: 30vh;
  }
}

/* ============================================
   ARROW CONNECTOR - PIC TOP IMAGE
   ============================================ */

/* Container needs relative positioning for arrow elements */
.step1b-top-container {
  position: relative;
}

/* Arrow anchor point - positioned on the green part of the image */
.step1b-arrow-anchor {
  position: absolute;
  width: 0;
  height: 0;
  /* Position on the green waveguides - approximately 24% from left, 48% from top */
  left: 35%;
  top: 62%;;
  z-index: 10;
  pointer-events: none;
}

/* PIC Mode text label - REMOVED (using sideview-sipho-label instead) */

/* Fiber anchor point - positioned on the red/blue fiber lines */
.step1b-fiber-anchor {
  position: absolute;
  width: 0;
  height: 0;
  /* Position on the red/blue fiber array - center area */
  left: 50%;
  top: 82%;
  z-index: 10;
  pointer-events: none;
}

/* Fiber Mode text label */
.step1b-fiber-text {
  position: absolute;
  /* Position below the fiber array */
  left: 34%;
  top: 83%;
  background: transparent;
  color: #E91E63;
  padding: 0;
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  z-index: 15;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Alignment anchor point - info icon style */
.step1b-align-anchor {
    position: absolute;
    left: 44%;
    top: 63%;
    z-index: 20;
    transform: translate(-50%, -50%);
}

/* Info icon styling */
.step1b-info-icon {
    width: 32px;
    height: 32px;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.step1b-info-icon:hover {
    transform: translate(-50%, -50%) scale(1.15);
    filter: drop-shadow(0 2px 6px rgba(249, 115, 22, 0.5));
}

.step1b-info-icon svg {
    width: 100%;
    height: 100%;
}

/* Alignment text label - hidden by default */
.step1b-align-text {
  position: absolute;
  left: 2%;
  right: 5%;
  bottom: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: #000000;
  padding: 0.75rem 1rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  z-index: 15;
  text-align: center;
  max-width: 280px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-left: 3px solid #f97316;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show text and line on info icon hover */
.step1b-info-icon:hover ~ .step1b-align-text,
.step1b-align-text:hover {
  opacity: 1;
  visibility: visible;
}

/* Line hidden by default, shown on hover */
#step1b-align-line {
  opacity: 0;
  transition: opacity 0.3s ease, stroke-dashoffset 0.3s ease-out;
}

.step1b-info-icon:hover ~ .step1b-arrow-connector #step1b-align-line,
.step1b-top-container:has(.step1b-info-icon:hover) #step1b-align-line {
  opacity: 1;
}

/* FAU anchor point - info icon style */
.step1b-fau-anchor {
  position: absolute;
  left: 40%;
  top: 60%;
  z-index: 20;
  transform: translate(-50%, -50%);
}

/* FAU stop text label - hidden by default */
.step1b-fau-text {
  position: absolute;
  left: 2%;
  right: 5%;
  bottom: -5%;
  background: rgba(255, 255, 255, 0.95);
  color: #000000;
  padding: 0.75rem 1rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
  z-index: 15;
  text-align: left;
  max-width: 250px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-left: 3px solid #f97316;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* FAU line hidden by default */
#step1b-fau-line {
  opacity: 0;
  transition: opacity 0.3s ease, stroke-dashoffset 0.3s ease-out;
}

/* SVG Arrow Connector */
.step1b-arrow-connector {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}

#step1b-arrow-line {
  stroke: #00C853;
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s ease-out;
}

#step1b-fiber-line {
  stroke: #E91E63;
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s ease-out;
}

#step1b-align-line {
  stroke: #ff6b00;
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke-dashoffset .3s ease-out;
}

#step1b-fau-line {
  stroke: #ff6b00;
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke-dashoffset .3s ease-out;
}

/* Responsive adjustments for arrow */
@media (max-width: 768px) {
  /* Removed step1b-placeholder-text */
}

@media (max-width: 480px) {
  /* Removed step1b-placeholder-text */
}

/* ============================================
   ALIGNMENT TOLERANCES DISPLAY
   ============================================ */

.alignment-tolerances {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: .5rem;
  flex-wrap: wrap;
  animation: toleranceFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

@keyframes toleranceFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tolerance-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg,
    rgba(255, 107, 0, 0.08) 0%,
    rgba(255, 140, 0, 0.04) 100%);
  border: 2px solid rgba(255, 107, 0, 0.25);
  border-radius: 50px;
  padding: 0.75rem 1.5rem;
  backdrop-filter: blur(10px);
  box-shadow:
    0 4px 20px rgba(255, 107, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tolerance-badge:hover {
  background: linear-gradient(135deg,
    rgba(255, 107, 0, 0.15) 0%,
    rgba(255, 140, 0, 0.08) 100%);
  border-color: rgba(255, 107, 0, 0.45);
  transform: translateY(-3px);
  box-shadow:
    0 8px 30px rgba(255, 107, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.tolerance-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff6b00, #ff8c42);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(255, 107, 0, 0.4);
}

.tolerance-icon svg {
  width: 16px;
  height: 16px;
  stroke: white;
}

.tolerance-label {
  font-family: 'JetBrains Mono', 'Rajdhani', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
}

.tolerance-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ff6b00;
  text-shadow: 0 1px 2px rgba(255, 107, 0, 0.2);
}

/* Responsive tolerance badges */
@media (max-width: 768px) {
  .alignment-tolerances {
    gap: 1rem;
    margin-top: 1.25rem;
  }

  .tolerance-badge {
    padding: 0.6rem 1.2rem;
    gap: 0.6rem;
  }

  .tolerance-icon {
    width: 24px;
    height: 24px;
  }

  .tolerance-icon svg {
    width: 14px;
    height: 14px;
  }

  .tolerance-label {
    font-size: 0.65rem;
  }

  .tolerance-value {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .alignment-tolerances {
    flex-direction: column;
    gap: 0.75rem;
  }

  .tolerance-badge {
    padding: 0.5rem 1rem;
    width: fit-content;
  }

  .tolerance-icon {
    width: 22px;
    height: 22px;
  }

  .tolerance-icon svg {
    width: 12px;
    height: 12px;
  }

  .tolerance-label {
    font-size: 0.6rem;
  }

  .tolerance-value {
    font-size: 1rem;
  }
}
