/* ===== Custom Styles for Imaginations A Child's Place ===== */

/* Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: rgba(13, 148, 136, 0.3);
  color: #f0fdfa;
}

/* ===== Floating Card Animations ===== */
@keyframes float-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

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

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

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

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

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

/* Stagger delays for floating cards */
.animate-float-slow { animation-delay: 0s; }
.animate-float-medium { animation-delay: -1.5s; }
.animate-float-fast { animation-delay: -0.75s; }

/* ===== Service Cards ===== */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2dd4bf, transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

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

/* ===== Gallery Items ===== */
.gallery-item {
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: border-color 0.5s ease;
  pointer-events: none;
}

.gallery-item:hover::after {
  border-color: rgba(45, 212, 191, 0.3);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: 'Playfair Display', serif;
  font-size: 80px;
  color: rgba(45, 212, 191, 0.08);
  line-height: 1;
  pointer-events: none;
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Navbar Scroll State ===== */
.navbar-scrolled {
  background: rgba(5, 12, 24, 0.9) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(45, 212, 191, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

::-webkit-scrollbar-track {
  background: #050c18;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #0d9488;
}

/* ===== Reduced Motion ===== */
@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-slow,
  .animate-float-medium,
  .animate-float-fast {
    animation: none;
  }
}

/* ===== Mobile Menu Transitions ===== */
#mobileMenu {
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

#mobileMenu.hidden {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobileMenu:not(.hidden) {
  max-height: 500px;
  opacity: 1;
}

.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.mobile-link:last-child {
  border-bottom: none;
}
