/* Custom styles for Dr. Ali Medical */

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

/* Selection color */
::selection {
    background-color: #581c54;
    color: #fffbeb;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Hero image parallax effect */
#hero img {
    transition: transform 0.6s ease-out;
}

/* Service card hover effect */
.group:hover svg {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.group svg {
    transition: transform 0.3s ease;
}

/* Form focus animations */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(88, 28, 84, 0.1);
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button ripple effect */
button,
a {
    position: relative;
    overflow: hidden;
}

/* Subtle line animations */
.w-px {
    transition: height 0.5s ease;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}

/* Mobile menu active state */
#menu-toggle.active span:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-toggle.active span:last-child {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Form success animation */
#form-success {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
