/* Custom styles for JD Equipment */

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

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

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

::-webkit-scrollbar-thumb {
    background: #0f766e;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #115e59;
}

/* Selection color */
::selection {
    background-color: #ccfbf1;
    color: #134e4a;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    .reveal-on-scroll.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-on-scroll.delay-1 {
        transition-delay: 0.1s;
    }
    
    .reveal-on-scroll.delay-2 {
        transition-delay: 0.2s;
    }
    
    .reveal-on-scroll.delay-3 {
        transition-delay: 0.3s;
    }
}

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

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

/* Navbar scroll effect */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Hover card lift effect */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* Image hover zoom */
img {
    transition: transform 0.3s ease;
}

/* Print styles */
@media print {
    header,
    footer,
    #back-to-top,
    .group-hover\\:scale-110 {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
    }
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
    .bg-teal-700 {
        background-color: #004d40 !important;
    }
    
    .text-teal-700 {
        color: #004d40 !important;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .group:hover .group-hover\\:text-white {
        color: inherit;
    }
    
    .group:hover .group-hover\\:bg-white {
        background-color: inherit;
    }
    
    button,
    a {
        touch-action: manipulation;
    }
}

/* Large screen optimizations */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}

/* Landscape mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .min-h-screen {
        min-height: auto;
        padding-top: 6rem;
    }
}
