/* Custom styles for South West Gastroenterology */

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

/* Custom font sizes */
.font-serif {
    font-family: 'Playfair Display', serif;
}

.font-sans {
    font-family: 'Nunito', sans-serif;
}

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

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

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

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

/* Blob animations */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(20px, 50px) scale(1.05);
    }
}

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

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

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

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .floating-card,
    .animate-blob,
    .scroll-reveal {
        animation: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

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

::-webkit-scrollbar-thumb {
    background: #2d7a2d;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e5c1e;
}

/* Mobile menu transitions */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

#mobileMenu.open {
    max-height: 500px;
    opacity: 1;
}

/* Card hover effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #2d7a2d;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print styles */
@media print {
    nav,
    #backToTop,
    .floating-card {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-forest-500,
    .bg-forest-600,
    .bg-forest-700 {
        background: #2d7a2d !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
