/* Custom styles for Berks Schuylkill Respiratory Specialists */

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

/* Selection color */
::selection {
    background-color: rgba(126, 34, 206, 0.15);
    color: #581c87;
}

/* Float animations for hero cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 4.5s ease-in-out infinite;
    animation-delay: 1s;
}

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

/* Scroll reveal - applied via JS for progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .reveal-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
nav.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(126, 34, 206, 0.08);
}

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

/* Mobile menu active state */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

/* Menu button animation */
.menu-line.active:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-line.active:nth-child(2) {
    opacity: 0;
}

.menu-line.active:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* Service card hover */
.service-card {
    will-change: transform;
}

/* Subtle line decorations */
.divider-line {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(126, 34, 206, 0.2), transparent);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #7e22ce;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile link transitions */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

/* Prevent FOUC on dark section */
.bg-plum-950 {
    background-color: #3b0764;
}
