/* Custom styles for JD Montgomery Trucking */

/* Base styles */
html {
    scroll-behavior: smooth;
}

body {
    background-color: #0a070e;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #110d15;
}
::-webkit-scrollbar-thumb {
    background: #5f273d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8e3d5c;
}

/* Selection color */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(10, 7, 14, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(95, 39, 61, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Service card hover effects */
.service-card {
    will-change: transform;
}

/* Scroll indicator animation */
@keyframes scrollIndicator {
    0% {
        top: 0;
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Mobile menu transitions */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s 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 {
    transform-origin: center;
}

.menu-open .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-open .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 24px !important;
}

/* Gold shimmer effect for hero text */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.text-shimmer {
    background: linear-gradient(
        90deg,
        #fbbf24 0%,
        #fcd34d 25%,
        #fbbf24 50%,
        #fcd34d 75%,
        #fbbf24 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* Subtle pulse for CTA buttons */
@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.3);
    }
    50% {
        box-shadow: 0 0 20px -5px rgba(251, 191, 36, 0.4);
    }
}

.cta-pulse {
    animation: subtle-pulse 2.5s ease-in-out infinite;
}

/* Fade-in animation for scroll reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    .reveal.revealed {
        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; }
}

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

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

/* Image lazy loading placeholder */
img {
    background: linear-gradient(
        135deg,
        #1a1520 0%,
        #2d1119 50%,
        #1a1520 100%
    );
}

/* Select dropdown styling */
select option {
    background: #1a1520;
    color: #f5e9ed;
}

/* Custom select arrow */
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'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23fbbf24' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
