@import '../variables.css';
@import '../common.css';

/* =========================
   HERO (estructura principal)
   ========================= */

/* Limitar el ancho máximo del hero principal */
#hero-carousel-section.hero-combined {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 90px auto 0 0;
  padding: 0 var(--spacing-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  margin-left: 50px !important;
}

/* Contenedor del hero con fondo decorativo */
.hero-combined {
  position: relative;
  overflow: hidden;
}

.hero-content h1 {
  /* Usa el token del sistema; evita duplicidad con 4rem */
  font-family: 'Poppins', sans-serif;
  font-size: 3.5rem;
  font-weight: var(--font-weight-bold);
  color: #fff;
  line-height: 1;
  margin-bottom: 0;
  animation: hero-title-appear 1s ease-out 0.2s both;
  margin-top: 0 !important;
}

.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: left;
  align-items: center;
  flex-wrap: wrap;
  margin-left: 0px;
  margin-top: 20px;
}

.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: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) {
  .hero-combined {
    min-height: calc(100svh - var(--header-height, 80px));
  }

  .hero-content h1 {
    font-size: 2.5rem;
    margin: 0 2rem 0 !important;
  }

  .hero-content p {
    font-size: var(--font-size-md);
    margin: 0 2rem 0 !important;
  }

  .btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.8rem;
  }

  /* Centrar y separar del header fijo en móvil */
  .hero-content {
    align-items: start !important;
    margin: 0 0 0 0 !important;
    width: 100% !important;
    padding: 8rem 0 0 0 !important;
  }

  .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;
  }

  .hero-cta {
    margin: 20px 2rem 0 !important;
  }
}

@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;
  }
}

/*-------------------------------------------------------*/

.info-section {
  border-radius: 20px;
  padding: var(--spacing-xxl);
  margin: var(--spacing-xxl) 0;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: var(--shadow-md);
}

.info-title {
  color: var(--color-primary);
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-xl);
  text-shadow: var(--text-glow);
}

.info-text {
  color: var(--text-muted);
  font-size: var(--font-size-lg);
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
}

.section {
  text-align: center;
}

.copytrading {
  background-color: transparent !important;
}

/* Imagen decorativa detrás del texto */
.hero-image-bg {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  width: 60%;
  z-index: 1;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 320px;
  max-width: 700px;
  flex: 1 1 320px;
  height: auto;
}

.hero-image-bg .hero-img {
  width: 100%;
  max-width: 700px;
  height: auto;
  object-fit: contain;
  opacity: 0.95;
  filter: drop-shadow(0 8px 32px rgba(139, 92, 246, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 50%;
}

@media (max-width: 1024px) {
  .hero-image-bg {
    width: 80%;
  }

  .hero-image-bg .hero-img {
    max-width: 480px;
  }
}

@media (max-width: 768px) {
  .hero-image-bg {
    width: 100%;
    align-items: center;
    justify-content: center;
  }

  .hero-image-bg .hero-img {
    max-width: 320px;
    opacity: 0.7;
  }
}

/* Flex para hero: contenido a la izquierda, imagen a la derecha */
.hero-flex {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  min-height: 600px;
  gap: 40px;
}

.hero-image {
  flex: 1 1 40%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 320px;
}

.hero-image img {
  max-width: 480px;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 32px rgba(139, 92, 246, 0.18));
}

@media (max-width: 768px) {
  .hero-flex {
    flex-direction: column;
    min-height: 400px;
  }

  .hero-image {
    justify-content: center;
    min-width: 0;
    margin-top: 24px;
  }

  .hero-image img {
    max-width: 320px;
  }
}