/* ============================================
   Sharp Medical Club — Custom CSS
   Animations, textures, organic shapes, effects
   ============================================ */

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

/* --- Scroll Animations --- */
.animate-fade-in,
.animate-slide-left,
.animate-slide-right,
.animate-scale-in {
  opacity: 0;
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in {
  transform: translateY(24px);
}

.animate-slide-left {
  transform: translateX(-40px);
}

.animate-slide-right {
  transform: translateX(40px);
}

.animate-scale-in {
  transform: scale(0.95);
}

.animate-fade-in.visible,
.animate-slide-left.visible,
.animate-slide-right.visible,
.animate-scale-in.visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* --- CTA Pulse Glow --- */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 8px rgba(124, 58, 237, 0.15);
  }
}

.animate-pulse-glow {
  animation: pulse-glow 2.5s ease-in-out infinite;
}

/* --- Float Animation for Decorative Elements --- */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

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

@keyframes float-slow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}

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

/* --- Gradient Text --- */
.text-gradient-violet {
  background: linear-gradient(135deg, #7C3AED, #5B21B6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Grain Texture Overlay --- */
.grain-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* --- FAQ Accordion --- */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 350ms ease, opacity 300ms ease;
  opacity: 0;
}

.faq-item.active .faq-answer {
  opacity: 1;
}

.faq-icon {
  transition: transform 300ms ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* --- Sticky Header --- */
.header-scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* --- Organic Wave Dividers --- */
.wave-divider {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider-top {
  top: -1px;
}

.wave-divider-bottom {
  bottom: -1px;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Counter Animation (helper) --- */
.counter-value {
  font-variant-numeric: tabular-nums;
}

/* --- Spots Meter --- */
.spots-meter-fill {
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Card Hover Effects --- */
.card-hover {
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(124, 58, 237, 0.1);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in,
  .animate-slide-left,
  .animate-slide-right,
  .animate-scale-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .animate-pulse-glow {
    animation: none;
  }

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

  .faq-answer {
    transition: none;
  }
}

/* --- Mobile Sticky CTA --- */
.mobile-sticky-cta {
  transform: translateY(100%);
  transition: transform 400ms ease;
}

.mobile-sticky-cta.visible {
  transform: translateY(0);
}
