/* ============================================
   PETRO TRANSFERS - Custom Stylesheet
   ============================================ */

/* ---- Base & Scrolling ---- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::-webkit-scrollbar-track {
    background: #000000;
}

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

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

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #222 #000;
}


/* ---- Alpine.js Cloak ---- */
[x-cloak] {
    display: none !important;
}


/* ---- Animations ---- */

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Animation Delays */
.animation-delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.animation-delay-400 {
    animation-delay: 0.4s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.animation-delay-600 {
    animation-delay: 0.6s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.animation-delay-800 {
    animation-delay: 0.8s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ---- Vehicle Card Hover Effects ---- */
.vehicle-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(235, 73, 71, 0.2);
}


/* ---- Hero Gradient Overlay ---- */
.hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(10, 10, 10, 0.3) 0%,
        rgba(10, 10, 10, 0.7) 50%,
        rgba(10, 10, 10, 1) 100%
    );
}


/* ---- Glass Card Effect ---- */
.glass-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.15);
}


/* ---- Subtle Glow Effect for Accent Elements ---- */
.glow-gold {
    box-shadow: 0 0 20px rgba(235, 73, 71, 0.15),
                0 0 60px rgba(235, 73, 71, 0.05);
}


/* ---- Form Styling Enhancements ---- */

/* Select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 2.5rem;
}

/* Dropdown option styling for dark theme */
select option {
    background-color: #0a0a0a;
    color: #ffffff;
    padding: 8px 12px;
}

select option:checked {
    background-color: #1a1a1a;
}

select option:hover {
    background-color: #1a1a1a;
}

/* Date/Time input styling for dark theme */
input[type="date"],
input[type="time"] {
    color-scheme: dark;
}

/* Form input focus glow */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(235, 73, 71, 0.15);
}

/* Form validation states */
input:invalid:not(:placeholder-shown),
select:invalid:not([value=""]) {
    border-color: rgba(239, 68, 68, 0.5);
}

input:valid:not(:placeholder-shown) {
    border-color: rgba(34, 197, 94, 0.3);
}

/* Placeholder styling */
::placeholder {
    color: rgba(156, 163, 175, 0.6);
}


/* ---- Loading States ---- */
.loading-skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.02) 25%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.02) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Button loading spinner */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}


/* ---- Testimonial Carousel Transitions ---- */
.testimonial-slide {
    transition: opacity 0.5s ease-in-out;
}


/* ---- Nav Active Link ---- */
.nav-link.active {
    color: #eb4947;
    background: rgba(235, 73, 71, 0.1);
}


/* ---- Subtle Pulse Glow for CTA ---- */
@keyframes ctaPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(235, 73, 71, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(235, 73, 71, 0);
    }
}

.cta-pulse {
    animation: ctaPulse 2s ease-in-out infinite;
}


/* ---- Route Filter Transitions ---- */
.route-row {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.route-row.hidden-route {
    opacity: 0;
    transform: scale(0.95);
    display: none;
}


/* ---- Print Styles ---- */
@media print {
    nav,
    footer,
    .fixed {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}


/* ---- Responsive Adjustments ---- */
@media (max-width: 640px) {
    h1 {
        font-size: 2.25rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.75rem;
    }
}


/* ---- Focus Visible for Accessibility ---- */
:focus-visible {
    outline: 2px solid #eb4947;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Remove default focus outline when not using keyboard */
:focus:not(:focus-visible) {
    outline: none;
}


/* ---- Selection Color ---- */
::selection {
    background: rgba(235, 73, 71, 0.3);
    color: white;
}
