/* Custom styles for Daniel Mego Family Clinic */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf0f2;
}
::-webkit-scrollbar-thumb {
    background: #b81d40;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #781F2E;
}

/* Floating card animations */
.floating-card {
    animation: float 6s ease-in-out infinite;
}
.floating-card-2 {
    animation: float 5s ease-in-out infinite 0.5s;
}
.floating-card-3 {
    animation: float 7s ease-in-out infinite 1s;
}
.floating-card-4 {
    animation: float 4.5s ease-in-out infinite 0.3s;
}

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

/* Hero geometric shapes animation */
.hero-geo {
    animation: floatSlow 10s ease-in-out infinite;
}
.hero-geo:nth-child(2) { animation-delay: -2s; animation-duration: 12s; }
.hero-geo:nth-child(3) { animation-delay: -4s; animation-duration: 14s; }
.hero-geo:nth-child(4) { animation-delay: -1s; animation-duration: 8s; }
.hero-geo:nth-child(5) { animation-delay: -3s; animation-duration: 9s; }
.hero-geo:nth-child(6) { animation-delay: -5s; animation-duration: 11s; }

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(var(--rotate, 45deg)); }
    50% { transform: translateY(-20px) rotate(var(--rotate, 45deg)); }
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 20px rgba(120, 31, 46, 0.08);
}

nav.scrolled .font-heading,
nav.scrolled a:not(.bg-burgundy-600):not(.bg-burgundy-500) {
    color: #781F2E !important;
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* Service card hover effects */
.group:hover .absolute {
    transform: scale(1.2);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #781F2E;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: #f9d4d9;
    color: #781F2E;
}
