/*
==============================================
IMPERIO A&P INMOBILIARIO - HOME ENHANCEMENTS
Mejoras profesionales de UI/UX y Marketing
==============================================
*/

/* ============================================
   1. ANIMACIONES Y TRANSICIONES GLOBALES
   ============================================ */

/* Fade-in suave al cargar elementos */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* ============================================
   2. HERO SECTION - IMPACTO VISUAL MÁXIMO
   ============================================ */

#slider {
  animation: fadeIn 0.8s ease-out;
}

#slider .d-flex.rounded-5 {
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: transform 0.3s ease;
}

/* Overlay gradiente para mejor legibilidad */
#slider .d-flex.rounded-5::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 168, 232, 0.85) 0%,
    rgba(26, 26, 26, 0.75) 50%,
    rgba(0, 168, 232, 0.6) 100%
  );
  z-index: 1;
  animation: shimmer 3s infinite;
  background-size: 200% 100%;
}

#slider .row {
  position: relative;
  z-index: 2;
}

/* Título hero con efecto dramático */
#slider h2.display-1 {
  animation: fadeInUp 1s ease-out 0.3s both;
  text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.8);
  letter-spacing: -1px;
  line-height: 1.1;
  color: #ffffff;
  font-weight: 600;
}

/* Formulario de contacto flotante con glassmorphism */
#slider #form {
  animation: fadeInUp 1s ease-out 0.6s both;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#slider #form:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 12px 48px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}

#slider #form h3 {
  color: #00A8E8;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* ============================================
   3. BOTONES - CONVERSIÓN OPTIMIZADA
   ============================================ */

.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #00A8E8 0%, #0077B6 100%);
  border: none;
  box-shadow: 
    0 4px 15px rgba(0, 168, 232, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.btn-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-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 8px 25px rgba(0, 168, 232, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  background: linear-gradient(135deg, #0077B6 0%, #005A8D 100%);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

/* Botón con flecha animada */
.btn-arrow svg {
  transition: transform 0.3s ease;
}

.btn-arrow:hover svg {
  transform: translateX(5px);
}

/* ============================================
   4. SECCIÓN ABOUT - PROFUNDIDAD Y ELEGANCIA
   ============================================ */

#about-us {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #ADD8E6 100%);
}

#about-us h3 {
  animation: fadeInUp 0.8s ease-out;
  position: relative;
  display: inline-block;
  padding-bottom: 20px;
}

#about-us h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, transparent, #00A8E8, transparent);
  border-radius: 2px;
}

#about-us p {
  line-height: 1.8;
  color: #353535;
  font-size: 1.05rem;
}

#about-us img {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#about-us img:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

/* ============================================
   5. ESTADÍSTICAS - IMPACTO VISUAL
   ============================================ */

#info {
  padding: 80px 0;
  background: linear-gradient(135deg, #FAF8F3 0%, #F5F3ED 100%);
  position: relative;
  overflow: hidden;
}

#info::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 168, 232, 0.05) 0%, transparent 70%);
  animation: pulse 4s ease-in-out infinite;
}

#info .col-md-3 {
  animation: fadeInUp 0.8s ease-out both;
  position: relative;
}

#info .col-md-3:nth-child(1) { animation-delay: 0.1s; }
#info .col-md-3:nth-child(2) { animation-delay: 0.2s; }
#info .col-md-3:nth-child(3) { animation-delay: 0.3s; }
#info .col-md-3:nth-child(4) { animation-delay: 0.4s; }

#info h3 {
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

#info .col-md-3:hover h3 {
  transform: scale(1.1);
}

#info p {
  font-weight: 500;
  color: #353535;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.95rem;
}

/* ============================================
   6. TARJETAS DE SERVICIOS - ELEVACIÓN
   ============================================ */

#room {
  background: #ffffff;
}

#room h3 {
  position: relative;
  display: inline-block;
  padding-bottom: 20px;
  animation: fadeInUp 0.8s ease-out;
}

#room h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #00A8E8, #0077B6, #00A8E8);
  border-radius: 2px;
}

.room-item {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.room-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 1;
  transition: opacity 0.4s ease;
}

.room-item:hover::before {
  opacity: 0.9;
}

.room-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.room-item img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.room-item:hover img {
  transform: scale(1.1);
}

.product-description {
  z-index: 2;
  transition: transform 0.4s ease;
}

.room-item:hover .product-description {
  transform: translateY(-10px);
}

.product-description h4 {
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  font-weight: 600;
}

