/**
 * ELIO SOLAR - HOW IT WORKS SECTION
 * 3-step process visualization
 * Version: 1.0
 */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */

:root {
  /* Section */
  --hiw-padding: 80px;
  --hiw-padding-mobile: 60px;
  --hiw-bg: #f8fafc;
  --hiw-max-width: 1200px;

  /* Steps */
  --step-number-size: 80px;
  --step-number-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --step-card-bg: white;
  --step-card-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  --step-card-border-radius: 24px;
  --step-card-padding: 40px;

  /* Connector Line */
  --connector-color: #e5e7eb;
  --connector-active: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

/* ============================================
   HOW IT WORKS CONTAINER
   ============================================ */

.how-it-works {
  background: var(--hiw-bg);
  padding: var(--hiw-padding) 32px;
  position: relative;
}

.hiw-container {
  max-width: var(--hiw-max-width);
  margin: 0 auto;
}

/* ============================================
   SECTION HEADER
   ============================================ */

.hiw-header {
  text-align: center;
  margin-bottom: 64px;
}

.hiw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.hiw-title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin: 0 0 16px 0;
}

.hiw-subtitle {
  font-size: 18px;
  color: #64748b;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   STEPS GRID
   ============================================ */

.hiw-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  position: relative;
}

/* Connector Line Between Steps */
.hiw-steps::before {
  content: '';
  position: absolute;
  top: calc(var(--step-number-size) / 2);
  left: calc(16.666% + var(--step-number-size) / 2);
  right: calc(16.666% + var(--step-number-size) / 2);
  height: 3px;
  background: var(--connector-color);
  z-index: 0;
}

/* ============================================
   STEP CARD
   ============================================ */

.hiw-step {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Step Number Circle */
.hiw-step-number {
  width: var(--step-number-size);
  height: var(--step-number-size);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 900;
  color: white;
  background: var(--step-number-gradient);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
  position: relative;
  transition: all 0.3s ease;
}

.hiw-step-number::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: white;
  z-index: -1;
}

.hiw-step:hover .hiw-step-number {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4);
}

/* Step Content Card */
.hiw-step-content {
  background: var(--step-card-bg);
  border-radius: var(--step-card-border-radius);
  padding: var(--step-card-padding);
  box-shadow: var(--step-card-shadow);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  width: 100%;
}

.hiw-step:hover .hiw-step-content {
  transform: translateY(-8px);
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.12);
  border-color: #3b82f6;
}

/* Step Icon */
.hiw-step-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  transition: transform 0.3s ease;
}

.hiw-step:hover .hiw-step-icon {
  transform: scale(1.1);
}

/* Step Title */
.hiw-step-title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 12px 0;
}

/* Step Description */
.hiw-step-desc {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

/* Step Details List */
.hiw-step-details {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.hiw-step-detail {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #64748b;
  margin-bottom: 8px;
  padding-left: 0;
}

.hiw-step-detail:last-child {
  margin-bottom: 0;
}

.hiw-step-detail::before {
  content: '✓';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

/* ============================================
   BOTTOM CTA
   ============================================ */

.hiw-cta {
  margin-top: 64px;
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.hiw-cta-text {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 20px 0;
}

.hiw-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 40px;
  font-size: 18px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hiw-cta-button:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 48px rgba(59, 130, 246, 0.6);
  color: white;
}

.hiw-cta-button:active {
  transform: translateY(-2px) scale(0.98);
}

.hiw-cta-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.hiw-cta-button:hover .hiw-cta-icon {
  transform: translateX(4px);
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 1023px) {
  :root {
    --hiw-padding: 60px;
    --step-card-padding: 32px;
  }

  .hiw-title {
    font-size: 36px;
  }

  .hiw-steps {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hiw-steps::before {
    display: none;
  }

  /* Vertical connector line for mobile */
  .hiw-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: calc(var(--step-number-size) + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: calc(100% - var(--step-number-size) - 12px);
    background: var(--connector-color);
    z-index: 0;
  }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 640px) {
  :root {
    --hiw-padding: var(--hiw-padding-mobile);
    --step-number-size: 64px;
    --step-card-padding: 24px;
  }

  .how-it-works {
    padding: var(--hiw-padding-mobile) 20px;
  }

  .hiw-eyebrow {
    font-size: 11px;
    padding: 6px 16px;
  }

  .hiw-title {
    font-size: 28px;
  }

  .hiw-subtitle {
    font-size: 16px;
  }

  .hiw-step-number {
    font-size: 24px;
  }

  .hiw-step-icon {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }

  .hiw-step-title {
    font-size: 20px;
  }

  .hiw-cta {
    padding: 32px 20px;
  }

  .hiw-cta-text {
    font-size: 18px;
  }

  .hiw-cta-button {
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .how-it-works {
    background: white;
    padding: 40px 20px;
  }

  .hiw-steps::before,
  .hiw-step:not(:last-child)::after {
    display: none;
  }

  .hiw-step-content {
    box-shadow: none;
    border: 1px solid #000;
    page-break-inside: avoid;
  }

  .hiw-step:hover .hiw-step-content,
  .hiw-step:hover .hiw-step-number {
    transform: none;
  }

  .hiw-cta-button {
    display: none;
  }
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .hiw-step-number,
  .hiw-step-content,
  .hiw-step-icon,
  .hiw-cta-button {
    transition: none !important;
  }

  .hiw-step:hover .hiw-step-number,
  .hiw-step:hover .hiw-step-content,
  .hiw-step:hover .hiw-step-icon,
  .hiw-cta-button:hover {
    transform: none !important;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus states */
.hiw-cta-button:focus {
  outline: 3px solid #3b82f6;
  outline-offset: 4px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .hiw-step-content {
    border: 2px solid currentColor;
  }

  .hiw-step-number {
    border: 2px solid white;
  }
}
