/**
 * RazoConnect - Landing Page Dinámica
 * Estilos que se adaptan al sistema de temas estacionales
 * @version 1.0.0
 */

/* ============================================
   HERO SECTION - BANNER DINÁMICO
   Usa variables del sistema de temas
   ============================================ */

.hero-dynamic {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--theme-bg-primary);
}

/* Fondo de imagen con parallax */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  transition: opacity 0.6s ease, background-image 0.6s ease;
  z-index: 1;
}

/* Overlay con gradiente del tema */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--theme-gradient-hero);
  opacity: 0.92;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
  padding: 3rem;
  max-width: 900px;
  animation: heroFadeIn 1s ease-out;

  /* Fondo adaptativo con color del tema */
  background: linear-gradient(
    135deg,
    rgba(var(--theme-primary-rgb), 0.85) 0%,
    rgba(var(--theme-secondary-rgb), 0.85) 100%
  );
  border-radius: 2rem;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Icono del tema */
.hero-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  animation: iconBounce 2s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
  /* Fondo circular para el icono */
  background: rgba(255, 255, 255, 0.15);
  width: 120px;
  height: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  margin-left: auto;
  margin-right: auto;
}

@keyframes iconBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero-title {
  font-family: var(--theme-font-title, "Poppins");
  font-size: 3.5rem;
  font-weight: var(--theme-font-weight-title, 700);
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2.5rem;
  color: white;
  font-weight: 500;
  line-height: 1.5;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
  /* Fondo adicional para mejorar legibilidad */
  background: rgba(0, 0, 0, 0.15);
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  display: inline-block;
}

/* Grupo de CTAs */
.hero-cta-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* Botón Primario con efecto GLOW del tema */
.btn-hero-primary {
  display: inline-block;
  padding: 1.25rem 3rem;
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;

  /* Usa colores del tema */
  background: var(--theme-accent);
  color: var(--theme-primary);

  /* Efecto GLOW con color de acento del tema */
  box-shadow: 0 0 20px var(--theme-accent),
    0 0 40px rgba(var(--theme-accent-rgb, 255, 255, 255), 0.5),
    0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-hero-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.btn-hero-primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 0 30px var(--theme-accent),
    0 0 60px rgba(var(--theme-accent-rgb, 255, 255, 255), 0.7),
    0 12px 30px rgba(0, 0, 0, 0.4);
}

.btn-hero-primary:hover::before {
  left: 100%;
}

.btn-hero-primary:active {
  transform: translateY(-2px) scale(1.02);
}

/* Botón Secundario */
.btn-hero-secondary {
  display: inline-block;
  padding: 1.25rem 3rem;
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Trust indicators */
.hero-trust {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0.9;
}

.hero-trust-item {
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================
   SECCIÓN DE BENEFICIOS
   Usa colores secundarios del tema
   ============================================ */

.benefits-section {
  padding: 6rem 0;
  background: var(--theme-bg-secondary);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--theme-primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  font-size: 1.25rem;
  color: var(--theme-secondary);
  margin-bottom: 4rem;
  opacity: 0.8;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

/* Tarjetas de beneficios */
.benefit-card {
  background: var(--theme-surface);
  padding: 2.5rem;
  border-radius: 1.5rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.benefit-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--theme-gradient-primary);
  opacity: 0;
  transition: opacity 0.3s;
}

.benefit-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--theme-shadow-xl);
  border-color: var(--theme-primary);
}

.benefit-card:hover::before {
  opacity: 1;
}

.benefit-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s;
}

.benefit-card:hover .benefit-icon {
  transform: scale(1.1) rotate(5deg);
}

.benefit-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--theme-primary);
  margin-bottom: 1rem;
}

.benefit-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--theme-secondary);
  opacity: 0.85;
}

/* ============================================
   SECCIÓN DE MARCAS
   Con estilos del tema
   ============================================ */

.landing-brands {
  padding: 6rem 0;
  background: var(--theme-bg-primary);
}

