/* Custom styles for 508 Guns & Ammo */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1322;
}
::-webkit-scrollbar-thumb {
    background: #1e3a5f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4a843;
}

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

/* Hero parallax-like effect */
#hero {
    position: relative;
}

/* Nav scroll state */
.nav-scrolled {
    background: rgba(10, 19, 34, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 67, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Hamburger animation */
.hamburger-line {
    transition: all 0.3s ease;
}

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

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}
#mobile-menu.hidden {
    animation: slideUp 0.2s ease forwards;
}

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

/* Mobile link hover */
.mobile-link {
    position: relative;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #d4a843;
    transition: width 0.3s ease;
}
.mobile-link:hover::after {
    width: 100%;
}

/* Scroll reveal base - always visible by default */
.reveal {
    opacity: 1;
}

/* Scroll reveal with JS enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gold shimmer on hover for buttons */
button, a {
    position: relative;
    overflow: hidden;
}

/* Card hover glow */
.group:hover .group-hover\:bg-gold-400\/20 {
    box-shadow: 0 0 30px rgba(212, 168, 67, 0.1);
}

/* Image hover zoom */
.rounded-2xl overflow-hidden img {
    transition: transform 0.6s ease;
}
.rounded-2xl:hover img {
    transform: scale(1.03);
}

/* Pulse animation for badge dot */
@keyframes pulse-gold {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}
.animate-pulse {
    animation: pulse-gold 2s ease-in-out infinite;
}

/* Form focus states */
input:focus, select:focus, textarea:focus {
    background: rgba(10, 19, 34, 0.95);
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
