/* Custom styles for Soelberg Industries Of Kentucky */

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

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

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite;
}

/* Scroll reveal - progressive enhancement with prefers-reduced-motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

/* Fallback: ensure content is always visible if JS is disabled */
@media not all and (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(157, 23, 77, 0.08);
}

.navbar-scrolled .nav-link {
    color: rgba(125, 22, 62, 0.7) !important;
}

.navbar-scrolled .nav-link:hover {
    color: rgba(125, 22, 62, 1) !important;
}

/* Mobile menu transitions */
#mobileMenu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Mobile link hover */
.mobile-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.2s ease;
}

.mobile-link:hover {
    padding-left: 12px;
}

.mobile-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #be185d, #f59e0b);
    transition: width 0.2s ease;
    border-radius: 1px;
}

.mobile-link:hover::before {
    width: 8px;
}

/* Input focus animations */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.1);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #be185d, #f59e0b);
    border-radius: 4px;
}

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

/* Selection color */
::selection {
    background: rgba(190, 24, 93, 0.2);
    color: #500724;
}

/* Card hover effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Gradient text fallback for older browsers */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

/* Ensure images don't cause layout shift */
img {
    max-width: 100%;
    height: auto;
}

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

    .animate-float,
    .animate-float-delay {
        animation: none;
    }
}

/* Tablet and up adjustments */
@media (min-width: 768px) {
    .hero-gradient {
        background: linear-gradient(135deg, #fbcfe8 0%, #fef3c7 50%, #fce7f3 100%);
    }
}

/* Large screen optimizations */
@media (min-width: 1024px) {
    .lg\:hover\:shadow-2xl:hover {
        box-shadow: 0 25px 50px -12px rgba(157, 23, 77, 0.15);
    }
}
