/* Custom styles for Fitosanitarios Lerma */

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

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

::-webkit-scrollbar-track {
    background: #0F0A0C;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #D4A574, #781F37);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #E9D28A, #a32542);
}

/* Selection color */
::selection {
    background: rgba(212, 165, 116, 0.3);
    color: #F9F1D8;
}

/* Navbar transitions */
#navbar.scrolled {
    background: rgba(15, 10, 12, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 165, 116, 0.1);
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

/* Mobile menu animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Menu button animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Service card shine effect */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.05), transparent);
    transition: left 0.7s ease;
    border-radius: inherit;
    pointer-events: none;
}

.service-card:hover::before {
    left: 100%;
}

/* Gold gradient text animation */
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hero text reveal animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery hover overlay */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(120, 31, 55, 0.3), rgba(212, 165, 116, 0.1));
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Floating animation for hero elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Pulse glow for CTA */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 165, 116, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 165, 116, 0.4);
    }
}

/* Intersection Observer animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Decorative line */
.section-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #D4A574, transparent);
}

/* Input focus glow */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

/* Mobile menu backdrop */
#mobile-menu {
    animation: menuSlideIn 0.5s ease forwards;
}

@keyframes menuSlideIn {
    from {
        opacity: 0;
        clip-path: circle(0% at calc(100% - 2rem) 2rem);
    }
    to {
        opacity: 1;
        clip-path: circle(150% at calc(100% - 2rem) 2rem);
    }
}

#mobile-menu.closing {
    animation: menuSlideOut 0.3s ease forwards;
}

@keyframes menuSlideOut {
    from {
        opacity: 1;
        clip-path: circle(150% at calc(100% - 2rem) 2rem);
    }
    to {
        opacity: 0;
        clip-path: circle(0% at calc(100% - 2rem) 2rem);
    }
}
