/* === Custom Styles for Davis Heating & Cooling === */

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

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

/* Reveal animation - progressive enhancement */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(10, 18, 25, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

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

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

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

::-webkit-scrollbar-track {
    background: #101e2c;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #48627a;
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

#back-to-top {
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}

/* Image hover zoom */
.group img {
    transition: transform 0.5s ease;
}

.group:hover img {
    transform: scale(1.05);
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}
