/* main.css */

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 998;
  backdrop-filter: blur(3px);
  pointer-events: none;
  /* ESTO ES CLAVE - permite clicks a través del overlay */
}

.mobile-menu-overlay.active {
  display: block;
  pointer-events: auto;
  /* Permite cerrar al hacer click en el overlay */
}

/* Mobile Menu Styles */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 350px;
  height: 100vh;
  background-color: white;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  z-index: 999;
  transition: right 0.3s ease;
  overflow-y: auto;
  pointer-events: auto;
  /* El menú siempre debe recibir clicks */
}

.mobile-menu.active {
  display: block;
  right: 0;
}

.mobile-menu-content {
  padding: 20px;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #5324a8;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  cursor: pointer;
}

.mobile-menu-item i {
  margin-right: 12px;
  width: 20px;
  color: #ffbc24;
}

.mobile-menu-item:hover {
  background-color: #f9f9f9;
  padding-left: 25px;
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #f9f9f9;
}

.mobile-submenu.active {
  max-height: 300px;
}

.mobile-submenu-item {
  display: flex;
  align-items: center;
  padding: 12px 20px 12px 40px;
  color: #5324a8;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-bottom: 1px solid #e5e5e5;
  transition: all 0.3s ease;
}

.mobile-submenu-item i {
  margin-right: 10px;
  width: 18px;
  color: #ffbc24;
  font-size: 14px;
}

.mobile-submenu-item:hover {
  background-color: white;
  padding-left: 45px;
}

.mobile-menu-cta {
  display: block;
  margin-top: 20px;
  padding: 15px 20px;
  background-color: #ffbc24;
  color: #5324a8;
  text-align: center;
  font-weight: bold;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.mobile-menu-cta:hover {
  background-color: #e6a820;
  transform: scale(1.05);
}

/* Dropdown Menu Styles */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  min-width: 280px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  z-index: 1000;
  margin-top: 0px;
  padding: 8px 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding-top: 12px;
}

/* Crear un puente invisible entre el botón y el menú */
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

.dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
}

.dropdown-menu a {
  color: #5324a8;
  padding: 12px 20px;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  font-weight: 500;
}

.dropdown-menu a i {
  margin-right: 10px;
  width: 20px;
  color: #ffbc24;
}

.dropdown-menu a:hover {
  background-color: #f9f9f9;
  color: #ffbc24;
  padding-left: 25px;
}

.dropdown-menu a:first-child {
  border-radius: 12px 12px 0 0;
}

.dropdown-menu a:last-child {
  border-radius: 0 0 12px 12px;
}

/* Electric Border Effect */
@keyframes electric-border {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.electric-border {
  position: relative;
  overflow: hidden;
}

.electric-border::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ffbc24, #5324a8, #ffbc24, #5324a8);
  background-size: 400% 400%;
  border-radius: inherit;
  z-index: -1;
  animation: electric-border 3s ease infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.electric-border:hover::before {
  opacity: 1;
}

.electric-border-active::before {
  opacity: 0.7;
}

.electric-border-active:hover::before {
  opacity: 1;
}

/* WhatsApp Button Electric Effect */
.whatsapp-electric {
  position: relative;
  overflow: visible;
}

.whatsapp-electric::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(45deg, #25d366, #128c7e, #25d366, #128c7e);
  background-size: 400% 400%;
  border-radius: 50%;
  z-index: -1;
  animation: electric-border 2s ease infinite;
  opacity: 0.6;
}

.whatsapp-electric:hover::before {
  opacity: 1;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #fefefe;
  margin: 2% auto;
  padding: 30px;
  border: none;
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  color: #5324a8;
  float: right;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 20px;
}

.close:hover,
.close:focus {
  color: #ffbc24;
  transform: rotate(90deg);
}

/* Scroll Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Animation Delays */
.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

.delay-5 {
  transition-delay: 0.5s;
}

.delay-6 {
  transition-delay: 0.6s;
}

/* FAQ Styles */
.faq-item {
  border-bottom: 1px solid #e5e5e5;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.faq-question:hover {
  background-color: white;
}

.faq-icon {
  transition: transform 0.3s ease;
  font-size: 18px;
}

.faq-icon.rotate {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
  padding: 0 24px;
}

.faq-answer.active {
  max-height: 500px;
  padding: 0 24px 20px 24px;
}

/* Map Container */
.map-container {
  width: 100%;
  height: 450px;
  border-radius: 12px;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dropdown-menu {
    left: 0;
    transform: translateX(0);
    min-width: 240px;
  }

  .modal-content {
    width: 95%;
    padding: 20px;
    margin: 5% auto;
  }

  .map-container {
    height: 300px;
  }
}

/* Floating WhatsApp Button */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1200;
}

/* Logo Carousel */
.logo-carousel-container {
  overflow: hidden;
  padding: 40px 0;
  position: relative;
  background: white;
}

.logo-carousel-track {
  display: flex;
  width: calc(250px * 20);
  /* Ajustar según número de logos */
  animation: scroll 30s linear infinite;
}

.logo-carousel-track:hover {
  animation-play-state: paused;
}

.logo-item {
  width: 250px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  flex-shrink: 0;
}

.logo-item img {
  max-height: 70px;
  max-width: 100%;
  opacity: 1;
  transition: all 0.3s ease;
}

.logo-item img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-250px * 10));
    /* Mitad del track para bucle infinito */
  }
}

.wa-message {
  position: absolute;
  bottom: 80px;
  right: 0;
  background: white;
  padding: 12px 20px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  width: max-content;
  max-width: 200px;
  font-size: 14px;
  font-weight: 600;
  color: #5324a8;
  animation: bounce 2s infinite;
  pointer-events: none;
}

.wa-message::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 25px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

@media (max-width: 768px) {
  .floating-whatsapp {
    bottom: 22px;
    right: 22px;
  }

  .wa-message {
    bottom: 70px;
    font-size: 13px;
    padding: 10px 16px;
  }
}
.service-card {
    @apply bg-white rounded-lg shadow-lg p-8 text-center transition-all duration-300;
    position: relative;
    z-index: 10;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit; 
    border: 2px solid transparent;
    background: linear-gradient(to right, #fb7185, #8b5cf6) border-box; 
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.service-card:hover {
    @apply transform -translate-y-2;
    box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.2), 0 8px 10px -6px rgba(139, 92, 246, 0.2);
}

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