/* Custom styles for American Home Finance And Lending */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #112240;
}
::-webkit-scrollbar-thumb {
    background: #c9a84c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4b95e;
}

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(10, 22, 40, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Service card hover */
.service-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-card:hover {
    transform: translateY(-4px);
}

/* Process step connector line animation */
.process-step:hover .process-step-line {
    background: #c9a84c;
}

/* Testimonial card hover */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover {
    transform: translateY(-4px);
}

/* Mobile menu animations */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
#mobileMenu.active {
    max-height: 400px;
}

.menu-bar {
    transition: all 0.3s ease;
}
#menuToggle.active .menu-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuToggle.active .menu-bar:nth-child(2) {
    opacity: 0;
}
#menuToggle.active .menu-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
}

/* Mobile link animation */
.mobile-link {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#mobileMenu.active .mobile-link {
    opacity: 1;
    transform: translateX(0);
}
#mobileMenu.active .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.active .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.active .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.active .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.active .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Fade-in animation for below-fold content */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Gold gradient text */
.gold-gradient {
    background: linear-gradient(135deg, #c9a84c, #d4b95e, #c9a84c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Selection color */
::selection {
    background: #c9a84c;
    color: #0a1628;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #c9a84c;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .fade-in {
        opacity: 1;
        transform: none;
    }
    .service-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
}
