/* Custom styles for Pit Stop Automotive */

:root {
    --midnight: #0a1628;
    --midnight-light: #111d33;
    --midnight-mid: #0d1f3c;
    --gold: #c9a84c;
    --gold-light: #d4b85c;
    --mint: #5eead4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--midnight);
    color: white;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--midnight);
}
::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}

/* Selection */
::selection {
    background: var(--gold);
    color: var(--midnight);
}

/* Navbar */
#navbar {
    background: transparent;
    backdrop-filter: none;
}

#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

/* Service cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::after {
    opacity: 1;
}

/* Gold shimmer effect on hover */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.03), transparent);
    transition: left 0.6s ease;
    z-index: 0;
}

.service-card:hover::before {
    left: 100%;
}

.service-card > * {
    position: relative;
    z-index: 1;
}

/* Fade-in animations for scroll sections */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .service-card::before {
        display: none;
    }
    .service-card {
        transition: border-color 0.3s ease;
    }
}

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

#mobile-menu.close {
    opacity: 0;
    pointer-events: none;
}

/* Hamburger animation */
.nav-line {
    transform-origin: center;
}

#mobile-toggle.active .nav-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#mobile-toggle.active .nav-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

#mobile-toggle.active .nav-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 24px;
}

/* Button hover glow */
a[href="tel:15752468865"] {
    position: relative;
}

/* Image hover zoom */
section img {
    transition: transform 0.6s ease;
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.3);
}

/* 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' stroke='%23c9a84c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Gold gradient text utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #c9a84c, #e8d5a0, #c9a84c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

/* Hero asymmetric layout adjustments */
@media (max-width: 1023px) {
    #hero {
        padding-top: 100px;
        padding-bottom: 60px;
    }
}

/* Section divider lines */
section > div:first-child > div:first-child {
    pointer-events: none;
}

/* Ensure all links are readable */
a {
    text-decoration: none;
}

/* Touch device optimizations */
@media (hover: none) {
    .service-card:hover::after {
        opacity: 0;
    }
    .service-card:hover::before {
        left: -100%;
    }
}
