/* ========== CUSTOM STYLES - Dental Madrid ========== */

/* Scroll animations */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}
.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.1s; }
.stagger > *:nth-child(3) { transition-delay: 0.2s; }
.stagger > *:nth-child(4) { transition-delay: 0.3s; }
.stagger > *:nth-child(5) { transition-delay: 0.35s; }
.stagger > *:nth-child(6) { transition-delay: 0.4s; }
.stagger > *:nth-child(7) { transition-delay: 0.45s; }
.stagger > *:nth-child(8) { transition-delay: 0.5s; }
.stagger > *:nth-child(9) { transition-delay: 0.55s; }
.stagger > *:nth-child(10) { transition-delay: 0.6s; }

/* Gold gradient text */
.text-gradient-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #F5D87A 40%, #D4AF37 70%, #C5981A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gold shimmer on hover */
.shimmer-gold {
  position: relative;
  overflow: hidden;
}
.shimmer-gold::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.15), transparent);
  transition: left 0.6s ease;
}
.shimmer-gold:hover::after {
  left: 100%;
}

/* Hero parallax-like bg */
.hero-bg {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(212,175,55,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(212,175,55,0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba(212,175,55,0.04) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a0a 0%, #111111 50%, #0a0a0a 100%);
}

/* Floating particles (pure CSS) */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(212,175,55,0.3);
  border-radius: 50%;
  animation: floatParticle 8s ease-in-out infinite;
}
.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 7s; }
.particle:nth-child(2) { left: 25%; top: 60%; animation-delay: 1s; animation-duration: 9s; }
.particle:nth-child(3) { left: 50%; top: 30%; animation-delay: 2s; animation-duration: 6s; }
.particle:nth-child(4) { left: 70%; top: 70%; animation-delay: 3s; animation-duration: 8s; }
.particle:nth-child(5) { left: 85%; top: 15%; animation-delay: 0.5s; animation-duration: 10s; }
.particle:nth-child(6) { left: 40%; top: 80%; animation-delay: 1.5s; animation-duration: 7.5s; }

@keyframes floatParticle {
  0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.3; }
  25% { transform: translateY(-30px) translateX(10px) scale(1.3); opacity: 0.6; }
  50% { transform: translateY(-15px) translateX(-15px) scale(0.8); opacity: 0.4; }
  75% { transform: translateY(-40px) translateX(5px) scale(1.1); opacity: 0.5; }
}

/* Decorative line */
.gold-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #D4AF37, #F5D87A, #D4AF37);
  border-radius: 2px;
}

/* Service card hover */
.service-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(212,175,55,0.1);
  border-color: rgba(212,175,55,0.4);
}
.service-card .service-icon {
  transition: transform 0.4s ease, color 0.4s ease;
}
.service-card:hover .service-icon {
  transform: scale(1.15);
}

/* Testimonial card */
.testimonial-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

/* Gallery item */
.gallery-item {
  overflow: hidden;
  position: relative;
}
.gallery-item img {
  transition: transform 0.6s ease;
}
.gallery-item:hover img {
  transform: scale(1.08);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulseWa 2.5s ease-in-out infinite;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.5);
  animation: none;
}
@keyframes pulseWa {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 4px 30px rgba(37,211,102,0.6); }
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #D4AF37, #8B7020);
  border-radius: 4px;
}

/* Nav blur */
.nav-blur {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Form focus ring gold */
.form-input:focus {
  outline: none;
  border-color: #D4AF37;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

/* Counter animation */
.counter-number {
  font-variant-numeric: tabular-nums;
}

/* Marquee for trust badges */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-track {
  animation: marquee 25s linear infinite;
}
.marquee-track:hover {
  animation-play-state: paused;
}

/* Star rating */
.star-filled {
  color: #D4AF37;
}

/* Responsive nav */
@media (max-width: 768px) {
  .mobile-menu {
    transform: translateX(100%);
    transition: transform 0.35s ease;
  }
  .mobile-menu.open {
    transform: translateX(0);
  }
}

/* Map container */
.map-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(212,175,55,0.2);
}
.map-container::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 12px;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
}

/* CTA pulse border */
.cta-pulse {
  position: relative;
}
.cta-pulse::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, #D4AF37, #F5D87A, #D4AF37);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cta-pulse:hover::before {
  opacity: 1;
}

/* Section divider */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.3), transparent);
}
