/* Custom styles for Mangonadas Lokas San Carlos */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #506e28;
}

/* Selection color */
::selection {
    background: #304119;
    color: #faf9f6;
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Navbar transition */
.nav-scrolled {
    background: rgba(250, 249, 246, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(48, 65, 25, 0.1);
}

.nav-scrolled #navbar a:not([class*="bg-"]) {
    color: #1f2a11 !important;
}

.nav-scrolled .mobile-link {
    color: #1f2a11 !important;
}

/* Hero gradient animation */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Image hover effects */
img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #9eba6d;
    outline-offset: 2px;
}

/* Form focus styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(80, 110, 40, 0.1);
}

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent layout shift on images */
img {
    content-visibility: 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;
        scroll-behavior: auto !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print styles */
@media print {
    nav,
    #contact-form,
    .animate-on-scroll {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
