/* Custom styles for H&S Home Repair website */

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

/* Base styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation scroll effect */
.nav-scrolled {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-scrolled.scrolled {
    background-color: rgba(42, 19, 25, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.reveal.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .reveal.animate-in {
        opacity: 1;
        transform: none;
    }
    html {
        scroll-behavior: auto;
    }
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

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

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

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

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

/* Selection color */
::selection {
    background-color: #c8963e;
    color: #2a1319;
}

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

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

/* Card hover effects */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Button press effect */
button:active,
a:active {
    transform: scale(0.98);
}

/* Gallery image container */
.group {
    position: relative;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
