/* ===== Custom Styles for L and L Farm Supply and Tire ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #080c08;
}
::-webkit-scrollbar-thumb {
    background: #2d5e2d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3d7a3d;
}

/* Selection color */
::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #f0f5f0;
}

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

/* Menu line animations */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 5px;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(8, 12, 8, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(45, 94, 45, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .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);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Ensure content is visible without JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* When JS is disabled, all content is visible */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* Gold gradient text fallback */
.text-transparent.bg-clip-text.bg-gradient-to-r {
    background-image: linear-gradient(to right, #f0d68a, #d4a843, #b8860b);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #d4a843;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Select dropdown styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23d4a843' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Subtle shimmer on gold elements */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Pulse animation for the green dot */
@keyframes soft-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.animate-pulse {
    animation: soft-pulse 2s ease-in-out infinite;
}

/* Hover glow effect for cards */
.group:hover .group-hover\:border-gold-600\/40 {
    border-color: rgba(184, 134, 11, 0.4);
}

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

/* Ensure form inputs have proper contrast */
input::placeholder,
textarea::placeholder {
    color: rgba(143, 184, 143, 0.4);
}

/* Map container */
iframe[src*="google.com/maps"] {
    width: 100%;
    height: 350px;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.1;
    }
}
