/* Custom styles for Golden Auto Parts */

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

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

::-webkit-scrollbar-track {
    background: #102a43;
}

::-webkit-scrollbar-thumb {
    background: #334e68;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f59e0b;
}

/* Selection color */
::selection {
    background: #f59e0b;
    color: #102a43;
}

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

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

body.menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

body.menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
body.menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
body.menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
body.menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

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

body.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
}

/* Scroll reveal animations (below the fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(10, 26, 46, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Geometric shape animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-20px) rotate(45deg); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(12deg); }
    50% { transform: translateY(-15px) rotate(12deg); }
}

.geometric-float {
    animation: float 6s ease-in-out infinite;
}

.geometric-float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}

/* Pulse dot animation */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #f59e0b, #ffca0e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover lift effect */
.card-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Gold glow effect */
.gold-glow {
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.15);
}

.gold-glow:hover {
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.3);
}

/* Image cover */
img {
    max-width: 100%;
    height: auto;
}

/* Contact form styles */
.contact-form input,
.contact-form textarea {
    background: rgba(16, 42, 67, 0.6);
    border: 1px solid rgba(51, 78, 104, 0.5);
    color: #f0f4f8;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #627d98;
}

/* Success message */
.form-success {
    animation: fadeInUp 0.5s ease forwards;
}

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

/* Button focus states for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    h1 {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 5rem;
    }
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}

/* Ensure text readability on all backgrounds */
.text-navy-200,
.text-navy-300 {
    color: #d9e2ec;
}

/* Ensure gold text is readable */
.text-gold-400 {
    color: #f59e0b;
}

.text-gold-300 {
    color: #ffe066;
}
