/* Custom Styles for Algoa Millworks */

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

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

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

::-webkit-scrollbar-thumb {
    background: #1a7a25;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #14611c;
}

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

/* Animation for floating cards */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(var(--rotate, 0deg));
    }
    50% {
        transform: translateY(-10px) rotate(var(--rotate, 0deg));
    }
}

/* Apply float animation to stat cards */
.absolute .bg-white,
.absolute .bg-forest-700,
.absolute .bg-forest-800 {
    animation: float 4s ease-in-out infinite;
}

.absolute .bg-white:nth-child(1) {
    --rotate: 3deg;
    animation-delay: 0s;
}

.absolute .bg-forest-700:nth-child(2) {
    --rotate: -2deg;
    animation-delay: 0.5s;
}

.absolute .bg-white:nth-child(3) {
    --rotate: 6deg;
    animation-delay: 1s;
}

.absolute .bg-forest-800:nth-child(4) {
    --rotate: -3deg;
    animation-delay: 1.5s;
}

/* Hover effects for service cards */
.group:hover .bg-gradient-to-br img {
    filter: brightness(1.1);
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

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

/* Button hover effects */
button, a {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus {
    outline: 2px solid #1a7a25;
    outline-offset: 2px;
}

/* Reduce motion for accessibility */
@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) {
    .font-display {
        font-size: 3rem;
    }
    
    .font-display:nth-of-type(2) {
        font-size: 2.5rem;
    }
}

/* Print styles */
@media print {
    nav,
    #back-to-top,
    .group-hover\:opacity-100:hover {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
