/* Custom styles for Rapid Roof Repair Corpus Christi */

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(4, 120, 87, 0.1);
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #047857, #10b981);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Floating animation for stat cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.floating-card-1 {
    animation: float 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float-delayed 3.5s ease-in-out infinite;
}

.floating-card-3 {
    animation: float-slow 5s ease-in-out infinite;
}

/* Scroll reveal animations (below fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

.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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobile-menu.open {
    max-height: 400px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #065f46;
}

/* Selection color */
::selection {
    background: #047857;
    color: #fefdf8;
}

/* Image aspect ratio helpers */
img {
    max-width: 100%;
    height: auto;
}

/* Focus styles for accessibility */
a:focus-visible, button:focus-visible {
    outline: 2px solid #047857;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Testimonial card hover */
.bg-cream-50.rounded-2xl {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bg-cream-50.rounded-2xl:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(4, 120, 87, 0.1);
}

/* Process step hover */
.relative.text-center > .w-16 {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.relative.text-center:hover > .w-16 {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(4, 120, 87, 0.4) !important;
}

/* Button ripple effect */
button, a {
    position: relative;
    overflow: visible;
}

/* Hero image parallax (subtle) */
@media (prefers-reduced-motion: no-preference) {
    .hero-image {
        will-change: transform;
    }
}

/* Print styles */
@media print {
    nav, #mobile-menu-btn, .floating-card-1, .floating-card-2, .floating-card-3 {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .bg-emerald-950, .bg-emerald-700 {
        background: #064e3b !important;
        color: #fff !important;
    }
}
