/**
 * Custom CSS - SkillExpert.it
 * Stili personalizzati per video hero e altre customizzazioni
 */

/* ========================================
   HERO VIDEO BACKGROUND
   ======================================== */

.hero-video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.3) 0%,
    rgba(15, 23, 42, 0.5) 50%,
    rgba(15, 23, 42, 0.7) 100%
  );
  pointer-events: none;
}

/* Assicura che il contenuto hero sia sopra il video */
.hero-section {
  position: relative;
  background: transparent !important;
}

/* Rimuovi qualsiasi background esistente che possa coprire il video */
.hero-section::before,
.hero-section::after {
  display: none !important;
}

.hero-section > *:not(.hero-video-wrapper) {
  position: relative;
  z-index: 1;
}

/* Assicura trasparenza su tutti i contenitori hero */
.hero-container,
.hero-content {
  background: transparent !important;
}

/* Forza visibilità video */
.hero-video-wrapper {
  z-index: 0 !important;
}

.hero-video {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Fallback per browser che non supportano video */
@supports not (object-fit: cover) {
  .hero-video {
    display: none;
  }

  .hero-video-wrapper {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  }
}

/* Riduce qualità su mobile per performance */
@media (max-width: 768px) {
  .hero-video {
    /* Su mobile usa un poster statico se il video è troppo pesante */
    filter: brightness(0.9);
  }

  .hero-video-overlay {
    background: linear-gradient(
      180deg,
      rgba(15, 23, 42, 0.4) 0%,
      rgba(15, 23, 42, 0.6) 50%,
      rgba(15, 23, 42, 0.75) 100%
    );
  }
}

/* Animazione fade-in per il video */
.hero-video {
  animation: fadeInVideo 1.5s ease-out;
}

@keyframes fadeInVideo {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========================================
   PROCESS VIDEO SEAMLESS
   Sezione "Come Lavoro" - Video full-width
   ======================================== */

/* Section */
.process-section-video {
  display: block !important;
  position: relative;
  padding: 0 !important;
  background: #0f172a !important;
  overflow: hidden;
}

/* Rimuovi pseudo-elementi che potrebbero coprire */
.process-section-video::before,
.process-section-video::after {
  display: none !important;
}

/* Header della sezione - matches video GradientMesh background */
.process-section-video .process-header {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 5rem 2rem 3rem;
  background: #0f172a;
}

.process-section-video .process-label {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.process-section-video .process-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.process-section-video .process-subtitle {
  font-family: 'Noto Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Full-width Video Container */
.process-video-fullwidth {
  display: block !important;
  width: 100%;
  position: relative;
}

/* Video element - full width */
.process-video-native {
  display: block !important;
  width: 100% !important;
  height: auto;
}

/* ========================================
   PROCESS VIDEO/STATIC TOGGLE STATES
   ======================================== */

/* Static container - hidden by default */
.process-static-container {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When video has ended - hide video, show static */
.process-section-video.video-ended .process-video-fullwidth {
  display: none;
}

.process-section-video.video-ended .process-static-container {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   PROCESS STATIC STEPS
   ======================================== */

.process-static-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

/* Header */
.process-static-header {
  text-align: center;
  margin-bottom: 4rem;
}

.process-static-label {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 50px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.process-static-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

/* Steps Grid */
.process-static-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

/* Step Card */
.process-static-card {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 20px;
  padding: 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.process-static-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

/* Step Number */
.process-static-number {
  position: absolute;
  top: -12px;
  right: 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  color: rgba(99, 102, 241, 0.1);
  line-height: 1;
  pointer-events: none;
}

/* Step Icon */
.process-static-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.process-static-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}

.process-static-icon-primary {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.process-static-icon-accent {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
}

.process-static-icon-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

/* Step Content */
.process-static-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 0.75rem;
}

.process-static-card-desc {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* Checklist */
.process-static-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.process-static-checklist li {
  position: relative;
  padding-left: 1.5rem;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.875rem;
  color: #cbd5e1;
  line-height: 1.8;
}

.process-static-checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

/* Duration Badge */
.process-static-duration {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(51, 65, 85, 0.5);
  border-radius: 20px;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #94a3b8;
}

/* CTA */
.process-static-cta {
  text-align: center;
}

.process-static-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 50px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.5);
}

.process-static-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px -10px rgba(99, 102, 241, 0.6);
}

.process-static-cta-btn svg {
  width: 20px;
  height: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
  .process-static-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .process-static-card {
    padding: 1.75rem;
  }
}

@media (max-width: 768px) {
  .process-static-wrapper {
    padding: 3rem 1.5rem;
  }

  .process-static-header {
    margin-bottom: 2.5rem;
  }

  .process-static-grid {
    gap: 1.5rem;
  }

  .process-static-number {
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .process-static-wrapper {
    padding: 2rem 1rem;
  }

  .process-static-card {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .process-static-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .process-static-icon svg {
    width: 24px;
    height: 24px;
  }

  .process-static-cta-btn {
    padding: 14px 28px;
    font-size: 0.95rem;
  }
}
