/* ==========================================
   Auto Servicio Chito - Custom Styles
   ========================================== */

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

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f0f23;
}
::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* ---- Selection ---- */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #ffffff;
}

/* ---- Navbar Scrolled ---- */
.navbar-scrolled {
    background: rgba(15, 15, 35, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ---- Nav Link Underline Animation ---- */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #f59e0b);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ---- Hero Glow Animation ---- */
.hero-glow {
    animation: glowPulse 6s ease-in-out infinite;
}
.hero-glow-delayed {
    animation: glowPulse 6s ease-in-out infinite 3s;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

/* ---- Slow Spin ---- */
.spin-slow {
    animation: spinSlow 40s linear infinite;
}

@keyframes spinSlow {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---- Fade In Up Animation ---- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

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

/* ---- Scroll Reveal ---- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* ---- Brand Card Animation ---- */
.brand-card {
    animation: fadeInScale 0.5s ease-out both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---- Form Focus Glow ---- */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ---- Button Press Effect ---- */
button[type="submit"]:active {
    transform: scale(0.98) !important;
}

/* ---- Loading Spinner ---- */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Gradient Text Shimmer (subtle) ---- */
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

h1 .bg-gradient-to-r {
    background-size: 200% auto;
    animation: shimmer 4s ease-in-out infinite;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 640px) {
    .font-display {
        word-break: break-word;
    }
}

/* ---- Print Styles ---- */
@media print {
    nav, footer, .animate-bounce { display: none !important; }
    body { background: white; color: black; }
    section { page-break-inside: avoid; }
}
