/* Custom Styles - Editorial Mortgage Website */

/* Base */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Navigation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-text-color {
    color: #1e3323;
    transition: color 0.3s ease;
}

.nav-text-color-muted {
    color: #4a7c52;
    transition: color 0.3s ease;
}

/* Navbar scroll state */
.navbar-scrolled .nav-text-color {
    color: #1e3323;
}

.navbar-scrolled .nav-text-color-muted {
    color: #4a7c52;
}

.navbar-scrolled .nav-link {
    color: #1e3323;
}

.navbar-dark .nav-text-color {
    color: #faf9f6;
}

.navbar-dark .nav-text-color-muted {
    color: #dce8e1;
}

.navbar-dark .nav-link {
    color: #dce8e1;
}

/* Mobile Menu */
.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #4a7c52;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::after {
    width: 60%;
}

/* Service Cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #2d4d34, #4a7c52);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Process Steps */
.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #dce8e1, transparent);
}

.process-step:last-child::after {
    display: none;
}

/* Testimonial Cards */
.testimonial-card {
    position: relative;
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(45, 77, 52, 0.1);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    right: 30px;
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    color: #dce8e1;
    line-height: 1;
    pointer-events: none;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Button hover effects */
a {
    transition: all 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: #f5f3ee;
}

::-webkit-scrollbar-thumb {
    background: #96bc9e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a7c52;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .service-card::before,
    .testimonial-card,
    a,
    button {
        transition: none;
    }
}

/* Selection color */
::selection {
    background: #dce8e1;
    color: #1e3323;
}

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