/**
 * INTERACTIVE STORYTELLING - BOLD, APPLE-STYLE DESIGN
 * Phase 3 Day 6-7: Making the website shine like the brightest star
 * 
 * Features:
 * - Client Success Stories (interactive case studies)
 * - Innovation Journey Timeline
 * - Problem-Solution Narrative Explorer
 * - Before/After Visualizations
 * - Shareable Results
 * - Downloadable Case Studies
 */

/* ============================================
   CLIENT SUCCESS STORIES - INTERACTIVE CASE STUDIES
   ============================================ */

.success-stories-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 30%, #2d3561 60%, #00d4ff 100%) !important;
  background-color: transparent !important;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

.success-stories-header {
  text-align: center;
  margin-bottom: 80px;
}

.success-stories-header h2 {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 24px;
  /* Soft cyan/blue like the 2026 AI sections */
  color: #7dd3fc !important;
  opacity: 1 !important;
  visibility: visible !important;
  /* Stronger, crisp shadow to make it pop */
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.85), 0 0 4px rgba(0, 212, 255, 0.65);
  display: block !important;
}

.success-stories-header p {
  font-size: 20px;
  color: #c9e4ff;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Story Cards Grid */
.success-stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.success-story-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.success-story-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 212, 255, 0.3);
  border-color: #00d4ff;
}

.story-card-header {
  padding: 40px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 85, 159, 0.1) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.story-industry {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid #00d4ff;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #00d4ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.story-title {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff !important;
  margin-bottom: 16px;
  line-height: 1.3;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none; /* Remove blur */
}

.story-subtitle {
  font-size: 16px;
  color: #c9e4ff !important;
  line-height: 1.5;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none; /* Remove blur */
}

.story-card-body {
  padding: 40px;
}

.story-challenge {
  margin-bottom: 32px;
}

.story-challenge-label {
  font-size: 13px;
  font-weight: 700;
  color: #ff6b6b;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.story-challenge-text {
  font-size: 15px;
  color: #c9e4ff;
  line-height: 1.6;
}

/* Before/After Metrics Visualization */
.story-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0;
  padding: 24px;
  background: rgba(5, 10, 30, 0.9); /* Solid dark for maximum contrast */
  border-radius: 16px;
  border: 1px solid rgba(0, 212, 255, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* CRITICAL OVERRIDE:
   main.css applies gradient-text rules to `.metric-value` (background-clip + transparent fill).
   For Success Stories we need SOLID, readable text. */
.success-stories-section .metric-label,
.success-stories-section .metric-description,
.success-stories-section .metric-value {
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
}

.success-stories-section .metric-before .metric-value {
  -webkit-text-fill-color: #ff3333 !important;
}

.success-stories-section .metric-after .metric-value {
  -webkit-text-fill-color: #00ff66 !important;
}

.metric-item {
  text-align: center;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

.metric-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  color: #a6d8ff !important; /* brighter light blue */
  text-shadow: none;
}

.metric-before .metric-label {
  color: #ff6b6b !important;
}

.metric-after .metric-label {
  color: #00ff66 !important;
}

.metric-value {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 4px;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); /* tiny shadow for edge clarity */
}

.metric-before .metric-value {
  color: #ff3333 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.metric-after .metric-value {
  color: #00ff66 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.metric-description {
  font-size: 13px;
  color: #c9e4ff !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none; /* Remove all shadows */
}

/* Solution Highlights */
.story-solution {
  margin-bottom: 32px;
}

.story-solution-label {
  font-size: 13px;
  font-weight: 700;
  color: #00d4ff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.solution-points {
  list-style: none;
  padding: 0;
  margin: 0;
}

.solution-points li {
  padding: 12px 0 12px 32px;
  position: relative;
  color: #c9e4ff;
  font-size: 15px;
  line-height: 1.5;
}

.solution-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #00ff66;
  font-weight: 900;
  font-size: 18px;
}

/* Card Actions */
.story-card-actions {
  display: flex;
  gap: 12px;
  padding: 32px 40px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.story-action-btn {
  flex: 1;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.story-action-primary {
  background: linear-gradient(135deg, #00d4ff 0%, #0088cc 100%);
  color: #0a0e27;
  border: none;
}

.story-action-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.4);
}

.story-action-secondary {
  background: transparent;
  color: #00d4ff;
  border: 2px solid #00d4ff;
}

.story-action-secondary:hover {
  background: rgba(0, 212, 255, 0.1);
  transform: translateY(-2px);
}

/* ============================================
   INNOVATION JOURNEY TIMELINE
   ============================================ */

.innovation-journey-section {
  padding: 100px 0;
  background: #ffffff;
  position: relative;
}

.journey-header {
  text-align: center;
  margin-bottom: 80px;
}

.journey-header h2 {
  font-size: 48px;
  font-weight: 900;
  color: #0b2540;
  margin-bottom: 24px;
}

.journey-header p {
  font-size: 20px;
  color: #4a5568;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Interactive Timeline */
.timeline-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #00d4ff 0%, #0b2540 100%);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-item {
  position: relative;
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.timeline-item:nth-child(odd) .timeline-content {
  margin-right: calc(50% + 60px);
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: calc(50% + 60px);
  text-align: left;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 0;
  width: 32px;
  height: 32px;
  background: #00d4ff;
  border: 4px solid #ffffff;
  border-radius: 50%;
  transform: translate(-50%, 0);
  z-index: 2;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
  transform: translate(-50%, 0) scale(1.3);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.8);
}

.timeline-content {
  background: #f7f9fc;
  padding: 40px;
  border-radius: 24px;
  border: 2px solid #e4edf7;
  transition: all 0.4s ease;
  cursor: pointer;
}

.timeline-content:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 60px rgba(0, 85, 159, 0.15);
  border-color: #00d4ff;
}

