/* =============================================
   NUEVO HERO SECTION - PÁGINA PRINCIPAL
   ============================================= */

.hero-section-new {
  position: relative;
  min-height: 100vh;
  margin-top: 70px; /* Espacio para el header fijo */
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 50%, var(--primary-dark) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  overflow: hidden;
}

/* Contenedor del título principal */
.hero-title-wrapper {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}/* Título principal del hero */
.hero-main-title {
  color: white;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin: 0;
  padding: 0;
  text-shadow: 
    -1px -1px 0 rgba(0, 0, 0, 0.2),
    1px -1px 0 rgba(0, 0, 0, 0.2),
    -1px 1px 0 rgba(0, 0, 0, 0.2),
    1px 1px 0 rgba(0, 0, 0, 0.2),
    0 0 10px rgba(0, 0, 0, 0.2);
  line-height: 1.3;
}

/* Contenedor principal con buscador y formulario */
.hero-main-container {
  display: grid;
  grid-template-columns: 70% 30%;
  grid-template-rows: 30% 70%;
  gap: 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 2rem auto;
  z-index: 10;
}

/* Buscador (Izquierda, segunda fila) */
.hero-search-box {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-md);
  padding: 1.5rem 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  height: fit-content;
}

.hero-search-box h2 {
  color: var(--dark);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

/* Estilos del buscador copiados de ofertas */
.search-container-hero {
  background-color: transparent;
  border-radius: var(--border-radius-lg);
  padding: 0;
  position: relative;
  z-index: 10;
}

.search-form-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.search-input-hero {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius-md);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) inset;
}

.search-input-hero:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(149, 190, 186, 0.2);
}

.search-button-hero {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.search-button-hero:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-button-hero:active {
  transform: translateY(0);
}

.filter-container-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.filter-select-hero {
  flex: 1;
  min-width: 130px;
  padding: 10px 13px;
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius-md);
  font-size: 0.9rem;
  background-color: white;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  appearance: none;
  padding-right: 40px;
  transition: all 0.3s ease;
}

.filter-select-hero:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(149, 190, 186, 0.2);
}

/* Formulario de Registro (Derecha, ambas filas) */
.hero-register-box {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    align-self: start;
    background: rgba(4, 31, 30, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-md);
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 10;
}

.hero-register-box h2 {
  color: white;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.hero-register-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-register-form input {
  padding: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.9);
  transition: var(--transition);
}

.hero-register-form input:focus {
  outline: none;
  border-color: white;
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.hero-register-button {
  background: var(--primary);
  color: var(--dark);
  border: none;
  padding: 1.2rem;
  border-radius: var(--border-radius-sm);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
}

.hero-register-button:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-register-note {
  color: white;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.hero-register-note a {
  color: var(--primary-light);
  text-decoration: underline;
  font-weight: 600;
}

.hero-register-note a:hover {
  color: white;
}

/* Banner promocional */
.hero-promo-banner {
  max-width: 1200px;
  width: 100%;
  margin: 2rem auto;
  z-index: 10;
}

.hero-promo-content {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--border-radius-md);
  padding: 2rem 3rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.hero-promo-icon {
  font-size: 4rem;
  flex-shrink: 0;
}

.hero-promo-text h3 {
  color: var(--dark);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.hero-promo-text p {
  color: var(--gray);
  font-size: 1.1rem;
  margin: 0;
}

/* Mosaico de imágenes */
.hero-image-mosaic {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 1400px;
  width: 100%;
  height: calc(100% - 70px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  grid-auto-rows: 100px;
  gap: 10px;
  padding: 2rem 1rem;
  opacity: 0.6;
  z-index: 1;
}

.mosaic-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1.5s ease-in-out, transform 0.3s ease;
}

.mosaic-item:hover img {
  transform: scale(1.05);
}

/* Tamaños variables para el grid irregular */
.mosaic-item.size-1 {
  grid-column: span 1;
  grid-row: span 1;
}

.mosaic-item.size-2 {
  grid-column: span 2;
  grid-row: span 2;
}

.mosaic-item.size-3 {
  grid-column: span 2;
  grid-row: span 1;
}

.mosaic-item.size-4 {
  grid-column: span 1;
  grid-row: span 2;
}

/* Botones con animación al scroll */
.cta-buttons-scroll {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 3rem 2rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  max-width: 800px;
  margin: 0 auto;
}

.cta-buttons-scroll .cta-button {
  margin: 0;
  flex: 0 1 auto;
}

.cta-buttons-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-main-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 2rem;
    max-width: 600px;
  }

  .hero-title-wrapper {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .hero-search-box {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
  }

  .hero-register-box {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
  }

  .hero-main-title {
    font-size: 1.7rem;
  }

  .hero-promo-content {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }

  .hero-promo-icon {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .hero-section-new {
    padding: 1rem;
    min-height: auto;
  }

  .hero-main-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .hero-search-box,
  .hero-register-box {
    padding: 1.5rem;
  }

  .hero-search-box h2,
  .hero-register-box h2 {
    font-size: 1.5rem;
  }

  .hero-promo-text h3 {
    font-size: 1.4rem;
  }

  .hero-promo-text p {
    font-size: 1rem;
  }

  .hero-image-mosaic {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    grid-auto-rows: 80px;
    gap: 8px;
  }

  .cta-buttons-scroll {
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  .hero-main-title {
    font-size: 1.2rem;
  }

  .hero-search-box h2,
  .hero-register-box h2 {
    font-size: 1.3rem;
  }

  .hero-search-input,
  .hero-filter-select,
  .hero-register-form input {
    padding: 0.8rem;
    font-size: 0.9rem;
  }

  .hero-search-button,
  .hero-register-button {
    padding: 1rem;
    font-size: 1rem;
  }

  .hero-promo-text h3 {
    font-size: 1.2rem;
  }

  .hero-promo-text p {
    font-size: 0.9rem;
  }
}

/* =============================================
   EFECTOS DE SCROLL PARA BANNERS Y SECCIONES
   ============================================= */
.scroll-fade {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-fade.hiding {
  opacity: 0;
  transform: translateY(-30px);
}

/* Aplicar a secciones específicas */
.benefits-section,
.how-it-works-section,
.testimonials-section,
.cta-section,
.hero-promo-banner,
.hero-search-box,
.hero-register-box,
.cta-buttons-scroll,
.feature {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.benefits-section.visible,
.how-it-works-section.visible,
.testimonials-section.visible,
.cta-section.visible,
.hero-promo-banner.visible,
.hero-search-box.visible,
.hero-register-box.visible,
.cta-buttons-scroll.visible,
.feature.visible {
  opacity: 1;
  transform: translateY(0);
}

.benefits-section.hiding,
.how-it-works-section.hiding,
.testimonials-section.hiding,
.cta-section.hiding,
.hero-promo-banner.hiding,
.hero-search-box.hiding,
.hero-register-box.hiding,
.cta-buttons-scroll.hiding,
.feature.hiding {
  opacity: 0.3;
  transform: translateY(-30px);
}
