/* ==========================================
   Mortgage Made Easy - Dark Green Theme
   Custom Styles (Animations, Marquee, Nav)
   ========================================== */
/* Prevent horizontal scroll issues on mobile devices */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}
/* ------------------------------------------
   Navigation Link Styles
------------------------------------------ */
.nav-link {
    transition: color 0.2s ease;
    color: #1E2421; /* charcoal */
}
.nav-link:hover,
.nav-link.active {
    color: #2D6A4F; /* moss green */
}

/* ------------------------------------------
   Infinite Horizontal Marquee (Reviews & Lenders)
------------------------------------------ */
.marquee-container {
    display: flex;
    overflow: hidden;
    width: 100%;
    position: relative;
    user-select: none;
    padding: 1rem 0;
    mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
}

.marquee-content {
    display: flex;
    flex-shrink: 0;
    min-width: 100%;
    gap: 2rem;
    animation: scrollMarquee 45s linear infinite;
}

/* Pause on hover for better UX */
.marquee-container:hover .marquee-content {
    animation-play-state: paused;
}

.marquee-item {
    flex-shrink: 0;
    width: 380px;
    box-sizing: border-box;
    white-space: normal;
}

@keyframes scrollMarquee {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .marquee-item {
        width: 300px;
    }
}

/* ------------------------------------------
   Premium Animations (Fade, Slide, Scale, Bounce)
------------------------------------------ */
.animate-fade-in {
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animate-fade-in-delay {
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
}
.animate-fade-in-delay-2 {
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
    opacity: 0;
}
.animate-fade-in-delay-3 {
    animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
    opacity: 0;
}

.animate-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animate-slide-up-delay {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
    opacity: 0;
}
.animate-slide-down {
    animation: slideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-left {
    animation: slideLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animate-slide-right {
    animation: slideRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.animate-scale-in-delay {
    animation: scaleIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
    opacity: 0;
}
.animate-scale-in-delay-2 {
    animation: scaleIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
    opacity: 0;
}
.animate-scale-in-delay-3 {
    animation: scaleIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
    opacity: 0;
}

.animate-bounce-in {
    animation: bounceIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.05);
    }
    80% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ------------------------------------------
   Card hover lift
------------------------------------------ */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.15);
}

/* Premium shadows */
.shadow-premium {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05), 0 4px 8px rgba(0, 0, 0, 0.02);
}
.shadow-premium-lg {
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.2);
}

/* Responsive video/images */
img, video {
    max-width: 100%;
    height: auto;
}

/* Mobile menu transition */
#mobileMenu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .marquee-content {
        animation: none;
        transform: translateX(0);
    }
    [class*="animate-"] {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}