.timeline-date {
  display: inline-block;
  padding: 8px 16px;
  background: #00d4ff;
  color: #ffffff;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.timeline-title {
  font-size: 24px;
  font-weight: 800;
  color: #0b2540;
  margin-bottom: 16px;
  line-height: 1.3;
}

.timeline-description {
  font-size: 16px;
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 20px;
}

.timeline-impact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid #00ff66;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #00aa44;
}

/* ============================================
   PROBLEM-SOLUTION NARRATIVE EXPLORER
   ============================================ */

.problem-solution-section {
  padding: 100px 0;
  /* Match 2026 AI Innovations */
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 30%, #2d3561 60%, #00d4ff 100%) !important;
  background-color: transparent !important;
  position: relative;
  color: #ffffff;
}

.problem-solution-header {
  text-align: center;
  margin-bottom: 80px;
}

.problem-solution-header h2 {
  font-size: 48px;
  font-weight: 900;
  color: #7dd3fc;
  margin-bottom: 24px;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.85), 0 0 6px rgba(0, 212, 255, 0.55);
}

.problem-solution-header p {
  font-size: 20px;
  color: #cfe9ff;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 2px 6px rgba(0,0,0,0.55);
}

/* Interactive Problem Cards (namespaced to avoid collisions with existing `.problem-card` styles) */
.problem-explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto 80px;
  padding: 0 20px;
}

.ps-problem-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 24px;
  padding: 40px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.ps-problem-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #ff6b6b 0%, #ff3333 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ps-problem-card:hover::before,
.ps-problem-card.active::before {
  opacity: 1;
}

.ps-problem-card:hover,
.ps-problem-card.active {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 26px 90px rgba(0, 212, 255, 0.25), 0 30px 80px rgba(0,0,0,0.35);
  border-color: rgba(0, 212, 255, 0.85);
  background: rgba(255, 255, 255, 0.09);
}

.ps-problem-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.95) 0%, rgba(0, 136, 204, 0.95) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.35);
}

.ps-problem-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.ps-problem-description {
  font-size: 15px;
  color: #cfe9ff;
  line-height: 1.6;
  margin-bottom: 24px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.45);
}

.ps-problem-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.5);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #7dd3fc;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Solution Visualizer */
.ps-solution-visualizer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px;
  background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 30%, #2d3561 60%, #00d4ff 100%) !important;
  background-color: transparent !important;
  border-radius: 32px;
  color: #ffffff !important;
  display: none;
  animation: slideIn 0.5s ease;
  opacity: 1 !important;
  visibility: visible !important;
  min-height: 400px !important;
  position: relative;
  z-index: 1;
}

.ps-solution-visualizer.active,
.ps-solution-visualizer.is-active {
  display: block !important;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.solution-header {
  text-align: center;
  margin-bottom: 60px;
}

.solution-label {
  display: inline-block;
  padding: 10px 20px;
  background: rgba(0, 212, 255, 0.2);
  border: 1px solid #00d4ff;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  color: #00d4ff !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
  opacity: 1 !important;
  visibility: visible !important;
}

.solution-title {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 20px;
  /* Solid, readable */
  color: #7dd3fc !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.solution-description {
  font-size: 18px;
  color: #c9e4ff !important;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none; /* Remove blur */
}

.solution-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 60px;
}

.solution-feature {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px;
  padding: 32px;
  transition: all 0.3s ease;
  opacity: 1 !important;
  visibility: visible !important;
}

.solution-feature:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: #00d4ff !important;
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #00d4ff 0%, #0088cc 100%) !important;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
  opacity: 1 !important;
  visibility: visible !important;
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff !important;
  margin-bottom: 12px;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none; /* Remove blur */
}

.feature-description {
  font-size: 15px;
  color: #c9e4ff !important;
  line-height: 1.5;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none; /* Remove blur */
}

/* Impact Calculator CTA */
.impact-calculator-cta {
  margin-top: 60px;
  text-align: center;
  padding-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.impact-calculator-cta h3 {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff !important;
  margin-bottom: 20px;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none; /* Remove blur */
}

.impact-calculator-cta p {
  font-size: 16px;
  color: #c9e4ff !important;
  margin-bottom: 32px;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none; /* Remove blur */
}

.calculate-impact-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  background: linear-gradient(135deg, #00d4ff 0%, #0088cc 100%) !important;
  color: #0a0e27 !important;
  font-size: 16px;
  font-weight: 700;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.4);
  opacity: 1 !important;
  visibility: visible !important;
}

.calculate-impact-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(0, 212, 255, 0.6);
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 768px) {
  .success-stories-header h2,
  .journey-header h2,
  .problem-solution-header h2 {
    font-size: 36px;
  }

  .success-stories-grid,
  .problem-explorer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .timeline-line {
    left: 20px;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin: 0 0 0 60px;
    text-align: left;
  }

  .timeline-marker {
    left: 20px;
  }

  .solution-visualizer {
    padding: 32px 20px;
  }

  .solution-features {
    grid-template-columns: 1fr;
  }

  .story-card-actions {
    flex-direction: column;
  }
}

/* ============================================
   PRINT STYLES FOR DOWNLOADABLE PDFS
   ============================================ */

@media print {
  .success-story-card,
  .timeline-item,
  .problem-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  .story-action-btn,
  .calculate-impact-btn {
    display: none;
  }
}

