/* Custom styles for Animal Emergency Clinic of Brandon */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

/* Selection color */
::selection {
    background: rgba(20, 184, 166, 0.3);
    color: #f1f5f9;
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 4s ease-in-out infinite;
    animation-delay: 2s;
}

/* Service card hover glow */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: radial-gradient(ellipse at center, rgba(20, 184, 166, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card:hover::before {
    opacity: 1;
}

/* Testimonial card hover */
.testimonial-card {
    transition: transform 0.5s ease, border-color 0.5s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* Navbar glass effect */
.nav-scrolled {
    background: rgba(2, 6, 23, 0.85) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}

/* Fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.3s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.4s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.5s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.6s; }

.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Pulse ring for the live indicator */
@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(45, 212, 191, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(45, 212, 191, 0);
    }
}

.pulse-ring {
    animation: pulse-ring 2s ease-out infinite;
}

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

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

/* Back to top button */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#back-to-top.show {
    opacity: 1;
    pointer-events: all;
}

#back-to-top.hide {
    opacity: 0;
    pointer-events: none;
}

/* Form input focus effects */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* Gradient text utility */
.text-gradient-teal {
    background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 50%, #0d9488 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Image lazy load placeholder */
img[loading="lazy"] {
    transition: opacity 0.5s ease;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
    .font-serif {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}

/* Print styles */
@media print {
    nav, #back-to-top, button {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
}
