/* Custom styles for Shamrock Farms */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdfcfa;
}
::-webkit-scrollbar-thumb {
    background: #047857;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #065f46;
}

/* Selection color */
::selection {
    background: #047857;
    color: #fdfcfa;
}

/* Service card hover effect */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(4, 120, 87, 0.15);
}

/* Mobile menu transitions */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(4, 120, 87, 0.1);
}

#navbar.scrolled .menu-line {
    background: #047857;
}

/* Mobile menu open state */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

/* Mobile menu close state */
#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Hamburger animation */
.menu-open .menu-line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-open .menu-line:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

/* Fade-in animation for scroll sections */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Button hover lift */
a[href="#contact"],
a[href="#hero"],
a[href="#services"],
button[type="submit"] {
    transition: all 0.3s ease;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .fade-in,
    .stagger-children > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .service-card {
        transition: none;
    }
    .service-card:hover {
        transform: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif.text-5xl {
        font-size: 2.5rem;
    }
    .font-serif.text-6xl {
        font-size: 3rem;
    }
}
