/* Custom styles for Campbell Park Animal Hospital */

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

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

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

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

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

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.7s ease-out 0.1s forwards;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slideUpDelay 0.7s ease-out 0.3s forwards;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUpDelay2 0.7s ease-out 0.5s forwards;
    opacity: 0;
}

/* Intersection Observer animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Service card stagger animation */
.service-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.nav-scrolled .nav-link {
    color: #2D2D34 !important;
}

.nav-scrolled .logo-text {
    color: #2D2D34 !important;
}

/* Mobile menu */
.mobile-link {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateX(0);
}

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

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

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

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

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

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

/* Selection color */
::selection {
    background: #E86A5B;
    color: white;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #E86A5B;
    outline-offset: 2px;
}

/* Select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .animate-slide-up,
    .animate-slide-up-delay,
    .animate-slide-up-delay-2 {
        animation-duration: 0.5s;
    }
}
