@import '../variables.css';
@import '../common.css';

/* =========================
   HERO (estructura principal)
   ========================= */

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1000px;
  margin: 40px auto 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

/* Contenedor del hero con fondo decorativo */
.hero-combined {
  position: relative;
  overflow: hidden;
}

/* Fondo decorativo flotante (dim.png) cubriendo todo el hero */
.hero-bg-image {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0.65;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.35));
  animation: dim-float 9s ease-in-out infinite;
}

.hero-content h1 {
  /* Usa el token del sistema; evita duplicidad con 4rem */
  font-family: 'Poppins', sans-serif;
  font-size: var(--font-size-hero);
  font-weight: var(--font-weight-bold);
  color: #fff;
  line-height: 1.2;
  margin-bottom: var(--spacing-lg);
  animation: hero-title-appear 1s ease-out 0.2s both;
}

.hero-content p {
  font-size: var(--font-size-lg);
  color: #fff;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto var(--spacing-md);
  animation: hero-text-appear 1s ease-out 0.4s both;
}

.hero-cta {
  margin-bottom: var(--spacing-lg);
  animation: hero-cta-appear 1s ease-out 0.6s both;
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.btn-demo {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.btn-demo:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}


/* =========================
   TESTIMONIAL (tarjeta glass)
   ========================= */
.testimonial-card {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.2),
    0 2px 20px rgba(139, 92, 246, 0.1);
  max-width: 500px;
  width: 100%;
  margin: 6px auto auto;
  font-family: 'Avenir', sans-serif;
}

.avatars-section { 
  display: flex; 
  align-items: center; 
  gap: 16px; 
}
.avatars-group { 
  display: flex; 
  position: relative; 
}

.avatar {
  width: 40px; 
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: #333; color: #fff;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-weight: bold; font-size: 18px;
  overflow: hidden; position: relative;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar:not(:first-child) { margin-left: -12px; }
.avatar:nth-child(1) { background: linear-gradient(45deg, #8b5cf6, #a78bfa); }
.avatar:nth-child(2) { background: linear-gradient(45deg, #ec4899, #f472b6); }
.avatar:nth-child(3) { background: linear-gradient(45deg, #3b82f6, #60a5fa); }
.avatar:nth-child(4) { background: linear-gradient(45deg, #10b981, #34d399); }

.text-content { 
  flex: 1; 
  color: #fff;
}

.members-text { 
  font-size: var(--font-size-lg); 
  font-weight: var(--font-weight-semibold); 
  color: #fff; 
  margin-bottom: 4px; 
  line-height: 1.2; 
  text-align: center; 
}
.loved-text   { 
  font-size: var(--font-size-lg);
  color: rgba(255,255,255,0.9); 
  margin-bottom: 8px; 
  text-align: center; 
}

.rating-section { display: flex; align-items: center; gap: 12px; }
.rating-section img { max-width: 140px; height: auto; display: block; }

/* =========================
   CAROUSEL (línea de claims)
   ========================= */
.carousel-section {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0;
  background: rgba(74, 53, 100, 0.5); /* semi-transparente */
  margin: 0 0 60px;                 /* colapsa margin-top + margin-bottom */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transform: skewY(-1deg); /* 👈 inclinación */
}

.carousel-container {
  position: relative;
  display: flex; align-items: center;
  overflow: hidden; width: 100%;
  height: 80px; /* altura fija */
  font-family: 'Avenir', sans-serif;
}

.carousel-track {
  display: flex; align-items: center; height: 100%;
  width: fit-content;
  animation: scroll-infinite 30s linear infinite;
}

.carousel-item {
  flex-shrink: 0;
  display: flex; align-items: center; height: 100%;
  background: transparent; border: 0; padding: 0; margin: 0;
  text-align: center; white-space: nowrap;
}

.carousel-item-text {
  position: relative; z-index: 1;
  padding: 0 40px; /* separación entre items */
  font-size: 18px; 
  font-weight: 500; 
  line-height: 1; 
  color: #fff;
  font-family: 'Avenir', sans-serif;
}

/* Separador con glow */
.carousel-item-text::after {
  content: '•';
  position: absolute; right: -20px; top: 50%;
  transform: translateY(-50%);
  font-size: 20px; 
  font-weight: 900;
  color: #a855f7;
  text-shadow:
    0 0 8px rgba(168, 85, 247, 0.8),
    0 0 12px rgba(168, 85, 247, 0.6),
    0 0 16px rgba(168, 85, 247, 0.4);
  animation: bullet-glow 2s ease-in-out infinite;
}
.carousel-item:last-child .carousel-item-text::after { display: none; }

/* =========================
   Animaciones usadas
   ========================= */
@keyframes scroll-infinite {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

@keyframes bullet-glow {
  0%, 100% {
    color: #a855f7;
    text-shadow:
      0 0 8px rgba(168, 85, 247, 0.8),
      0 0 12px rgba(168, 85, 247, 0.6),
      0 0 16px rgba(168, 85, 247, 0.4);
  }
  50% {
    color: #c084fc;
    text-shadow:
      0 0 12px rgba(168, 85, 247, 1),
      0 0 20px rgba(168, 85, 247, 0.8),
      0 0 28px rgba(168, 85, 247, 0.6);
  }
}

@keyframes hero-title-appear {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hero-text-appear {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hero-cta-appear {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Animación flotante del background */
@keyframes dim-float {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); }
  25%  { transform: translateY(-10px) translateX(6px) rotate(2deg); }
  50%  { transform: translateY(-18px) translateX(0) rotate(0deg); }
  75%  { transform: translateY(-10px) translateX(-6px) rotate(-2deg); }
  100% { transform: translateY(0) translateX(0) rotate(0deg); }
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {

  #site-main {
    padding-top: 0 !important;
  }

  .hero-combined { min-height: calc(100svh - var(--header-height, 80px)); }

  .hero-content h1 { font-size: 2.5rem; }
  .hero-content p  { font-size: var(--font-size-md); }

  .btn { padding: var(--spacing-sm) var(--spacing-lg); font-size: var(--font-size-md); }

  /* Centrar y separar del header fijo en móvil */
  .hero-content {
    align-items: center;
    margin-top: clamp(100px, 12vh, 140px);
  }

  .carousel-container { height: 50px; }
  .carousel-item-text { font-size: 14px; padding: 0 30px; }

  /* Reducir y reubicar el fondo flotante en móvil */
  .hero-combined::before { width: 100%; height: 100%; opacity: 0.55; }
}

@media (max-width: 480px) {
  .carousel-container { height: 45px; }
  .carousel-item-text { font-size: 12px; padding: 0 25px; }
  .carousel-item-text::after { right: -15px; font-size: 10px; }

  #site-main {
    padding-top: 0 !important;
  }
}
