/* Custom styles for Budget Plumbing Heating & Air */

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: rgba(16, 185, 129, 0.3);
    color: #fefdf8;
}

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

::-webkit-scrollbar-track {
    background: #0a0f0d;
}

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

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

/* Navbar transitions */
#navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
    background: rgba(10, 15, 13, 0.95);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Hero animations - above the fold, always visible */
.fade-in {
    opacity: 1;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: var(--delay, 0s);
    animation-fill-mode: both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

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

.mobile-link:hover {
    padding-left: 0.75rem;
}

/* Service card hover effect */
.group:hover .group-hover\:bg-emerald-800 {
    background-color: rgba(4, 120, 87, 0.5);
}

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

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

/* Ensure text readability on gradients */
.text-transparent.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.15;
    }
}

/* Print styles */
@media print {
    #navbar,
    .animate-bounce {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
