/* Custom styles for 4R Boer Goats */

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

/* Navbar scroll effect */
nav.scrolled {
    background: rgba(5, 16, 28, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Navigation link hover underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #50b891;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu link styles */
.mobile-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Scroll reveal base state - always visible */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Scroll reveal animation - only when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal.animated {
        animation: fadeInUp 0.6s ease forwards;
    }
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2d8365;
}

/* Selection color */
::selection {
    background: rgba(80, 184, 145, 0.3);
    color: #d4f0e4;
}

/* Select dropdown styling */
select option {
    background: #142d4a;
    color: #ffffff;
}

/* Focus visible styles */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid #50b891;
    outline-offset: 2px;
}

/* Button hover lift effect */
button,
a[href] {
    transition: all 0.3s ease;
}

/* Subtle pattern overlay for sections */
section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

/* Ensure all images have smooth rendering */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Prevent layout shift on form elements */
input,
textarea,
select {
    font-size: 16px;
}

/* Mobile menu transition */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

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

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

/* Apply float animation to floating cards */
.absolute.-top-4.-right-4,
.absolute.-bottom-4.-left-4,
.absolute.bottom-16.-right-8 {
    animation: float 4s ease-in-out infinite;
}

.absolute.-bottom-4.-left-4 {
    animation-delay: 1s;
}

.absolute.bottom-16.-right-8 {
    animation-delay: 2s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .absolute.-top-4.-right-4,
    .absolute.-bottom-4.-left-4,
    .absolute.bottom-16.-right-8 {
        display: none;
    }
}
