/* Welcome Page Enhancements - Inspired by humanpal.io, creatify.ai, alivemoment.com */

/* Global Design Enhancements */
.section-divider {
  position: relative;
  height: 100px;
  overflow: hidden;
  margin: -50px 0;
  z-index: 1;
}

.section-divider svg {
  position: absolute;
  width: 100%;
  height: 100px;
  fill: currentColor;
}

.section-divider.light svg {
  color: #f8fafc;
}

.section-divider.dark svg {
  color: #0f172a;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Ensure gradient text stays visible when inline editing is active */
.inline-editing.gradient-text,
.inline-editing .gradient-text {
  background: none !important;
  -webkit-text-fill-color: inherit !important;
  color: inherit !important;
}

/* Gradient Border */
.gradient-border {
  position: relative;
  border-radius: 0.75rem;
  padding: 1px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
}

.gradient-border-content {
  background-color: white;
  border-radius: 0.7rem;
  height: 100%;
}

.dark .gradient-border-content {
  background-color: rgba(30, 41, 59, 0.9);
}

/* Feature Cards */
.feature-card {
  padding: 1.5rem;
  border-radius: 0.75rem;
  background-color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.dark .feature-card {
  background-color: rgba(30, 41, 59, 0.5);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: white;
  font-size: 1.25rem;
}

/* Testimonials */
.testimonial-container {
  padding: 2rem;
  border-radius: 1rem;
  background-color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark .testimonial-container {
  background-color: rgba(30, 41, 59, 0.5);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

.testimonial-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #6366f1;
}

.testimonial-card {
  transition: opacity 0.3s ease;
}

/* FAQ Section */
.faq-item {
  border-bottom: 1px solid rgba(203, 213, 225, 0.5);
  padding: 1.25rem 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer,
.faq-answer.active {
  max-height: 500px;
  padding-top: 1rem;
}

/* Modern card-like surface for FAQ items */
.faq-item.rounded-lg {
  background: rgba(255,255,255,0.6);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.dark .faq-item.rounded-lg {
  background: rgba(30,41,59,0.45);
}

.faq-item.rounded-lg:hover {
  background: rgba(255,255,255,0.75);
}

.dark .faq-item.rounded-lg:hover {
  background: rgba(30,41,59,0.6);
}

/* Chevron rotation for open state */
.faq-question .chev {
  transition: transform 0.25s ease, color 0.25s ease;
}

.faq-question.open .chev {
  transform: rotate(180deg);
  color: #6366f1; /* primary */
}

/* Stats Section */
.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text; /* Added for compatibility */
  color: transparent;    /* Added for compatibility */
  margin-bottom: 0.5rem;
}

/* Before/After Comparison */
.comparison-slider-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #0f172a; /* fallback behind images */
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.15);
}

/* Keep a consistent cinematic aspect ratio */
.comparison-aspect {
  aspect-ratio: 16 / 9;
}

.comparison-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #ffffff, #e2e8f0);
  left: 50%;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 10;
}

.comparison-slider::before {
  content: '';
  position: absolute;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background-color: white;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.comparison-slider:hover::before {
  transform: translate(-50%, -50%) scale(1.05);
}

.comparison-before,
.comparison-after {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.comparison-before img,
.comparison-after img,
.comparison-before video,
.comparison-after video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comparison-before {
  left: 0;
  width: 50%;
}

.comparison-after {
  right: 0;
  width: 50%;
}

/* Labels Avant/Après */
.comparison-label {
  position: absolute;
  top: 12px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9999px;
  backdrop-filter: blur(6px);
}

.comparison-label.before {
  left: 12px;
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
}

.comparison-label.after {
  right: 12px;
  background: rgba(241, 245, 249, 0.6);
  color: #0f172a;
}

.dark .comparison-label.before {
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
}

.dark .comparison-label.after {
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

/* Enhanced Hero Section */
.hero-background {
  position: relative;
  overflow: hidden;
}

.floating-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(30px);
  animation: float 15s infinite ease-in-out;
}

.floating-circle:nth-child(1) {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  top: -100px;
  right: -50px;
  animation-delay: 0s;
}

.floating-circle:nth-child(2) {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  bottom: -50px;
  left: -50px;
  animation-delay: -5s;
}

.floating-circle:nth-child(3) {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  top: 40%;
  left: 20%;
  animation-delay: -10s;
}

/* Animated Cards */
.animated-card {
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.animated-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 80%);
  transform: rotate(30deg);
  transition: all 0.5s ease;
  opacity: 0;
}

.animated-card:hover::before {
  opacity: 1;
  transform: rotate(0deg);
}

.animated-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Pulse Effect */
.pulse-effect {
  position: relative;
}

.pulse-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

/* Staggered Fade In */
.stagger-fade-in {
  opacity: 0;
  transform: translateY(20px);
}

/* Hover Glow Effect */
.hover-glow {
  transition: all 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(10px, -15px);
  }
  50% {
    transform: translate(-5px, 10px);
  }
  75% {
    transform: translate(-15px, -5px);
  }
}

/* Pulsing effect for elements */
.pulse-effect {
  animation: pulse 3s infinite;
}

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

/* ======================== */
/* Video Reel (horizontal)  */
/* ======================== */
.video-reel {
  position: relative;
}

.video-reel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  gap: 12px;
  padding: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
}

