/* ==========================================
   Miller Creek Property Investments
   Custom Styles
   ========================================== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Selection color */
::selection {
    background-color: #065f46;
    color: white;
}

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

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

#mobile-menu.inactive {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* Navbar glass effect */
#navbar.scrolled {
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

/* Service card hover lift */
.group:hover {
    transform: translateY(-2px);
}

.group {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Image lazy load fade */
img[loading="lazy"] {
    transition: opacity 0.6s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

img[loading="lazy"] {
    opacity: 0;
}

/* Testimonial card subtle shift */
#testimonials .group {
    transform: translateY(0);
}

#testimonials .group:hover {
    transform: translateY(-4px);
}

/* CTA section hover */
#contact a[href="#contact"]:hover {
    transform: translateY(-2px);
}

/* Map container */
iframe {
    width: 100%;
    height: 100%;
}

/* Custom select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23065f46' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 12px;
}

/* Reduced motion */
@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;
    }
}

/* Print styles */
@media print {
    #navbar, #mobile-menu-btn, iframe {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
