/* Custom styles for Weatherguard Home Improvements */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060b18;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

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

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* Service card hover glow */
.service-card:hover {
    box-shadow: 0 0 60px -15px rgba(52, 211, 153, 0.15);
}

/* Testimonial card hover */
.testimonial-card:hover {
    box-shadow: 0 0 60px -15px rgba(52, 211, 153, 0.1);
    transform: translateY(-4px);
}

/* Gallery item hover overlay */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 11, 24, 0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: inherit;
}
.gallery-item:hover::after {
    opacity: 1;
}

/* Navbar glass effect */
.navbar-scrolled {
    background: rgba(6, 11, 24, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(52, 211, 153, 0.1);
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.5s; }

.reveal-stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* Gold shimmer effect on hover for buttons */
button:hover, a:hover {
    /* handled by Tailwind utilities */
}

/* Selection color */
::selection {
    background: rgba(52, 211, 153, 0.3);
    color: #f0fdf4;
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input autofill override */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0a0f1e inset !important;
    -webkit-text-fill-color: #f8fafc !important;
}

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

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent layout shift on lazy images */
.gallery-item {
    position: relative;
}
