/* Custom styles for AB. Smith Angulo law firm website */

/* Preloader */
#preloader {
  transition: opacity 0.5s ease;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Animation for WhatsApp button hover effect */
.whatsapp-pulse:hover {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Service card hover effects */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Enhanced animations */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

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

.slide-up {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.8s ease forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-right {
  opacity: 0;
  transform: translateX(-20px);
  animation: slideRight 0.8s ease forwards;
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-left {
  opacity: 0;
  transform: translateX(20px);
  animation: slideLeft 0.8s ease forwards;
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.scale-in {
  opacity: 0;
  transform: scale(0.95);
  animation: scaleIn 0.8s ease forwards;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* Custom scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
  background-color: #1a237e;
  color: white;
}

/* Additional responsive tweaks */
@media (max-width: 640px) {
  .hero-text h2 {
    font-size: 2.25rem;
  }
  
  .hero-text p {
    font-size: 1rem;
  }
}

/* Improve form field focus states */
input:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.2);
}

/* Add loading animation for form submission */
.submitting {
  position: relative;
  pointer-events: none;
}

.submitting::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-top: -10px;
  margin-left: -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #1a237e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b39573;
} 