/* Custom styles for Rocky Mountain Plumbing & Remodel */

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

/* Prevent flash of hidden content - all content visible by default */
.service-card,
.gallery-item {
    opacity: 1;
}

/* Navbar scroll state */
nav.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Mobile menu animations */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(43, 80, 51, 0.1);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Hamburger animation */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Floating card animations */
@keyframes float1 {
    0%, 100% { transform: rotate(2deg) translateY(0px); }
    50% { transform: rotate(2deg) translateY(-8px); }
}

@keyframes float2 {
    0%, 100% { transform: rotate(-1deg) translateY(0px); }
    50% { transform: rotate(-1deg) translateY(-6px); }
}

@keyframes float3 {
    0%, 100% { transform: rotate(1deg) translateY(0px); }
    50% { transform: rotate(1deg) translateY(-10px); }
}

@keyframes float4 {
    0%, 100% { transform: rotate(-2deg) translateY(0px); }
    50% { transform: rotate(-2deg) translateY(-5px); }
}

.hero-card-1 { animation: float1 4s ease-in-out infinite; }
.hero-card-2 { animation: float2 5s ease-in-out infinite; }
.hero-card-3 { animation: float3 4.5s ease-in-out infinite; }
.hero-card-4 { animation: float4 3.5s ease-in-out infinite; }

/* Subtle hover lift on service cards */
.service-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Gallery hover effects */
.gallery-item {
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #4a8456;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: #366641;
    color: #FAFAF7;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6ba576;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    #hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 80px;
    }
    
    .hero-stats {
        display: none;
    }
}
