/* Asegurar que las secciones principales estén por debajo del header */
.hero {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding-top: 0;
}

@supports (-webkit-touch-callout: none) {
  .hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative !important;
    z-index: 1 !important;
  }

  .main-header {
    position: relative !important;
    z-index: 10 !important;
  }

  .contact-bar {
    position: relative !important;
    z-index: 10 !important;
  }
}

/* Fix para Android - eliminar espacio en blanco */
@media (max-width: 768px) {
  .hero {
    min-height: auto !important;
    height: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .hero-grid {
    min-height: auto !important;
    height: auto !important;
  }

  .hero-block {
    min-height: auto !important;
    height: auto !important;
    padding: 40px 20px !important;
  }

  .hero-title {
    min-height: auto !important;
    height: auto !important;
  }
}

.services-section {
  position: relative;
  z-index: 1;
}

.contact-section {
  position: relative;
  z-index: 1;
}

.stats-section {
  position: relative;
  z-index: 1;
}

.reviews {
  position: relative;
  z-index: 1;
}

.instagram-section {
  position: relative;
  z-index: 1;
}

/* Footer styles */
.footer {
  background-color: #6952eb !important;
  padding: 20px 0;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer .social-icon {
  color: white;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.footer .social-icon:hover {
  color: #e5e7eb;
}

.social-icon svg {
  width: 24px;
  height: 24px;
}

/* Logo header centering and spacing fix */
.logo-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
  width: 100vw;
  border-radius: 0;
}
.logo-header img {
  display: block;
  margin: 0 auto;
  height: 300px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.logo-header img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(105, 82, 235, 0.3);
}
/* Eliminar espacio entre logo y navbar */
.logo-header + .main-header {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.main-header {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
/* --- Responsive improvements --- */
@media (max-width: 900px) {
  .logo-header img {
    height: 120px !important;
  }
}

@supports (-webkit-touch-callout: none) {
  body {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .contact-bar {
    position: relative !important;
    z-index: 100 !important;
    margin: 0 !important;
    padding: 8px 0 !important;
  }

  .main-header {
    position: relative !important;
    z-index: 100 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .hero {
    position: relative !important;
    z-index: 1 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    top: 0 !important;
  }

  .hero-grid {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .hero-block {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

/* Fix específico para móviles - reducir hero y eliminar animaciones */
@media (max-width: 768px) {
  body {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Separar navbar del hero - SEPARACIÓN MODERADA */
  .main-header {
    margin-bottom: 15px !important;
    padding-bottom: 8px !important;
  }

  .hero {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 35vh !important;
    height: auto !important;
  }

  .hero-grid {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 35vh !important;
    height: auto !important;
  }

  .hero-block {
    margin: 0 !important;
    padding: 20px 15px !important;
    min-height: 35vh !important;
    height: auto !important;
  }

  .hero-title {
    margin: 0 0 0.8rem 0 !important;
    padding: 0 !important;
    min-height: auto !important;
    height: auto !important;
    font-size: 1.8rem !important;
  }

  .hero-btn {
    margin: 0.8rem 0 !important;
    padding: 12px 25px !important;
    font-size: 1rem !important;
  }

  /* Pegar hero con servicios */
  .services-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  .hero,
  .hero-block {
    padding-bottom: 0 !important;
  }
}

/* ANIMACIONES DINÁMICAS PARA HACER LA PÁGINA MÁS VIVA */

/* Animación de flotación para elementos */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Animación de rotación suave */
@keyframes gentle-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Animación de pulso mejorada */
@keyframes enhanced-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Animación de brillo */
@keyframes shine {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Animación de ondulación */
@keyframes wave {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(10px);
  }
}

/* Aplicar animaciones a elementos específicos */
.hero-block {
  animation: float 6s ease-in-out infinite;
}

.hero-block:nth-child(3) {
  animation-delay: 1s;
}

.service-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: float 8s ease-in-out infinite;
}

.service-card:nth-child(odd) {
  animation-delay: 0.5s;
}

.service-card:nth-child(even) {
  animation-delay: 1s;
}

.service-card:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 20px 40px rgba(105, 82, 235, 0.3);
}

.service-icon {
  transition: all 0.4s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
  animation: enhanced-pulse 2s infinite;
}

.contact-btn-lg {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #000000, #35258f, #000000);
  background-size: 200% 100%;
  animation: shine 3s infinite;
}

.contact-btn-lg:hover {
  animation: enhanced-pulse 1s infinite;
}

.social-icon {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-icon:hover {
  transform: translateY(-8px) scale(1.15) rotate(5deg);
  animation: enhanced-pulse 1s infinite;
}

.stat-item {
  animation: float 7s ease-in-out infinite;
}

.stat-item:nth-child(1) {
  animation-delay: 0s;
}
.stat-item:nth-child(2) {
  animation-delay: 1s;
}
.stat-item:nth-child(3) {
  animation-delay: 2s;
}
.stat-item:nth-child(4) {
  animation-delay: 3s;
}

.stat-number {
  transition: all 0.3s ease;
}

.stat-item:hover .stat-number {
  transform: scale(1.2);
  color: #6952eb;
}

.review-card {
  animation: float 9s ease-in-out infinite;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.review-card:nth-child(1) {
  animation-delay: 0s;
}
.review-card:nth-child(2) {
  animation-delay: 1.5s;
}
.review-card:nth-child(3) {
  animation-delay: 3s;
}
.review-card:nth-child(4) {
  animation-delay: 4.5s;
}

.review-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 15px 35px rgba(105, 82, 235, 0.2);
}

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

.gallery-item {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: float 10s ease-in-out infinite;
}

.gallery-item:nth-child(odd) {
  animation-delay: 0s;
}
.gallery-item:nth-child(even) {
  animation-delay: 2s;
}

.gallery-item:hover {
  transform: scale(1.1) rotate(2deg);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
  transition: all 0.4s ease;
}

.gallery-item:hover img {
  filter: brightness(1.1) contrast(1.1);
}
/* Efecto de partículas flotantes en el fondo */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
      circle at 20% 80%,
      rgba(105, 82, 235, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(105, 82, 235, 0.05) 0%,
      transparent 50%
    );
  animation: gentle-rotate 20s linear infinite;
  pointer-events: none;
}

/* Desactivar animación de rotación en móviles */
@media (max-width: 768px) {
  .hero::before {
    animation: none !important;
    opacity: 0.3 !important;
  }
}

/* Animación para el contador de estadísticas */
.counter {
  transition: all 0.3s ease;
}

.counter.animate {
  animation: enhanced-pulse 0.5s ease-out;
}

/* Efecto de hover mejorado para las tarjetas de servicio */
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(105, 82, 235, 0.1),
    rgba(105, 82, 235, 0.05)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

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

/* Animación para el texto de hover de servicios */
.service-hover-text {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card:hover .service-hover-text {
  transform: scale(1.05);
}

/* Efecto de brillo en los iconos de servicios */
.icon-container {
  position: relative;
  overflow: hidden;
}

.icon-container::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.service-card:hover .icon-container::after {
  opacity: 1;
  animation: shine 1s ease-out;
}
/* Animación de entrada para tarjetas de servicios */
@keyframes fadeInUpCard {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.service-card {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  animation: fadeInUpCard 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.service-card:nth-child(1) {
  animation-delay: 0.1s;
}
.service-card:nth-child(2) {
  animation-delay: 0.2s;
}
.service-card:nth-child(3) {
  animation-delay: 0.3s;
}
.service-card:nth-child(4) {
  animation-delay: 0.4s;
}
.service-card:nth-child(5) {
  animation-delay: 0.5s;
}
.service-card:nth-child(6) {
  animation-delay: 0.6s;
}
.service-card:nth-child(7) {
  animation-delay: 0.7s;
}
.service-card:nth-child(8) {
  animation-delay: 0.8s;
}
/* Cuando están en pantalla (scroll-animate + in-view), mostrar animación */
.service-card.in-view {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
  animation-play-state: running !important;
}

.logo-header {
  min-height: 305px !important;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  border-radius: 0;
  padding: 0;
  margin: 0;
}
.logo-header img,
.logo-img {
  height: 150px !important;
  width: auto !important;
  max-width: 100%;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .logo-header {
    min-height: 120px !important;
  }
  .logo-header img,
  .logo-img {
    height: 80px !important;
    max-height: 80px !important;
    width: auto !important;
  }
}
@media screen and (-webkit-min-device-pixel-ratio: 0) and (max-width: 768px) {
  .logo-header {
    min-height: 120px !important;
  }
  .logo-header img,
  .logo-img {
    height: 80px !important;
    max-height: 80px !important;
    width: auto !important;
  }
}

/* Estilos para separadores de navegación */
.nav-separator {
  color: #6952eb;
  font-weight: 300;
  margin: 0 10px;
  user-select: none;
  pointer-events: none;
}

/* Quitar los puntos de las listas de navegación */
.main-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav li {
  list-style: none;
  display: inline-block;
}

@media (max-width: 768px) {
  .nav-separator {
    margin: 0 5px;
  }
}

/* Estilos específicos para el botón flotante de WhatsApp */
.whatsapp-float-btn {
  position: fixed !important;
  right: 20px !important;
  bottom: 20px !important;
  z-index: 9999 !important;
  display: block !important;
  text-decoration: none !important;
}

@supports (-webkit-touch-callout: none) {
  .whatsapp-float-btn {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    z-index: 9999 !important;
    display: block !important;
  }
}
.whatsapp-float-btn img {
  animation: wsp-pulse 1.5s infinite alternate;
}

@keyframes wsp-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(179, 255, 59, 0.5);
  }
  100% {
    transform: scale(1.08);
    box-shadow: 0 0 16px 6px rgba(179, 255, 59, 0.25);
  }
}

.scroll-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}
.scroll-animate.in-view {
  opacity: 1;
  transform: none;
}

/* Fix global para móviles */
@media (max-width: 768px) {
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }

  .contact-bar {
    margin: 0 !important;
    padding: 8px 0 !important;
  }

  .main-header {
    margin: 0 !important;
    padding: 0 !important;
  }

  .hero {
    margin: 0 !important;
    padding: 0 !important;
  }
}

@supports (-webkit-touch-callout: none) {
  .hero {
    min-height: auto !important;
    height: auto !important;
    padding: 15px 0 !important;
    margin: 0 !important;
  }

  .hero-grid {
    min-height: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .hero-block {
    min-height: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 10px !important;
  }

  .hero-title {
    font-size: 1.8rem !important;
    margin: 0 0 0.5rem 0 !important;
  }

  .hero-btn {
    margin: 0.5rem 0 !important;
    padding: 12px 24px !important;
  }

  .main-header {
    margin-bottom: 15px !important;
    padding-bottom: 5px !important;
  }

  .services-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  .hero,
  .hero-block {
    padding-bottom: 0 !important;
  }
}

/* Fix específico para Android - hero más compacto */
@media screen and (-webkit-min-device-pixel-ratio: 0) and (max-width: 768px) {
  /* Separar navbar del hero - SEPARACIÓN MODERADA PARA ANDROID */
  .main-header {
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
  }

  .hero {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 30vh !important;
    height: auto !important;
  }

  .hero-grid {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 30vh !important;
    height: auto !important;
  }

  .hero-block {
    margin: 0 !important;
    padding: 15px 15px !important;
    min-height: 30vh !important;
    height: auto !important;
  }

  .hero-title {
    margin: 0 0 0.6rem 0 !important;
    padding: 0 !important;
    min-height: auto !important;
    height: auto !important;
    font-size: 1.7rem !important;
  }

  .hero-btn {
    margin: 0.6rem 0 !important;
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
  }

  /* Pegar hero con servicios */
  .services-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  .hero,
  .hero-block {
    padding-bottom: 0 !important;
  }
}

.services-section .container {
  position: relative;
  z-index: 1;
}
.services-section .container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(
    17,
    24,
    39,
    0.6
  ); /* Oscurece el fondo para que las tarjetas resalten */
  z-index: 2;
  pointer-events: none;
}
.services-section .services-grid,
.services-section .section-title {
  position: relative;
  z-index: 3;
}

@media (max-width: 768px) {
  .service-card {
    height: 320px !important;
    min-height: 0 !important;
    max-height: 340px !important;
    padding: 12px 8px !important;
  }
}

@media (max-width: 768px) {
  .service-card .service-hover-text {
    font-size: 1rem !important;
    line-height: 1.3 !important;
    padding: 0.8rem 0.5rem !important;
    word-break: break-word !important;
    white-space: normal !important;
  }
}

.contact-section {
  background: #6952eb;
  padding: 60px 40px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  flex-direction: row;
  gap: 40px;
}
.contact-content {
  flex: 1;
  max-width: 500px;
}
.contact-title {
  font-size: 3rem;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
  line-height: 1.1;
}
.contact-subtitle {
  font-size: 1.1rem;
  color: white;
  opacity: 0.9;
  line-height: 1.5;
  margin-bottom: 0;
}
.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
}
.contact-btn.contact-btn-lg {
  font-size: 1.4rem;
  padding: 18px 220px;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  background: #000000;
  color: #ffffff;
  border: 3px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  display: block;
  text-align: center;
}
.contact-btn.contact-btn-lg:hover {
  background: #35258f !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px 0 rgba(53, 37, 143, 0.4);
}
.contact-btn.contact-btn-lg::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s;
}
.contact-btn.contact-btn-lg:hover::before {
  left: 100%;
}
.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin-top: 18px;
  width: 100%;
}
.social-icon {
  width: 56px;
  height: 56px;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  font-size: 28px;
  transition: all 0.3s ease;
  background-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.social-icon:hover {
  background-color: white;
  color: #8b5cf6;
  transform: translateY(-2px) scale(1.08);
}
.social-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: all 0.3s ease;
}
.social-icon:hover .social-icon-img {
  filter: brightness(0) invert(0);
}
@media (max-width: 900px) {
  .contact-section {
    flex-direction: column;
    text-align: center;
    padding: 40px 20px;
    gap: 40px;
  }
  .contact-content {
    text-align: center;
    width: 100%;
    margin: 0 auto;
  }
  .contact-title {
    display: block;
    width: 100%;
    text-align: center;
    margin: 0 auto 16px auto;
  }
  .contact-actions {
    align-items: center;
    width: 100%;
  }
  .contact-btn.contact-btn-lg {
    width: 100%;
    max-width: 320px;
    padding: 14px 80px;
    font-size: 1rem;
  }
  .social-icons {
    gap: 18px;
  }
  .social-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
  .social-icon-img {
    width: 24px;
    height: 24px;
  }
}
@media (max-width: 480px) {
  .contact-title {
    font-size: 2rem;
    display: block;
    width: 100%;
    text-align: center;
    margin: 0 auto 16px auto;
  }
  .contact-section {
    padding: 30px 8px;
  }
  .contact-content {
    text-align: center;
    width: 100%;
    margin: 0 auto;
  }
  .contact-btn.contact-btn-lg {
    padding: 10px 0;
    font-size: 0.95rem;
    max-width: 180px;
  }
  .social-icons {
    gap: 10px;
  }
  .social-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .social-icon-img {
    width: 18px;
    height: 18px;
  }
}

/* Responsive grid for footer */
@media (min-width: 768px) {
  .footer-grid-responsive {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (min-width: 1024px) {
  .footer-grid-responsive {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  .footer-bottom-responsive {
    flex-direction: row !important;
  }
}
