/* Custom styles for Elkton Family Eye Care */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: #2b4c78;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1d3757;
}

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

.floating-card:nth-child(1) {
    animation-delay: 0s;
}
.floating-card:nth-child(2) {
    animation-delay: -1.5s;
}
.floating-card:nth-child(3) {
    animation-delay: -3s;
}
.floating-card:nth-child(4) {
    animation-delay: -4.5s;
}

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

/* Service card hover effects */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1fa875, #2b4c78);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* Frame card hover */
.frame-card {
    position: relative;
}

/* Navbar styles */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #1fa875;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
    padding-left: 1rem;
    border-left: 2px solid #d0d9e6;
}

.mobile-nav-link:hover {
    border-left-color: #1fa875;
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    translate: 0;
}

/* Testimonial card subtle glow */
.testimonial-card:hover {
    border-color: rgba(127, 226, 182, 0.3);
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #1fa875;
    outline-offset: 2px;
}

/* Form input focus states */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(31, 168, 117, 0.1);
}

/* Print styles */
@media print {
    nav, #back-to-top, .floating-card {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
