/* ===== Custom Styles for Hayes Mobile Home Service ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0c;
}
::-webkit-scrollbar-thumb {
    background: #741a1a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a82525;
}

/* Selection color */
::selection {
    background: rgba(212, 160, 74, 0.3);
    color: #fff;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Service card hover effects */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(212, 160, 74, 0.05);
}

/* Mobile menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Mobile menu links */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Hamburger animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

/* Gold shimmer effect on hover */
.shimmer:hover {
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(240, 208, 144, 0.1) 50%,
        transparent 60%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out;
}

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

/* Process step connector lines */
@media (min-width: 1024px) {
    .process-connector {
        position: relative;
    }
    .process-connector::after {
        content: '';
        position: absolute;
        top: 40px;
        right: -40%;
        width: 80%;
        height: 2px;
        background: linear-gradient(to right, rgba(212, 160, 74, 0.3), transparent);
    }
    .process-connector:last-child::after {
        display: none;
    }
}

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

/* Select dropdown */
select option {
    background: #0a0a0c;
    color: #fff;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid rgba(212, 160, 74, 0.5);
    outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
