/* Custom styles for Dr. Gary Reznik MD website */

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

/* Navbar scroll state */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

#navbar.scrolled {
    background: rgba(8, 15, 30, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(131, 20, 67, 0.2);
}

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

.floating-card-2 {
    animation: float2 5s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

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

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

/* Reveal animations (progressive enhancement - only when JS is enabled and reduced motion not preferred) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

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

    /* Initial state for revealed elements - only applied via JS */
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(24px);
    }

    .reveal[data-reveal].revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered delays */
    .service-card:nth-child(1) { transition-delay: 0.05s; }
    .service-card:nth-child(2) { transition-delay: 0.1s; }
    .service-card:nth-child(3) { transition-delay: 0.15s; }
    .service-card:nth-child(4) { transition-delay: 0.2s; }
    .service-card:nth-child(5) { transition-delay: 0.25s; }
    .service-card:nth-child(6) { transition-delay: 0.3s; }

    .info-card:nth-child(1) { transition-delay: 0.05s; }
    .info-card:nth-child(2) { transition-delay: 0.1s; }
    .info-card:nth-child(3) { transition-delay: 0.15s; }
    .info-card:nth-child(4) { transition-delay: 0.2s; }
}

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

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

.mobile-link {
    display: block;
    padding: 8px 0;
}

.mobile-link:hover {
    padding-left: 8px;
}

/* Selection color */
::selection {
    background: rgba(131, 20, 67, 0.5);
    color: white;
}

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

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

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

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

/* 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 12 12' fill='none'%3E%3Cpath d='M3 4.5l3 3 3-3' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

/* Button hover lift effect */
button, a {
    transition: all 0.2s ease;
}

/* Image placeholder fallback */
img {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}
