/* ============================================
   FEATURES PAGE SECTIONS - Visual Variety
   ============================================ */

/* Timeline Section - Clean stages */
.features-timeline {
  background: var(--color-surface);
  padding: var(--space-4xl) 0;
}

[data-theme="dark"] .features-timeline {
  background: rgba(26, 26, 46, 0.5);
}

.features-timeline__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-2xl);
}

.features-timeline__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.features-timeline__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

[data-theme="dark"] .features-timeline__title {
  color: #FFFFFF;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

/* Timeline stage card with subtle hover lift effect */
/* Contrast: Dark text on white background = WCAG AAA compliant */
.timeline-stage {
  background: rgba(255, 255, 255, 0.95);
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(35, 58, 117, 0.15);
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(35, 58, 117, 0.08);
  scroll-margin-top: 120px; /* Offset for fixed header when scrolling to anchor */
}

[data-theme="dark"] .timeline-stage {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(35, 58, 117, 0.15);
  box-shadow: 0 8px 32px rgba(35, 58, 117, 0.15);
}

/* Removed hover effect - not clickable */

.timeline-stage__number {
  position: absolute;
  top: -18px;
  left: var(--space-xl);
  background: linear-gradient(135deg, #5AB6A0 0%, #233A75 100%);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: var(--text-lg);
  box-shadow: 0 4px 16px rgba(90, 182, 160, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.timeline-stage__illustration {
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 4/3; /* Reserve space to prevent layout shift */
  margin: 0 auto var(--space-lg);
  display: block;
}

.timeline-stage__illustration img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Ensure image doesn't stretch */
  display: block;
}

.timeline-stage__title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  margin-bottom: var(--space-md);
  margin-left: auto;
  margin-right: auto;
  color: rgba(13, 22, 41, 0.95); /* High contrast on light cards */
  margin-top: var(--space-md);
  line-height: 1.4;
  text-align: center;
  width: 100%;
}

[data-theme="dark"] .timeline-stage__title {
  color: rgba(13, 22, 41, 0.95); /* Keep high contrast */
}

.timeline-stage__text {
  font-size: clamp(1rem, 1.5vw, 1.125rem); /* Minimum 16px */
  color: rgba(13, 22, 41, 0.95); /* High contrast on light cards */
  line-height: 1.8; /* Improved line height */
  margin: 0;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
  text-align: center;
  width: 100%;
}

[data-theme="dark"] .timeline-stage__text {
  color: rgba(13, 22, 41, 0.95); /* Keep high contrast */
}

/* Principles Section - Card Grid */
.features-principles {
  background: transparent; /* Remove dark background */
  padding: var(--space-4xl) 0;
  scroll-margin-top: 120px; /* Offset for fixed header when scrolling to anchor */
}

[data-theme="dark"] .features-principles {
  background: transparent; /* Remove dark background */
}

.features-principles__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-2xl);
}

.features-principles__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.features-principles__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

[data-theme="dark"] .features-principles__title {
  color: #FFFFFF;
}

.features-principles__subtitle {
  font-size: clamp(1.125rem, 2vw, 1.25rem); /* Minimum 18px */
  color: var(--color-text-secondary); /* White text on dark background is correct */
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 400;
}

[data-theme="dark"] .features-principles__subtitle {
  color: var(--color-text-secondary); /* Keep white text */
}

.principles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl);
  justify-content: center;
  align-items: stretch;
}

html[data-theme="dark"] .features-principles .principles-grid .principle-card,
.features-principles .principles-grid .principle-card,
.principle-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 calc(33.333% - var(--space-xl));
  min-width: 320px;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.95) !important; /* Light background for contrast */
  background-color: rgba(255, 255, 255, 0.95) !important;
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(35, 58, 117, 0.15);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(35, 58, 117, 0.08);
}

/* Removed hover effect - not clickable */

.principle-card__icon {
  width: 70px;
  height: 70px;
  background: transparent;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Removed transition - not clickable */
}

.principle-card__icon svg {
  stroke: url(#icon-gradient);
  width: 48px;
  height: 48px;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Removed hover effect - not clickable */

.principle-card__title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  margin-bottom: var(--space-md);
  margin-left: auto;
  margin-right: auto;
  color: rgba(13, 22, 41, 0.95); /* High contrast for accessibility */
  line-height: 1.4;
  text-align: center;
  width: 100%;
}

[data-theme="dark"] .principle-card__title {
  color: #0d1629; /* Keep dark text even in dark theme */
}

.principle-card__text {
  font-size: clamp(1rem, 1.5vw, 1.125rem); /* Minimum 16px */
  color: rgba(13, 22, 41, 0.95); /* Higher contrast for accessibility */
  line-height: 1.8; /* Improved line height */
  margin: 0;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
  text-align: center;
  width: 100%;
}

[data-theme="dark"] .principle-card__text {
  color: rgba(13, 22, 41, 0.95); /* Keep high contrast */
}

/* Responsive */
@media (max-width: 768px) {
  .features-timeline,
  .features-principles {
    padding: var(--space-2xl) 0;
  }
  
  .features-timeline__container,
  .features-principles__container {
    padding: 0 var(--space-md);
  }
  
  .features-timeline__header,
  .features-principles__header {
    margin-bottom: var(--space-xl);
    padding: 0 var(--space-sm);
  }
  
  .timeline-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: 0 var(--space-sm);
    margin-left: 0;
    margin-right: 0;
  }
  
  .timeline-stage {
    padding: var(--space-lg);
  }

  .timeline-stage__illustration {
    max-width: 200px;
    margin-bottom: var(--space-md);
  }

  .timeline-stage__title {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    margin-bottom: var(--space-xs);
    margin-top: var(--space-sm);
  }
  
  .timeline-stage__text {
    font-size: clamp(0.9375rem, 3vw, 1rem);
    margin-bottom: 0;
    line-height: 1.7;
  }
  
  .principles-grid {
    flex-direction: column;
    gap: var(--space-md);
    padding: 0 var(--space-sm);
    margin-left: 0;
    margin-right: 0;
  }
  
  .principle-card {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
    padding: var(--space-lg) !important;
  }
  
  .principle-card__icon {
    width: 60px;
    height: 60px;
    margin-bottom: var(--space-sm);
    margin-left: auto;
    margin-right: auto;
  }
  
  .principle-card__icon svg {
    width: 40px;
    height: 40px;
  }
  
  .principle-card__title {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    margin-bottom: var(--space-xs);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    width: 100%;
  }
  
  .principle-card__text {
    font-size: clamp(0.9375rem, 3vw, 1rem);
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    text-align: center;
    width: 100%;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .timeline-grid {
    gap: var(--space-lg);
  }
  
  .principle-card {
    flex: 0 0 calc(50% - var(--space-xl));
    min-width: 280px;
    max-width: 100%;
  }
}

/* Respect user's motion preferences for accessibility */
@media (prefers-reduced-motion: reduce) {
  .timeline-stage,
  .timeline-stage:hover,
  .principle-card,
  .principle-card:hover,
  .principle-card__icon-wrapper {
    transition: none;
    transform: none;
    animation: none;
  }
}

