/* Custom styles for Dolatowski Dental */

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

/* Scroll reveal base - content always visible by default */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* When JS is active, add hidden state for scroll-triggered animation */
.js-active .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
}

.js-active .scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Floating card animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(-1deg); }
}

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

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

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

.card-float-1 { animation: float1 4s ease-in-out infinite; }
.card-float-2 { animation: float2 5s ease-in-out infinite; }
.card-float-3 { animation: float3 4.5s ease-in-out infinite; }
.card-float-4 { animation: float4 3.5s ease-in-out infinite; }

/* Navbar glass effect */
#navbar.scrolled {
    background: rgba(250, 245, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(124, 58, 237, 0.08);
}

#navbar.scrolled .nav-link {
    color: #581c87;
}

#navbar.scrolled .nav-link:hover {
    background: rgba(124, 58, 237, 0.1);
    color: #3b0764;
}

/* Mobile menu animation */
#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;
}

/* Mobile link hover */
.mobile-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-weight: 500;
    color: #581c87;
    transition: background-color 0.2s ease;
}

.mobile-link:hover {
    background-color: #f3e8ff;
}

/* Gradient definitions for SVG icons */
defs linearGradient {
    /* These are defined inline in HTML */
}

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

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

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

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

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .scroll-reveal {
        opacity: 1;
        transform: none;
    }

    .card-float-1,
    .card-float-2,
    .card-float-3,
    .card-float-4 {
        animation: none;
    }
}

/* Print styles */
@media print {
    #navbar,
    .scroll-indicator,
    button,
    form {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }
}
