/* ===== Custom Styles for Cortland Family Practice ===== */

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

/* Hero entrance animations */
.hero-elem {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.8s ease forwards;
}

.hero-elem:nth-child(1) { animation-delay: 0.1s; }
.hero-elem:nth-child(2) { animation-delay: 0.25s; }
.hero-elem:nth-child(3) { animation-delay: 0.4s; }
.hero-elem:nth-child(4) { animation-delay: 0.55s; }
.hero-elem:nth-child(5) { animation-delay: 0.7s; }

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Service card shimmer effect */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.03), transparent);
    transition: left 0.6s ease;
    border-radius: inherit;
}

.service-card:hover::before {
    left: 100%;
}

/* Scroll indicator */
.scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* Navbar glass effect when scrolled */
nav.scrolled {
    background: rgba(7, 2, 16, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(124, 58, 238, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu animation */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

::-webkit-scrollbar-track {
    background: #0f0520;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #9333ea;
}

/* Selection color */
::selection {
    background: rgba(168, 85, 247, 0.4);
    color: #f3e8ff;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-elem {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .scroll-indicator {
        animation: none;
    }
    
    .service-card {
        transition: none;
    }
}

/* Select dropdown styling */
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='%23a855f7' 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;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #1a0a2e inset !important;
    -webkit-text-fill-color: #f3e8ff !important;
    caret-color: #f3e8ff;
}

/* Map dark theme overlay */
iframe[src*="google.com/maps"] {
    filter: invert(90%) hue-rotate(180deg) brightness(0.9) contrast(1.1);
}