.landing-section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--theme-primary);
  margin-bottom: 1rem;
}

.landing-section-subtitle {
  text-align: center;
  font-size: 1.25rem;
  color: var(--theme-secondary);
  margin-bottom: 4rem;
  opacity: 0.8;
}

.landing-brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.brand-card {
  background: var(--theme-surface);
  padding: 2rem;
  border-radius: 1rem;
  border: 2px solid var(--theme-bg-tertiary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--theme-shadow-lg);
  border-color: var(--theme-primary);
}

.brand-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.brand-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--theme-gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: var(--theme-shadow-md);
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--theme-primary);
}

.brand-contact {
  font-size: 0.9rem;
  color: var(--theme-secondary);
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.brand-btn {
  display: inline-block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: var(--theme-primary);
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s;
}

.brand-btn:hover {
  background: var(--theme-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow-md);
}

/* ============================================
   SECCIÓN DE PRODUCTOS DESTACADOS
   ============================================ */

.landing-featured {
  padding: 6rem 0;
  background: var(--theme-bg-secondary);
}

.landing-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.featured-card {
  background: var(--theme-surface);
  border-radius: 1.5rem;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--theme-shadow-sm);
}

.featured-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--theme-shadow-xl);
}

.featured-card-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.featured-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.featured-card:hover .featured-card-image img {
  transform: scale(1.1);
}

.featured-card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--theme-accent);
  color: var(--theme-primary);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: var(--theme-shadow-md);
}

.featured-card-content {
  padding: 2rem;
}

.featured-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--theme-primary);
  margin-bottom: 1rem;
}

.featured-card-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--theme-secondary);
  margin-bottom: 0.5rem;
}

.featured-card-details {
  font-size: 0.9rem;
  color: var(--theme-secondary);
  opacity: 0.7;
  margin-bottom: 1.5rem;
}

.featured-card-btn {
  display: block;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--theme-primary);
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s;
}

.featured-card-btn:hover {
  background: var(--theme-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--theme-shadow-md);
}

.landing-featured-cta {
  text-align: center;
}

.btn-view-all {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--theme-primary);
  text-decoration: none;
  border: 2px solid var(--theme-primary);
  border-radius: 50px;
  transition: all 0.3s;
}

.btn-view-all:hover {
  background: var(--theme-primary);
  color: white;
  transform: translateY(-4px);
  box-shadow: var(--theme-shadow-lg);
}

/* ============================================
   ESTADOS DE CARGA Y ERROR
   ============================================ */

.landing-loader {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--theme-bg-tertiary);
  border-top-color: var(--theme-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.landing-empty,
.landing-error {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
  color: var(--theme-secondary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .hero-content {
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .hero-icon {
    font-size: 3.5rem;
    width: 100px;
    height: 100px;
  }

  .hero-cta-group {
    flex-direction: column;
    gap: 1rem;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    max-width: 300px;
  }

  .hero-trust {
    flex-direction: column;
    gap: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 1.125rem;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .landing-brands-grid,
  .landing-featured-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding: 1.5rem 1rem;
    border-radius: 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.125rem;
  }

  .hero-icon {
    font-size: 3rem;
    width: 80px;
    height: 80px;
  }

  .benefit-icon {
    font-size: 3rem;
  }
}

/* ============================================
   ANIMACIONES DE SCROLL (Opcional)
   ============================================ */

@media (prefers-reduced-motion: no-preference) {
  .benefit-card,
  .brand-card,
  .featured-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
  }

  .benefit-card:nth-child(1) {
    animation-delay: 0.1s;
  }
  .benefit-card:nth-child(2) {
    animation-delay: 0.2s;
  }
  .benefit-card:nth-child(3) {
    animation-delay: 0.3s;
  }
  .benefit-card:nth-child(4) {
    animation-delay: 0.4s;
  }
  .benefit-card:nth-child(5) {
    animation-delay: 0.5s;
  }
  .benefit-card:nth-child(6) {
    animation-delay: 0.6s;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
