/* Custom styles for Swabco website */

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

/* Prevent layout shift for images */
img {
    max-width: 100%;
    height: auto;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9bc188;
}

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

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-pulse {
        animation: none;
    }
}

/* Mobile menu transitions */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(251, 252, 249, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(47, 83, 37, 0.08);
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Card hover effects */
.group:hover .group-hover\\:from-forest-700 {
    background: linear-gradient(135deg, #2f5325 0%, #3c6a2f 100%);
}

/* Ensure text contrast on gradient backgrounds */
.text-forest-900 {
    color: #1f3719;
}

.text-forest-800 {
    color: #26431e;
}

.text-forest-700 {
    color: #2f5325;
}

.text-forest-600 {
    color: #3c6a2f;
}

.text-forest-500 {
    color: #528540;
}

/* Hero gradient text effect */
.font-serif .italic {
    font-style: italic;
}

/* Selection color */
::selection {
    background: #c5dbb9;
    color: #1f3719;
}

/* Button active states */
button:active,
a:active {
    transform: scale(0.98) !important;
}

/* Loading state for form */
button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
