/* ============================================
   MICRO-INTERACTIONS CSS — Pythonia
   Subtle polish: hover feedback, focus states,
   footer enhancements. No gimmicks.
   ============================================ */

:root {
  --mi-purple: #a855f7;
  --mi-purple-light: rgba(168, 85, 247, 0.15);
  --mi-purple-glow: rgba(168, 85, 247, 0.4);
  --mi-transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --mi-transition-fast: 0.2s ease;
}

/* ============================================
   Buttons: Lift on hover, press on click
   Only adds transform + shadow — preserves
   existing Tailwind color/bg transitions.
   ============================================ */
a.btn,
button[type="submit"],
.btn-primary,
.btn-outline-primary,
a[href*="checkout"],
a[href*="enroll"],
.cta-button {
  transition-property: transform, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

a.btn:hover,
button[type="submit"]:hover,
.btn-primary:hover,
.btn-outline-primary:hover,
a[href*="checkout"]:hover,
a[href*="enroll"]:hover,
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
}

a.btn:active,
button[type="submit"]:active,
.btn-primary:active,
.btn-outline-primary:active,
a[href*="checkout"]:active,
a[href*="enroll"]:active,
.cta-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ============================================
   Cards: Depth on hover
   Only target known card classes — no broad
   attribute selectors. Shadow only, no transform
   to avoid conflicts with Tailwind transforms.
   ============================================ */
.tile,
.card,
.tech-card,
.card-shadow {
  transition: box-shadow var(--mi-transition);
}

.tile:hover,
.card:hover,
.tech-card:hover,
.card-shadow:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Links: Animated underline (footer)
   ============================================ */
.footer-custom a:not(.btn),
.mi-link-animated {
  position: relative;
  display: inline-block;
  text-decoration: none;
  transition: color var(--mi-transition-fast);
}

.footer-custom a:not(.btn)::after,
.mi-link-animated::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--mi-purple);
  transition: width var(--mi-transition);
}

.footer-custom a:not(.btn):hover::after,
.mi-link-animated:hover::after {
  width: 100%;
}

/* ============================================
   Focus states (accessibility)
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--mi-purple);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================
   Smoother AOS transitions
   ============================================ */
[data-aos="fade-up"] {
  transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* ============================================
   Footer enhancements
   ============================================ */

/* Gradient separator */
.footer-custom::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--mi-purple), #7c3aed, var(--mi-purple), transparent);
}

/* Social icons hover */
.footer-custom .btn-floating {
  transition: transform var(--mi-transition), background-color var(--mi-transition), box-shadow var(--mi-transition);
}

.footer-custom .btn-floating:hover {
  transform: scale(1.15) rotate(-5deg);
  background-color: var(--mi-purple) !important;
  border-color: var(--mi-purple) !important;
  box-shadow: 0 0 12px var(--mi-purple-glow);
}

/* ============================================
   Hero Tilt 3D + Float
   ============================================ */
.hero-tilt {
  perspective: 1000px;
  display: inline-block;
}

.hero-tilt__inner {
  transition: transform 0.15s ease-out;
  will-change: transform;
  transform-style: preserve-3d;
}

/* Gentle floating at rest */
@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-tilt__inner.is-floating {
  animation: float-gentle 4s ease-in-out infinite;
}

/* Light reflex overlay */
.hero-tilt__glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.25), transparent 60%);
}

.hero-tilt:hover .hero-tilt__glare {
  opacity: 1;
}

/* ============================================
   Reveal Images on Scroll
   ============================================ */
.reveal-image-wrapper {
  position: relative;
  overflow: hidden;
}

.reveal-image-wrapper img {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-image-wrapper.is-revealed img {
  clip-path: inset(0);
}

.reveal-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(168, 85, 247, 0.15), transparent 60%);
  opacity: 1;
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

.reveal-image-wrapper.is-revealed::after {
  opacity: 0;
}

/* ============================================
   Gradient Text Animation
   ============================================ */
