/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navbar scroll effect */
#navbar.scrolled {
  background: rgba(255, 251, 242, 0.95);
  backdrop-blur: 12px;
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Mobile menu */
#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

/* Service cards stagger animation */
.service-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* About section animation */
#nosotros .bg-white\/10 {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

#nosotros .bg-white\/10.visible {
  opacity: 1;
  transform: translateY(0);
}

#nosotros .bg-white\/10:nth-child(1) { transition-delay: 0.1s; }
#nosotros .bg-white\/10:nth-child(2) { transition-delay: 0.2s; }
#nosotros .bg-white\/10:nth-child(3) { transition-delay: 0.3s; }
#nosotros .bg-white\/10:nth-child(4) { transition-delay: 0.4s; }

/* Contact info cards animation */
#contacto > .relative > div > div:first-child > div {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#contacto > .relative > div > div:first-child > div.visible {
  opacity: 1;
  transform: translateX(0);
}

#contacto > .relative > div > div:first-child > div:nth-child(1) { transition-delay: 0.05s; }
#contacto > .relative > div > div:first-child > div:nth-child(2) { transition-delay: 0.1s; }
#contacto > .relative > div > div:first-child > div:nth-child(3) { transition-delay: 0.15s; }
#contacto > .relative > div > div:first-child > div:nth-child(4) { transition-delay: 0.2s; }

/* Form animation */
#contactForm {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#contactForm.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth focus for inputs */
input:focus, textarea:focus {
  background: white;
}

/* Mobile link hover */
.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #059669;
  transition: width 0.3s ease;
}

.mobile-link:hover::after {
  width: 100%;
}

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

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

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

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

/* Selection color */
::selection {
  background: #059669;
  color: white;
}
