/* ============================================
   PATH OF EXCELLENCE - HOME PAGE STYLES
   ============================================ */

/* Hero section gradient */
.hero-section {
  background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
}

/* ============================================
   FEATURE CARD FLIP ANIMATION
   ============================================ */

.feature-card {
  perspective: 1000px;
  height: 250px;
}

.feature-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

.feature-card:hover .feature-card-inner {
  transform: rotateY(180deg);
}

.feature-card-front, .feature-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-card-front {
  background: white;
  border: 2px solid #f8f9fa;
}

.feature-card-back {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  transform: rotateY(180deg);
}

.feature-card-back h4 {
  color: white !important;
}

.feature-card-back p {
  color: rgba(255,255,255,0.9) !important;
}

.feature-card-back .feature-icon {
  background: rgba(255,255,255,0.2) !important;
  color: white !important;
}

/* ============================================
   HOW IT WORKS ANIMATIONS
   ============================================ */

.how-it-works-section {
  overflow: hidden;
}

.step-item {
  opacity: 0;
  transform: translateY(50px);
  animation: slideInUp 0.8s ease forwards;
}

.step-item:nth-child(1) { animation-delay: 0.2s; }
.step-item:nth-child(2) { animation-delay: 0.4s; }
.step-item:nth-child(3) { animation-delay: 0.6s; }
.step-item:nth-child(4) { animation-delay: 0.8s; }

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-circle {
  transition: all 0.3s ease;
  cursor: pointer;
}

.step-circle:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.step-circle.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.step-title {
  transition: all 0.3s ease;
  transform: translateX(-20px);
  opacity: 0;
  animation: slideInLeft 0.6s ease forwards;
}

.step-item:nth-child(1) .step-title { animation-delay: 0.4s; }
.step-item:nth-child(2) .step-title { animation-delay: 0.6s; }
.step-item:nth-child(3) .step-title { animation-delay: 0.8s; }
.step-item:nth-child(4) .step-title { animation-delay: 1.0s; }

@keyframes slideInLeft {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.step-description {
  transition: all 0.3s ease;
  transform: translateX(20px);
  opacity: 0;
  animation: slideInRight 0.6s ease forwards;
}

.step-item:nth-child(1) .step-description { animation-delay: 0.6s; }
.step-item:nth-child(2) .step-description { animation-delay: 0.8s; }
.step-item:nth-child(3) .step-description { animation-delay: 1.0s; }
.step-item:nth-child(4) .step-description { animation-delay: 1.2s; }

@keyframes slideInRight {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Floating animation for circles */
.step-circle.float {
  animation: float 3s ease-in-out infinite;
}

.step-item:nth-child(1) .step-circle.float { animation-delay: 0s; }
.step-item:nth-child(2) .step-circle.float { animation-delay: 0.5s; }
.step-item:nth-child(3) .step-circle.float { animation-delay: 1s; }
.step-item:nth-child(4) .step-circle.float { animation-delay: 1.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Connecting lines animation */
.step-connector {
  position: absolute;
  top: 40px;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #dc3545, #28a745, #ffc107, #17a2b8);
  transform: translateX(-50%);
  animation: drawLine 2s ease forwards;
  animation-delay: 1.5s;
}

@keyframes drawLine {
  to { width: 75%; }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .hero-section {
    min-height: 520px !important;
    text-align: center;
    padding-top: 3rem;
  }

  .hero-section .display-3 {
    font-size: 2.5rem;
  }

  .hero-section .lead {
    font-size: 1.05rem;
  }

  .feature-card {
    height: auto;
  }
  
  .feature-card-inner,
  .feature-card-front,
  .feature-card-back {
    position: static;
    transform: none !important;
    height: auto;
    box-shadow: none;
    padding: 1.75rem;
  }

  .feature-card-back {
    display: none;
  }
  
  .step-connector {
    display: none !important;
  }

  .step-item {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding-bottom: 3rem;
  }

  .hero-section .display-3 {
    font-size: 2.1rem;
  }

  .hero-section .lead {
    font-size: 1rem;
  }

  .hero-section .d-flex {
    justify-content: center;
    gap: 0.75rem;
  }

  .feature-card-front {
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  }

  .step-item {
    text-align: center;
  }

  .step-circle {
    margin: 0 auto;
  }

  .step-title,
  .step-description {
    transform: none !important;
    opacity: 1 !important;
    animation: none !important;
  }

  #courses .card {
    border-radius: 1rem;
  }

  #courses .card-body {
    padding: 1.25rem;
  }
}