.gradient-text-animated {
  background: linear-gradient(90deg, #db2777, #7c3aed, #db2777);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 4s linear infinite;
}

@keyframes gradient-shift {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ============================================
   Badge Glow Pulse
   ============================================ */
@keyframes badge-glow {
  0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
  50% { box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3), 0 0 8px rgba(168, 85, 247, 0.15); }
}

.badge-glow {
  animation: badge-glow 3s ease-in-out infinite;
}

/* ============================================
   Pain Point Icon Pulse on Hover
   ============================================ */
.pain-card:hover .pain-card__icon {
  animation: icon-pulse 0.6s ease-in-out;
}

@keyframes icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ============================================
   Hero Carousel
   ============================================ */
.hero-carousel {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 4 / 3;
  min-height: 320px;
  overflow: hidden;
  border-radius: 1rem;
}

.hero-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: translateX(12px);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-carousel__slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
}

/* Navigation dots — below carousel */
.hero-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-top: 14px;
}

.hero-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #d1d5db;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  padding: 0;
}

.hero-carousel__dot:hover {
  background: #9ca3af;
  border-color: #9ca3af;
}

.hero-carousel__dot.is-active {
  width: 12px;
  height: 12px;
  background: var(--mi-purple);
  border-color: var(--mi-purple);
  transform: scale(1.2);
  box-shadow: 0 0 8px var(--mi-purple-glow);
}

/* Floating badges */
.hero-carousel__float {
  position: absolute;
  background: white;
  border-radius: 10px;
  padding: 6px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  z-index: 5;
  animation: float-gentle 3.5s ease-in-out infinite;
}

.hero-carousel__float--tr {
  top: 12px;
  right: 12px;
  animation-delay: 0s;
}

.hero-carousel__float--bl {
  bottom: 16px;
  left: 12px;
  animation-delay: -1.5s;
}

.hero-carousel__float--br {
  bottom: 16px;
  right: 12px;
  animation-delay: -1s;
}

/* Tech grid (slide 2) */
.hero-carousel__tech-grid {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #111827, #1f2937);
  border-radius: 1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 12px;
  padding: 32px 24px;
  align-items: center;
  justify-items: center;
}

.hero-carousel__tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-carousel__tech-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.hero-carousel__tech-item:hover .hero-carousel__tech-icon {
  transform: scale(1.1);
}

/* Testimonial card (slide 3) */
.hero-carousel__testimonial {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: white;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  max-width: 220px;
  z-index: 5;
  animation: float-gentle 4s ease-in-out infinite;
  animation-delay: -0.5s;
}

/* ============================================
   Career Path Quiz
   ============================================ */
.career-quiz {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 2rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.career-quiz__progress-wrap {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.career-quiz__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.career-quiz__step {
  display: none;
}

.career-quiz__step.is-active {
  display: block;
  animation: quiz-fade-in 0.4s ease;
}

@keyframes quiz-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.career-quiz__question {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

.career-quiz__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .career-quiz__options {
    grid-template-columns: 1fr;
  }
}

.career-quiz__option {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #e5e7eb;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  text-align: left;
}

.career-quiz__option:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
}

.career-quiz__option:active {
  transform: translateY(0);
}

.career-quiz__option.is-selected {
  background: rgba(168, 85, 247, 0.2);
  border-color: #a855f7;
}

/* Result card */
.career-quiz__result-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 1rem;
  padding: 1.5rem;
}

.career-quiz__result-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.career-quiz__result-modules li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d1d5db;
  font-size: 0.9rem;
}

.career-quiz__result-modules li::before {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  color: #a855f7;
  font-size: 0.75rem;
}

/* ============================================
   Reduced motion — scoped to micro-interactions
   only. Does NOT override Bootstrap or AOS.
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  a.btn,
  button[type="submit"],
  .btn-primary,
  .btn-outline-primary,
  a[href*="checkout"],
  a[href*="enroll"],
  .cta-button,
  .tile,
  .card,
  .tech-card,
  .card-shadow,
  .footer-custom a:not(.btn),
  .mi-link-animated,
  .footer-custom .btn-floating {
    transition-duration: 0.01ms !important;
  }

  .hero-tilt__inner.is-floating,
  .gradient-text-animated,
  .badge-glow,
  .hero-carousel__float,
  .hero-carousel__testimonial {
    animation: none !important;
  }

  .hero-carousel__slide {
    transition: none !important;
    transform: none !important;
  }

  .reveal-image-wrapper img {
    clip-path: inset(0) !important;
    transition: none !important;
  }

  .reveal-image-wrapper::after {
    opacity: 0 !important;
    transition: none !important;
  }
}
