/* Custom styles for Colegio Infantil Juan Ramón Jiménez */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Floating animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float-delayed 5s ease-in-out infinite;
  animation-delay: 1s;
}

/* Navigation scroll effect */
nav.scrolled {
  background: rgba(4, 8, 5, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu */
.mobile-menu-open {
  opacity: 1 !important;
  pointer-events: all !important;
}

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

::-webkit-scrollbar-track {
  background: #080f09;
}

::-webkit-scrollbar-thumb {
  background: rgba(201, 168, 76, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 168, 76, 0.5);
}

/* Selection */
::selection {
  background: rgba(201, 168, 76, 0.3);
  color: #faf9f6;
}

/* Focus styles */
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* Nav link underline animation */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #c9a84c, #d4af5a);
  transition: width 0.3s ease;
}

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

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

/* Fade in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

/* Stagger children animation */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.animate > * {
  animation: fadeInUp 0.6s ease forwards;
}

.stagger-children.animate > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children.animate > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children.animate > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children.animate > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children.animate > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children.animate > *:nth-child(6) { animation-delay: 0.6s; }

/* Gold shimmer on hover */
.group:hover .group-hover\:from-gold-400 {
  background-position: 100% 50%;
  transition: background-position 0.5s ease;
}

/* Image hover zoom container */
.rounded-2xl.overflow-hidden {
  overflow: hidden;
}

.rounded-2xl.overflow-hidden img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .animate-float,
  .animate-float-delayed {
    animation: none;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .font-display {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }
}
