/* Custom styles for Wray & Sons Roofing */

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

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

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

::-webkit-scrollbar-thumb {
    background: #d9b47e;
    border-radius: 4px;
}

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

/* Selection color */
::selection {
    background: #b85446;
    color: #ffffff;
}

/* Hero parallax effect */
#hero {
    background-attachment: fixed;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(253, 252, 250, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .text-stone-900 {
    color: #1c1917 !important;
}

#navbar.scrolled .text-stone-700 {
    color: #44403c !important;
}

/* Service card hover effect */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Fade in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Stagger animation delays */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

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

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

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

/* Button hover lift effect */
button, a {
    transition: all 0.3s ease;
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #f5ede0 25%, #eddcc4 50%, #f5ede0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

img[src] {
    animation: none;
    background: none;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Decorative line animation */
.w-24.h-0\.5.bg-terracotta-300 {
    position: relative;
    overflow: hidden;
}

.w-24.h-0\.5.bg-terracotta-300::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(184, 84, 70, 0.4), transparent);
    animation: shimmer-line 3s infinite;
}

@keyframes shimmer-line {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #hero {
        background-attachment: scroll;
    }
}