.reel-item {
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(15,23,42,0.06);
  scroll-snap-align: center;
}

.dark .reel-item {
  background: rgba(255,255,255,0.06);
}

.reel-item video {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

/* Hide native scrollbar on WebKit */
.video-reel-track::-webkit-scrollbar { height: 0; }

@media (min-width: 640px) {
  .video-reel-track { grid-auto-columns: minmax(220px, 1fr); }
  .reel-item video { height: 260px; }
}

@media (min-width: 1024px) {
  .video-reel-track { grid-auto-columns: minmax(260px, 1fr); }
  .reel-item video { height: 300px; }
}

/* ======================== */
/* Video Mosaic Grid        */
/* ======================== */
.mosaic-item {
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(15,23,42,0.06);
}

.dark .mosaic-item { background: rgba(255,255,255,0.06); }

.mosaic-item video {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  cursor: zoom-in;
}

@media (min-width: 640px) { .mosaic-item video { height: 200px; } }
@media (min-width: 1024px) { .mosaic-item video { height: 220px; } }

/* ======================== */
/* Marquee Banner           */
/* ======================== */
.marquee-wrapper {
  overflow: hidden;
  width: 100%;
  background: linear-gradient(90deg, rgba(99,102,241,.08), rgba(139,92,246,.08), rgba(236,72,153,.08));
  padding: 12px 0;
}

.dark .marquee-wrapper {
  background: linear-gradient(90deg, rgba(99,102,241,.12), rgba(139,92,246,.12), rgba(236,72,153,.12));
}

.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap;
  will-change: transform;
  animation: marquee-scroll 18s linear infinite;
}

.marquee-track span {
  color: #334155;
  font-weight: 600;
}

.dark .marquee-track span { color: #e2e8f0; }

@keyframes marquee-scroll {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

/* ======================== */
/* Floating CTA             */
/* ======================== */
.floating-cta {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 50;
}

.floating-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
  color: white;
  border-radius: 9999px;
  padding: 10px 16px;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(0,0,0,.12);
}

.floating-cta-btn:hover { filter: brightness(1.05); }

.floating-cta-btn i { font-size: 1rem; }

/* ======================== */
/* Video Lightbox           */
/* ======================== */
.video-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity .15s ease;
}

.video-lightbox-content {
  position: relative;
  width: min(92vw, 1000px);
  background: #0b1220;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.video-lightbox-content video {
  border-radius: 8px;
  background: #000;
}

.video-lightbox-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 20; /* ensure close button is above the video */
}

.video-lightbox-close:hover {
  background: rgba(255,255,255,0.25);
}