/* Custom Utilities & Animations for Bursa Mobil Lastikçi */

@keyframes pulse-slow {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 12px rgba(37, 99, 235, 0);
    }
}

@keyframes pulse-green {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 2.5s infinite;
}

.animate-pulse-green {
    animation: pulse-green 2.5s infinite;
}

/* Glassmorphism */
.glass-card {
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 12px 30px -10px rgba(37, 99, 235, 0.22);
}

/* Grid background pattern */
.bg-grid-pattern {
    background-size: 32px 32px;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

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

::-webkit-scrollbar-track {
    background: #080c15;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

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

/* Range Slider Styling */
input[type=range] {
    -webkit-appearance: none;
    background: #1e293b;
    border-radius: 9999px;
    height: 8px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 22px;
    width: 22px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.6);
    border: 2px solid #ffffff;
}

/* FAQ Accordion */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.faq-item.active .faq-content {
    max-height: 300px;
    opacity: 1;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Toast Animations */
@keyframes toastSlideDown {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast-slide-down {
    animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Animated Mobile Tire Van Scene (Night Highway Patrol) */
@keyframes roadScroll {
    from {
        stroke-dashoffset: 90;
    }

    to {
        stroke-dashoffset: 0;
    }
}

@keyframes truckBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-1.5px);
    }
}

@keyframes wheelSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes beaconStrobe {

    0%,
    100% {
        opacity: 0.25;
        transform: scale(0.85);
    }

    25% {
        opacity: 1;
        transform: scale(1.4);
    }

    50% {
        opacity: 0.2;
        transform: scale(0.75);
    }

    75% {
        opacity: 0.95;
        transform: scale(1.3);
    }
}

@keyframes headlightFlicker {

    0%,
    100% {
        opacity: 0.85;
    }

    50% {
        opacity: 0.65;
    }
}

.anim-road-line {
    animation: roadScroll 0.7s linear infinite;
}

.anim-truck {
    animation: truckBounce 1.4s ease-in-out infinite;
    transform-origin: bottom center;
}

.anim-wheel {
    animation: wheelSpin 0.7s linear infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.anim-beacon {
    animation: beaconStrobe 0.8s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.anim-headlight {
    animation: headlightFlicker 2.5s ease-in-out infinite;
}

/* Speed-up effect on hover */
.group:hover .anim-road-line {
    animation-duration: 0.38s;
}

.group:hover .anim-wheel {
    animation-duration: 0.38s;
}

.group:hover .anim-beacon {
    animation-duration: 0.5s;
}

/* Location Help Modal Animation */
@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Photorealistic Vehicle Live Effects */
@keyframes vehicleRumble {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-1.5px);
    }
}

.anim-vehicle-rumble {
    animation: vehicleRumble 2.2s ease-in-out infinite;
}

/* Photorealistic SVG Spinning Wheels */
@keyframes wheelSpinFast {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.anim-wheel-spin {
    animation: wheelSpinFast 0.42s linear infinite;
    transform-origin: 50px 50px;
}

.group\/scene:hover .anim-wheel-spin {
    animation-duration: 0.22s;
}

/* Seamless Infinite Highway Road Markings Scroll */
@keyframes roadDashScroll {
    0% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: 180;
    }
}

.anim-road-dash-fast {
    animation: roadDashScroll 0.42s linear infinite;
    will-change: stroke-dashoffset;
}

.group\/scene:hover .anim-road-dash-fast {
    animation-duration: 0.22s;
}

/* Subtle Wet Highway Tire Spray / Mist Effect */
@keyframes roadSprayPuff {

    0%,
    100% {
        opacity: 0.35;
        transform: scale(0.92) skewX(-15deg);
    }

    50% {
        opacity: 0.65;
        transform: scale(1.08) skewX(-18deg);
    }
}

.anim-road-spray {
    animation: roadSprayPuff 0.6s ease-in-out infinite;
}