/* Custom styles for Irrigation Services */

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

/* Custom selection color */
::selection {
    background-color: #7a2222;
    color: #fefdfb;
}

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(122, 34, 34, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled span:first-of-type {
    color: #3d1010 !important;
}

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

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

/* Service card hover glow */
.group:hover .w-14 {
    box-shadow: 0 0 0 4px rgba(122, 34, 34, 0.08);
}

/* Form input focus animation */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(122, 34, 34, 0.1);
}

/* Subtle gradient for hero decorative circles */
.bg-burgundy-100 {
    background-color: rgba(244, 200, 200, 0.5);
}

/* Ensure images don't cause layout shift */
img {
    will-change: transform;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9a2b2b;
}

/* Scroll reveal animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Button ripple effect */
button, a {
    position: relative;
    overflow: visible;
}
