/* Custom styles for Rud & Whittington Chiropractic */

/* Smooth scroll offset for fixed nav */
html {
    scroll-padding-top: 80px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060e1a;
}
::-webkit-scrollbar-thumb {
    background: #172e4d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c9a84c;
}

/* Selection color */
::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #f8f6f0;
}

/* Fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Gold shimmer */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Apply fade-in to sections */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.3s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.4s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.5s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.6s; }

.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

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

.mobile-menu-open #menu-icon span:nth-child(1) {
    transform: translateY(2.5px) rotate(45deg);
}
.mobile-menu-open #menu-icon span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-open #menu-icon span:nth-child(3) {
    transform: translateX(4px) rotate(-45deg);
    width: 100%;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Input autofill styling for dark theme */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0a1628 inset !important;
    -webkit-text-fill-color: #f8f6f0 !important;
}

/* Gold text gradient for special elements */
.gold-gradient-text {
    background: linear-gradient(135deg, #d4b76a, #c9a84c, #8a6f2e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle pulse for the gold dot */
@keyframes softPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.animate-soft-pulse {
    animation: softPulse 2s ease-in-out infinite;
}

/* Image hover zoom */
img {
    transition: transform 0.6s ease;
}

/* 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;
    }
    .fade-in, .fade-in-stagger > * {
        opacity: 1;
        transform: none;
    }
}
