/* Custom styles for Carlos Handyman Services */

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

/* Custom selection color */
::selection {
    background-color: #fbbf24;
    color: #3d0a1c;
}

/* Scroll reveal animations - progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll behavior */
#navbar.scrolled {
    background: rgba(61, 10, 28, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

#navbar.scrolled .nav-text {
    color: white;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #a12148;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #831f43;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Button hover effects */
button:hover,
a:hover {
    cursor: pointer;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Print styles */
@media print {
    #navbar,
    #back-to-top,
    .scroll-reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

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

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:not(.visible) {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}
