/* image-effects-js.css - Estilos complementarios para los efectos JS de imágenes
 * Compatible con el proyecto de hosting
 */

/* ===== ESTILOS PARA EFECTO DE COMPARACIÓN DE IMÁGENES ===== */
.js-image-comparison {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.js-image-comparison img {
  width: 100%;
  display: block;
}

.comparison-before {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.comparison-after {
  display: block;
  width: 100%;
}

.comparison-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: #fff;
  left: 50%;
  z-index: 3;
  cursor: ew-resize;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.comparison-slider::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  background-color: #fff;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}

.comparison-slider::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--primary);
  border-right: 2px solid var(--primary);
  top: 50%;
  left: 50%;
  transform: translate(-75%, -50%) rotate(45deg);
  z-index: 5;
}

.comparison-slider::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-bottom: 2px solid var(--primary);
  border-left: 2px solid var(--primary);
  top: 50%;
  left: 50%;
  transform: translate(-25%, -50%) rotate(45deg);
  z-index: 5;
}

/* ===== ESTILOS PARA EFECTO TILT ===== */
.js-tilt {
  position: relative;
  transition: transform 0.1s ease;
  transform-style: preserve-3d;
  transform: perspective(1000px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.js-tilt img {
  width: 100%;
  height: auto;
  display: block;
}

/* Estilos para el brillo en efecto tilt */
.js-tilt-glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
}

.js-tilt-glare-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  background-image: linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
  transform: rotate(180deg) translate(-50%, -50%);
  transform-origin: 0% 0%;
  opacity: 0;
}

/* ===== ESTILOS PARA EFECTO PARALLAX ===== */
.js-parallax {
  position: relative;
  overflow: hidden;
  will-change: transform;
  transition: transform 0.05s linear;
}

.js-parallax img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== ESTILOS PARA CARGA PEREZOSA ===== */
.js-lazy-fade {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* ===== ESTILOS PARA EFECTO LUPA ===== */
.js-magnify {
  position: relative;
  overflow: hidden;
  cursor: none;
  border-radius: var(--border-radius);
}

.js-magnify img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== ESTILOS PARA EFECTO REVELACIÓN ===== */
.js-reveal-image {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.js-reveal-image img {
  width: 100%;
  height: auto;
  display: block;
}

.reveal-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary);
  transform: translateX(-100%);
  z-index: 2;
}

/* ===== ADAPTACIONES PARA MODO OSCURO ===== */
.dark-mode .js-3d-card .card-front {
  background-color: #1e1e1e;
  color: #f8f9fa;
}

.dark-mode .comparison-slider {
  background-color: #1e1e1e;
}

.dark-mode .comparison-slider::after {
  background-color: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark-mode .comparison-slider::before,
.dark-mode .comparison-slider::after {
  border-color: var(--primary-light);
}

.dark-mode .js-tilt {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dark-mode .card-3d-front {
  background-color: #2c3e50;
  color: #ffffff;
}

.dark-mode .card-3d-back {
  background-color: #1a2530;
  color: #ffffff;
}

.dark-mode .card-3d-front .card-icon {
  color: #3498db;
}

.dark-mode .card-flip-hint {
  color: #a0aec0;
}

.dark-mode .comparison-slider {
  background-color: #3498db;
}

.dark-mode .comparison-slider::before {
  background-color: #2c3e50;
  border: 2px solid #3498db;
}

.dark-mode .comparison-slider::after {
  color: #ffffff;
}

/* ===== UTILIDADES PARA ANIMACIONES ===== */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.float-animation {
  animation: float 4s ease-in-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse-animation {
  animation: pulse 3s ease-in-out infinite;
}

/* ===== ADAPTACIONES RESPONSIVE ===== */
@media (max-width: 767.98px) {
  .js-3d-card {
    height: 250px;
  }
  
  .js-tilt {
    transform: none !important;
  }
  
  .js-3d-card .card-front,
  .js-3d-card .card-back {
    transition: none;
  }
  
  .comparison-slider::after {
    width: 30px;
    height: 30px;
  }
}

/* ===== UTILIDADES PARA INTEGRACION CON EL PROYECTO ===== */
.server-comparison {
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.hosting-feature-image {
  margin-bottom: 30px;
  transition: all 0.3s ease;
}

.hosting-feature-image:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
} 