/* Custom styles and overrides */

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

/* Scroll reveal base - content is visible by default */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply animation on systems that prefer motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Default state for scroll reveals below fold - hidden initially */
    .scroll-reveal:not(.revealed) {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar solid state */
#navbar.solid {
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

#navbar.solid .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #831f36;
}

/* Selection color */
::selection {
    background: #a1223b;
    color: white;
}

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

/* Select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' 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-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

/* Image loading placeholder */
img {
    background-color: #f1f5f9;
}

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

/* Service card hover - ensure text contrast */
.group:hover .group-hover\:text-white\/80 {
    color: rgba(255, 255, 255, 0.8);
}

/* Ensure all form inputs have proper focus styles */
input:focus, select:focus, textarea:focus {
    border-color: #a1223b !important;
    box-shadow: 0 0 0 3px rgba(161, 34, 59, 0.15) !important;
}
