/* Custom styles for Hurst & Son Handyman & Remodel */

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

/* Custom selection color */
::selection {
    background-color: #c41e3a;
    color: white;
}

/* Navbar scroll effect */
#navbar.scrolled {
    background-color: rgba(255, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(196, 30, 58, 0.08);
}

/* Geometric shape animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(12deg); }
    50% { transform: translateY(-20px) rotate(12deg); }
}

@keyframes floatReverse {
    0%, 100% { transform: translateY(0px) rotate(45deg); }
    50% { transform: translateY(15px) rotate(45deg); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* Apply animations with reduced motion support */
@media (prefers-reduced-motion: no-preference) {
    .absolute.top-32.right-\[15%\] {
        animation: float 6s ease-in-out infinite;
    }
    
    .absolute.top-48.right-\[12%\] {
        animation: float 5s ease-in-out infinite 1s;
    }
    
    .absolute.bottom-40.left-\[5%\] {
        animation: floatReverse 7s ease-in-out infinite;
    }
}

/* Service card hover line animation */
.group:hover .absolute.top-8.right-8 {
    transform: translateX(0);
}

/* Image hover zoom */
.group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scroll reveal animations (below fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Mobile menu transition */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobileMenu.open {
    max-height: 400px;
}

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

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

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

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

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

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

button:active, a:active {
    transform: scale(0.98);
}

/* Ensure all text is readable */
.text-burgundy-950 {
    color: #380a10;
}

.text-burgundy-600 {
    color: #b01c35;
}

.text-burgundy-300 {
    color: #f3a8a8;
}

.text-burgundy-200 {
    color: #f9d0d0;
}

/* Mobile menu link hover */
.mobile-link {
    padding: 0.5rem 0;
    border-bottom: 1px solid #fce7e7;
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Gallery image overlay */
.group .absolute.inset-0 {
    transition: opacity 0.5s ease;
}

/* CTA section decorative dots */
.w-4.h-4, .w-6.h-6 {
    animation: pulse-dot 2s ease-in-out infinite;
}

.w-6.h-6 {
    animation-delay: 0.5s;
}

.w-3.h-3 {
    animation-delay: 1s;
}

@media (prefers-reduced-motion: no-preference) {
    .w-4.h-4, .w-6.h-6, .w-3.h-3 {
        animation: pulse-dot 2s ease-in-out infinite;
    }
    .w-6.h-6 {
        animation-delay: 0.5s;
    }
    .w-3.h-3 {
        animation-delay: 1s;
    }
}
