/* Custom styles for Crossroads Community Resource Center */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf8f5;
}
::-webkit-scrollbar-thumb {
    background: #d45630;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c44220;
}

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

.service-card:hover {
    transform: translateY(-4px);
}

/* Navbar scroll effect */
.nav-scrolled {
    background: rgba(250, 248, 245, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-transparent {
    background: transparent !important;
    box-shadow: none !important;
}

/* Mobile menu animation */
.mobile-menu-open {
    animation: slideDown 0.3s ease forwards;
}

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

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .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; }
}

/* Hero text gradient for the italic highlight */
.text-terracotta-500 {
    color: #d45630;
}

/* Testimonial card hover */
.bg-white\\/5:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(212, 86, 48, 0.1);
}

/* Button ripple effect */
button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

button:active::after {
    opacity: 1;
}

/* Map styling */
iframe {
    filter: saturate(0.7) contrast(1.05);
    transition: filter 0.3s ease;
}

iframe:hover {
    filter: saturate(1) contrast(1);
}

/* Image hover zoom */
.rounded-2xl.overflow-hidden {
    overflow: hidden;
}

.rounded-2xl.overflow-hidden img {
    transition: transform 0.6s ease;
}

.rounded-2xl.overflow-hidden:hover img {
    transform: scale(1.03);
}

/* Ensure all text meets contrast requirements */
.text-warm-600 {
    color: #8c7360;
}

.text-warm-500 {
    color: #a89078;
}

.text-warm-400 {
    color: #c4b097;
}

.text-warm-300 {
    color: #dbcfb9;
}

.text-warm-200 {
    color: #ebe4d9;
}

/* Accessibility: focus visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d45630;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print styles */
@media print {
    nav, .scroll-indicator, #contactForm, #successMessage {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: #333 !important;
    }
}
