/* ============================================
   Apple-Level Premium Animations & Effects
   BALANCED: Content visible + smooth animations
   ============================================ */

:root {
  --shadow-premium: 0 20px 50px rgba(0,0,0,0.08), 0 10px 20px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 30px 60px rgba(0,0,0,0.15), 0 10px 30px rgba(0,0,0,0.1);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-blur: 24px;
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero h1 { animation: heroFadeUp 1s var(--ease-out-expo) 0.1s both; }
.hero .lead { animation: heroFadeUp 1s var(--ease-out-expo) 0.25s both; }
.hero .d-flex { animation: heroFadeUp 1s var(--ease-out-expo) 0.4s both; }
.hero .security-badge { animation: heroFadeUp 0.8s var(--ease-out-expo) 0.55s both; }

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-hero .breadcrumb { animation: pageFadeUp 0.7s var(--ease-out-expo) both; }
.page-hero h1, .page-hero .display-4 { animation: pageFadeUp 0.8s var(--ease-out-expo) 0.1s both; }
.page-hero .lead { animation: pageFadeUp 0.8s var(--ease-out-expo) 0.2s both; }

@keyframes pageFadeUp {
  from { opacity: 0; transform: translateY(25px); }
  to { opacity: 1; transform: translateY(0); }
}

section h2 { animation: sectionReveal 0.8s var(--ease-out-expo) both; }
section .text-center .lead { animation: sectionReveal 0.8s var(--ease-out-expo) 0.15s both; }

@keyframes sectionReveal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.service-card {
  animation: cardReveal 0.7s var(--ease-out-expo) both;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}
.col-md-6.col-lg-4:nth-child(1) .service-card { animation-delay: 0.1s; }
.col-md-6.col-lg-4:nth-child(2) .service-card { animation-delay: 0.15s; }
.col-md-6.col-lg-4:nth-child(3) .service-card { animation-delay: 0.2s; }
.col-md-6.col-lg-4:nth-child(4) .service-card { animation-delay: 0.25s; }
.col-md-6.col-lg-4:nth-child(5) .service-card { animation-delay: 0.3s; }
.col-md-6.col-lg-4:nth-child(6) .service-card { animation-delay: 0.35s; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 25px 50px rgba(0,0,0,0.12); }

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.treatment-card {
  animation: cardReveal 0.65s var(--ease-out-expo) both;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}
.col-md-6.col-lg-3:nth-child(1) .treatment-card { animation-delay: 0.1s; }
.col-md-6.col-lg-3:nth-child(2) .treatment-card { animation-delay: 0.15s; }
.col-md-6.col-lg-3:nth-child(3) .treatment-card { animation-delay: 0.2s; }
.col-md-6.col-lg-3:nth-child(4) .treatment-card { animation-delay: 0.25s; }
.treatment-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

.testimonial-card { animation: cardReveal 0.8s var(--ease-out-expo) both; }
.col-md-4:nth-child(1) .testimonial-card { animation-delay: 0.15s; }
.col-md-4:nth-child(2) .testimonial-card { animation-delay: 0.25s; }
.col-md-4:nth-child(3) .testimonial-card { animation-delay: 0.35s; }

.feature-list li { animation: listSlideIn 0.6s var(--ease-out-expo) both; }
.feature-list li:nth-child(1) { animation-delay: 0.1s; }
.feature-list li:nth-child(2) { animation-delay: 0.15s; }
.feature-list li:nth-child(3) { animation-delay: 0.2s; }
.feature-list li:nth-child(4) { animation-delay: 0.25s; }
.feature-list li:nth-child(5) { animation-delay: 0.3s; }
.feature-list li:nth-child(6) { animation-delay: 0.35s; }

@keyframes listSlideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.info-box { animation: cardReveal 0.7s var(--ease-out-expo) 0.2s both; }

.card { transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo); }
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,0.1); }
.card-premium:hover { transform: translateY(-12px) scale(1.02); box-shadow: var(--shadow-card-hover); }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-50px); transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo); }
.reveal-left.active { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(50px); transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo); }
.reveal-right.active { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.9); transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo); }
.reveal-scale.active { opacity: 1; transform: scale(1); }

.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
  transform: rotate(45deg) translateX(-100%);
}
.btn-shine:hover::after { animation: btnShine 0.75s var(--ease-out-expo) forwards; }
@keyframes btnShine { to { transform: rotate(45deg) translateX(100%); } }

.float-gentle { animation: floatGentle 6s ease-in-out infinite; }
@keyframes floatGentle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.pulse-glow { animation: pulseGlow 3s ease-in-out infinite; }
@keyframes pulseGlow { 0%, 100% { box-shadow: 0 0 20px rgba(26, 82, 118, 0.3); } 50% { box-shadow: 0 0 45px rgba(26, 82, 118, 0.5); } }

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
}

.img-zoom { overflow: hidden; border-radius: 16px; }
.img-zoom img { transition: transform 0.7s var(--ease-out-expo); }
.img-zoom:hover img { transform: scale(1.08); }

.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform-origin: left;
  z-index: 9999;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; }
}

/* ============================================
   3D CIRCULAR CAROUSEL
   ============================================ */

.carousel-3d {
  position: relative;
  width: 100%;
  height: 350px;
  perspective: 1000px;
  overflow: hidden;
}

.carousel-3d-container {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.carousel-3d-slide {
  position: absolute;
  width: 280px;
  height: 200px;
  left: 50%;
  top: 50%;
  margin-left: -140px;
  margin-top: -100px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s ease, box-shadow 0.8s ease;
  cursor: pointer;
}

.carousel-3d-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.carousel-3d-slide:hover img {
  transform: scale(1.05);
}

.carousel-3d-slide.active {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

/* Carousel Navigation */
.carousel-3d-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
}

.carousel-3d-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(26, 82, 118, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-3d-dot.active {
  background: var(--color-primary);
  transform: scale(1.2);
}

.carousel-3d-dot:hover {
  background: var(--color-primary);
}

/* Carousel Arrows */
.carousel-3d-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.carousel-3d-arrow:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.carousel-3d-arrow.prev { left: 10px; }
.carousel-3d-arrow.next { right: 10px; }

/* Pause on hover indicator */
.carousel-3d:hover .carousel-3d-container {
  /* Pauses via JS */
}

@media (max-width: 768px) {
  .carousel-3d {
    height: 280px;
  }
  .carousel-3d-slide {
    width: 220px;
    height: 160px;
    margin-left: -110px;
    margin-top: -80px;
  }
  .carousel-3d-arrow {
    width: 36px;
    height: 36px;
  }
}
