/* === Lemon Parallax Background Widget === */

/* Contenedor principal */
.lemon-parallax-container {
  position: relative;
  width: 100%;
  overflow: hidden; /* Importante: recorta el fondo */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

/* Clases de altura */
.lemon-parallax-full-height {
  height: 100vh;
  min-height: 100vh;
}

.lemon-parallax-min-height {
  min-height: 400px;
}

/* Fondo con efecto parallax - VALORES CONSERVADORES */
.lemon-parallax-background {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll; /* Por defecto scroll */
  z-index: -2;
  will-change: transform;
  transform: translateZ(0);
}

/* EFECTO FIXED - Usar background-attachment: fixed directamente */
.lemon-parallax-container[data-parallax-type="fixed"] {
  overflow: hidden; /* Asegurar que el fondo se recorte */
}

.lemon-parallax-container[data-parallax-type="fixed"] .lemon-parallax-background {
  position: absolute; /* Mantener absolute dentro del contenedor */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-attachment: fixed; /* Utilizar fixed directamente */
  z-index: -2;
}

/* Overlay */
.lemon-parallax-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Contenedor del contenido */
.lemon-parallax-content-wrapper {
  position: relative;
  width: 100%;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Contenido */
.lemon-parallax-content {
  position: relative;
  width: 100%;
  max-width: 80%;
  padding: 3em;
  color: #ffffff;
  z-index: 2;
}

/* Estilos para el contenido */
.lemon-parallax-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.lemon-parallax-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.lemon-parallax-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #ffffff;
}

.lemon-parallax-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Estilos para el contenido con fondo */
.lemon-parallax-content.has-background {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  color: #333333;
}

.lemon-parallax-content.has-background h1,
.lemon-parallax-content.has-background h2,
.lemon-parallax-content.has-background h3 {
  color: #333333;
}

/* Estilos para el efecto 3D */
.lemon-parallax-container.has-3d-effect {
  perspective: 1000px;
}

.lemon-parallax-container.has-3d-effect .lemon-parallax-background {
  transform-style: preserve-3d;
}

/* Optimizaciones para móviles */
@media (max-width: 767px) {
  .lemon-parallax-content {
  padding: 2em;
  }

  .lemon-parallax-content h1 {
  font-size: 2.2rem;
  }

  .lemon-parallax-content h2 {
  font-size: 1.8rem;
  }

  .lemon-parallax-content h3 {
  font-size: 1.5rem;
  }

  .lemon-parallax-content p {
  font-size: 1rem;
  }
}

/* Optimizaciones para dispositivos muy pequeños */
@media (max-width: 480px) {
  .lemon-parallax-content {
  padding: 1.5em;
  max-width: 90%;
  }

  .lemon-parallax-content h1 {
  font-size: 1.8rem;
  }

  .lemon-parallax-content h2 {
  font-size: 1.5rem;
  }

  .lemon-parallax-content h3 {
  font-size: 1.3rem;
  }
}

/* Clases para el modo de optimización */
.lemon-parallax-container.performance-mode .lemon-parallax-background {
  transition: transform 0.1s linear;
}

/* Clase para cuando el parallax está desactivado */
.lemon-parallax-container.parallax-disabled .lemon-parallax-background {
  transform: none !important;
  transition: none !important;
}

/* Asegurar que el contenido esté por encima del fondo fixed */
.lemon-parallax-container[data-parallax-type="fixed"] .lemon-parallax-content-wrapper {
  position: relative;
  z-index: 2;
  background: transparent;
}

.lemon-parallax-container[data-parallax-type="fixed"] .lemon-parallax-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
