/* HealthPortal Animations - Complete CSS File */

/* ===== General Animation Utilities ===== */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
  }
  
  .animate-slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease forwards;
  }
  
  .animate-slide-right {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideRight 0.8s ease forwards;
  }
  
  .animate-slide-left {
    opacity: 0;
    transform: translateX(30px);
    animation: slideLeft 0.8s ease forwards;
  }
  
  .animate-scale {
    opacity: 0;
    transform: scale(0.8);
    animation: scaleUp 0.8s ease forwards;
  }
  
  .animate-bounce {
    animation: bounce 2s ease infinite;
  }
  
  .animate-pulse {
    animation: pulse 2s ease-in-out infinite;
  }
  
  /* ===== Animation Delays ===== */
  .delay-100 { animation-delay: 0.1s; }
  .delay-200 { animation-delay: 0.2s; }
  .delay-300 { animation-delay: 0.3s; }
  .delay-400 { animation-delay: 0.4s; }
  .delay-500 { animation-delay: 0.5s; }
  .delay-600 { animation-delay: 0.6s; }
  .delay-700 { animation-delay: 0.7s; }
  .delay-800 { animation-delay: 0.8s; }
  .delay-900 { animation-delay: 0.9s; }
  .delay-1000 { animation-delay: 1s; }
  
  /* ===== Animation Keyframes ===== */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes slideRight {
    from {
      opacity: 0;
      transform: translateX(-30px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes slideLeft {
    from {
      opacity: 0;
      transform: translateX(30px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes scaleUp {
    from {
      opacity: 0;
      transform: scale(0.8);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
  
  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
      transform: translateY(0);
    }
    40% {
      transform: translateY(-20px);
    }
    60% {
      transform: translateY(-10px);
    }
  }
  
  @keyframes pulse {
    0% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.05);
    }
    100% {
      transform: scale(1);
    }
  }
  
  @keyframes float {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-10px);
    }
  }
  
  @keyframes rotate {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }
  
  @keyframes shimmer {
    0% {
      background-position: -1000px 0;
    }
    100% {
      background-position: 1000px 0;
    }
  }
  
  /* ===== Scroll Animation Utilities ===== */
  .scroll-animate {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  
  .scroll-animate.from-bottom {
    transform: translateY(50px);
  }
  
  .scroll-animate.from-left {
    transform: translateX(-50px);
  }
  
  .scroll-animate.from-right {
    transform: translateX(50px);
  }
  
  .scroll-animate.scale-up {
    transform: scale(0.8);
  }
  
  /* IMPORTANT: Fixed visible state for all scroll animations */
  .scroll-animate.visible,
  .scroll-animate.animate-triggered {
    opacity: 1;
    transform: translate(0) scale(1) rotate(0deg);
  }
  
  /* ===== Specific Element Animations ===== */
  
  /* Logo Animation */
  .logo:hover svg {
    animation: pulse 1s ease-in-out;
  }
  
  /* Hero Section Animations */
  .hero-title {
    animation: fadeIn 1s ease forwards;
  }
  
  .hero-subtitle {
    opacity: 0;
    animation: fadeIn 1s ease 0.3s forwards;
  }
  
  .hero-image img {
    animation: float 6s ease-in-out infinite;
  }
  
  .btn-group {
    opacity: 0;
    animation: fadeIn 1s ease 0.6s forwards;
  }
  
  /* Feature Card Animations - FIXED */
  .feature-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
  }
  
  /* Ensure proper transform reset for feature cards after animation */
  .feature-card.scroll-animate.visible,
  .feature-card.scroll-animate.animate-triggered {
    transform: translateY(0) !important;
  }
  
  /* Fixed hover effect for feature cards */
  .feature-card:hover {
    transform: translateY(-15px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
  }
  
  /* Ensure hover still works after animation */
  .feature-card.scroll-animate.visible:hover,
  .feature-card.scroll-animate.animate-triggered:hover {
    transform: translateY(-15px) !important;
  }
  
  .feature-icon {
    transition: transform 0.3s ease;
  }
  
  .feature-card:hover .feature-icon {
    transform: scale(1.15);
  }
  
  /* Badges Animation */
  .showcase-badge {
    animation: float 4s ease-in-out infinite;
  }
  
  /* Enhanced Badge Animation - Different timing for each */
  .showcase-badge:nth-child(1) { animation-delay: 0s; }
  .showcase-badge:nth-child(2) { animation-delay: 0.5s; }
  .showcase-badge:nth-child(3) { animation-delay: 1s; }
  .showcase-badge:nth-child(4) { animation-delay: 1.5s; }
  .showcase-badge:nth-child(5) { animation-delay: 2s; }

  .showcase-image {
    transform: none !important; /* Use !important to override any inline styles */
  }
  
  /* Showcase Image Animation */
  .showcase-image img {
    transition: transform 0.6s ease;
  }
  
  .showcase-container:hover .showcase-image img {
    /*transform: perspective(1000px) rotateY(-8deg) !important;*/
  }
  
  /* Pricing Card Animation */
  .pricing-card {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
  }
  
  .pricing-card:hover {
    transform: translateY(-15px) !important;
  }
  
  .pricing-card.featured:hover {
    transform: scale(1.05) translateY(-15px) !important;
  }
  
  /* Button Hover Animations */
  .btn {
    position: relative;
    overflow: hidden;
  }
  
  .btn:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
  }
  
  .btn:hover:after {
    width: 300px;
    height: 300px;
  }
  
  /* FAQ Animation */
  .faq-item {
    transition: all 0.3s ease;
  }
  
  .faq-icon {
    transition: transform 0.3s ease;
  }
  
  .faq-item:hover {
    background-color: rgba(0, 212, 177, 0.03);
  }
  
  /* Testimonial Card Animation */
  .testimonial-card {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
  }
  
  .testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
  }
  
  /* Contact Form Animation */
  .form-control {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .form-control:focus {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 212, 177, 0.2) !important;
  }
  
  /* Footer Animation */
  .footer-links a {
    position: relative;
  }
  
  .footer-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
  }
  
  .footer-links a:hover:after {
    width: 100%;
  }
  
  /* Social Icons Animation */
  .social-icon {
    transition: transform 0.3s ease, background-color 0.3s ease;
  }
  
  .social-icon:hover {
    transform: translateY(-5px) rotate(5deg);
  }
  
  /* Shimmer effect for pricing cards */
  .pricing-card .pricing-header {
    position: relative;
    overflow: hidden;
  }
  
  .pricing-card .pricing-header:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: shimmer 3s infinite;
    pointer-events: none;
  }
  
  /* Page load animation for sections */
  .section-header {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
  }
  
  /* Counter Animation */
  @keyframes count-up {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .stat-counter {
    animation: count-up 2s ease forwards;
  }
  
  /* Mobile Menu Animation */
  .mobile-menu-btn {
    transition: transform 0.3s ease;
  }
  
  .mobile-menu-btn:hover {
    /* transform: rotate(90deg); */
  }
  
  /* Nav links hover effect */
  .nav-links a {
    position: relative;
  }
  
  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
  }
  
  .nav-links a:hover::after,.nav-links a.active::after {
    width: 100%;
  }
  
  /* Accessibility - Respect user preference for reduced motion */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.001s !important;
      transition-duration: 0.001s !important;
      animation-iteration-count: 1 !important;
    }
  }
  
  /* Scroll Progress Indicator */
  .scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    z-index: 9999;
    transition: width 0.2s ease;
  }
  
  /* Page Loader */
  .page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
  }
  
  .page-loader.loaded {
    opacity: 0;
    visibility: hidden;
  }
  
  .loader {
    text-align: center;
  }
  
  .loader-icon {
    width: 80px;
    height: 80px;
    animation: rotate 2s linear infinite;
  }
  
  .loader-icon circle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 4;
    stroke-dasharray: 226;
    stroke-dashoffset: 226;
    animation: dash 2s ease-in-out infinite;
  }
  
  .loader-text {
    margin-top: 20px;
    font-size: 18px;
    color: var(--text);
    font-weight: 500;
  }
  
  @keyframes dash {
    0% {
      stroke-dashoffset: 226;
    }
    50% {
      stroke-dashoffset: 56.5;
    }
    100% {
      stroke-dashoffset: 226;
    }
  }