/* Custom styles for Dr. Hassnin Al-Badran Surgical Clinic */

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

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(255, 248, 249, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(143, 23, 51, 0.08);
}

/* Floating card animations */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
}

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

/* Service card hover effects */
.service-card {
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(143, 23, 51, 0.25);
}

/* Testimonial card hover */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(143, 23, 51, 0.15);
}

/* Mobile menu transitions */
#mobileMenu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile link animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Scroll reveal animations (below fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered reveal delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none;
    }
    
    .service-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

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

::-webkit-scrollbar-track {
    background: #fff8f9;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #d12548;
}

/* Selection color */
::selection {
    background: #f9d0d9;
    color: #400816;
}