.product-description p {
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
  line-height: 1.6;
}

.product-description a {
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
}

.product-description a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #ffffff;
  transition: width 0.3s ease;
}

.product-description a:hover::after {
  width: 100%;
}

/* ============================================
   7. GALERÍA - EXPERIENCIA INMERSIVA
   ============================================ */

#gallery {
  padding: 100px 0;
  background: linear-gradient(180deg, #ffffff 0%, #FAF8F3 100%);
}

#gallery h3 {
  animation: fadeInUp 0.8s ease-out;
  margin-bottom: 20px;
}

#gallery p {
  animation: fadeInUp 0.8s ease-out 0.2s both;
  line-height: 1.8;
  color: #353535;
}

#gallery img {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.8);
}

#gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  border-color: #D16806;
}

/* Botones de navegación del swiper */
.main-slider-button-prev svg,
.main-slider-button-next svg {
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.main-slider-button-prev:hover svg,
.main-slider-button-next:hover svg {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  background-color: #00A8E8 !important;
  color: white;
}

/* ============================================
   8. MEJORAS TIPOGRÁFICAS
   ============================================ */

.display-1 {
  letter-spacing: -1.5px;
  line-height: 1.1;
  font-weight: 600;
}

.display-3 {
  letter-spacing: -0.5px;
  line-height: 1.2;
  font-weight: 500;
}

.display-5 {
  letter-spacing: -0.3px;
  font-weight: 600;
}

.display-6 {
  letter-spacing: 0;
  font-weight: 500;
}

/* ============================================
   9. EFECTOS DE SCROLL Y PARALLAX
   ============================================ */

[data-aos] {
  transition-duration: 0.8s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   10. SWIPER PAGINATION - ESTILO PREMIUM
   ============================================ */

.swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: #00A8E8;
  opacity: 0.3;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  width: 30px;
  border-radius: 6px;
  background: linear-gradient(90deg, #00A8E8, #0077B6);
}

/* ============================================
   11. MICRO-INTERACCIONES
   ============================================ */

/* Links con animación suave */
a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Imágenes con efecto de carga */
img {
  animation: fadeIn 0.6s ease-out;
}

/* ============================================
   12. RESPONSIVE ENHANCEMENTS
   ============================================ */

@media (max-width: 768px) {
  #slider .d-flex.rounded-5 {
    height: auto !important;
    min-height: 70vh;
  }
  
  #slider h2.display-1 {
    font-size: 2.5rem;
  }
  
  #slider #form {
    margin-top: 2rem;
    padding: 2rem !important;
  }
  
  #info {
    padding: 40px 0;
  }
  
  #info h3 {
    font-size: 2.5rem;
  }
}

/* ============================================
   13. ACCESIBILIDAD Y PERFORMANCE
   ============================================ */

/* Reducir animaciones para usuarios con preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   14. EFECTOS ADICIONALES DE MARKETING
   ============================================ */

/* Badge de urgencia/escasez */
.urgency-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #00A8E8, #0077B6);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 4px 15px rgba(0, 168, 232, 0.4);
  animation: pulse 2s ease-in-out infinite;
  z-index: 10;
}

/* Efecto de confianza en estadísticas */
.trust-indicator {
  position: relative;
  padding-left: 30px;
}

.trust-indicator::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

/* Efecto de brillo en elementos destacados */
.highlight-glow {
  position: relative;
  overflow: hidden;
}

.highlight-glow::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.highlight-glow:hover::after {
  opacity: 1;
}

/* ============================================
   15. OPTIMIZACIÓN DE CONVERSIÓN
   ============================================ */

/* CTA principal con efecto de pulsación */
.cta-primary {
  animation: pulse 2s ease-in-out infinite;
}

/* Indicador de scroll */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 10px;
  animation: fadeIn 1s ease-out 1.5s both;
  z-index: 10;
}

.scroll-indicator::before {
  content: '';
  width: 6px;
  height: 10px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 3px;
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0%, 100% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(15px);
    opacity: 0.5;
  }
}

/* ============================================
   16. EFECTOS DE CARGA PROGRESIVA
   ============================================ */

.lazy-load {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.lazy-load.loaded {
  opacity: 1;
}

/* ============================================
   17. MEJORAS EN FORMULARIOS
   ============================================ */

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #00A8E8;
  box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.1);
  transition: all 0.3s ease;
}

/* ============================================
   FIN DE MEJORAS
   ============================================ */
