/* ==========================================================================
   MODAL DE CALENDLY
   ========================================================================== */

.modal {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: #fff;
  margin: auto;
  padding: 0;
  width: 90%;
  max-width: 900px;
  height: 90vh;
  max-height: 700px;
  position: relative;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.dark .modal-content {
  background-color: #1f2937;
}

.close-btn {
  color: #6b7280;
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.dark .close-btn {
  background: rgba(31, 41, 55, 0.9);
  color: #9ca3af;
}

.close-btn:hover {
  color: #ef4444;
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.dark .close-btn:hover {
  background: rgba(31, 41, 55, 1);
}

#calendly-embed {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

/* ==========================================================================
   MENÚ HAMBURGUESA EXTENDIDO - DESDE 768px
   ========================================================================== */

/* Mostrar el menú hamburguesa desde 768px hasta 1024px */
@media (min-width: 768px) and (max-width: 1023px) {
  #menuToggle {
    display: block !important;
  }
  
  /* Ocultar el navbar desktop desde 768px hasta 1024px */
  #nav-wrapper {
    display: none !important;
  }
  
  /* Mejorar el menú móvil para tablets */
  #mobileMenu {
    width: 100% !important;
    padding: 2rem !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-radius: 0 0 12px 12px !important;
  }
  
  .dark #mobileMenu {
    background: rgba(0, 0, 0, 0.95) !important;
  }
  
  /* Hacer los enlaces del menú móvil más grandes para tablets */
  #mobileMenu .nav-link {
    font-size: 1.1rem !important;
    padding: 1rem 1.5rem !important;
    margin: 0.5rem 0 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    width: fit-content !important;
  }
  
  #mobileMenu .nav-link:hover {
    background: rgba(0, 207, 255, 0.1) !important;
    transform: translateX(8px) !important;
  }
  
  #mobileMenu .btn-agendar-section {
    font-size: 1.1rem !important;
    padding: 1rem 1.5rem !important;
    margin: 1rem 0 !important;
    width: fit-content !important;
  }
  
  /* Ajustar el contenedor de los enlaces */
  #mobileMenu .flex.flex-col {
    align-items: center !important;
    gap: 0.5rem !important;
  }
}

/* Asegurar que funcione bien en desktop (1024px+) */
@media (min-width: 1024px) {
  /* Restaurar navbar desktop para pantallas grandes */
  #menuToggle {
    display: none !important;
  }
  
  #nav-wrapper {
    display: flex !important;
  }
  
  #mobileMenu {
    display: none !important;
  }
}

/* ==========================================================================
   LEGAL MODALS ENHANCED STYLES
   ========================================================================== */

/* Enhanced modal animations */
.modal {
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  animation: slideInUp 0.3s ease-out;
  transform-origin: center bottom;
}

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

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Legal modal section hover effects */
.legal-modal-section {
  transition: all 0.2s ease;
}

.legal-modal-section:hover {
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Enhanced scrollbar styling */
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: rgba(0, 153, 204, 0.5);
  border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 153, 204, 0.8);
}

/* Close button enhanced styles */
.modal-close-btn {
  transition: all 0.2s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Action button enhancements */
.modal-action-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.modal-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.modal-action-btn:active {
  transform: translateY(0);
}

/* Mobile responsiveness for legal modals */
@media (max-width: 640px) {
  .modal-content {
    margin: 1rem;
    max-height: 85vh;
  }
}
