/* Custom CSS for Premium Motors */

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

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

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

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

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

/* Navbar scroll effect */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-scrolled .text-white {
    color: #1f2937 !important;
}

.navbar-scrolled .hover\:text-red-400:hover {
    color: #dc2626 !important;
}

/* Hero section animations */
.hero-content {
    animation: fadeInUp 1s ease-out;
}

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

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Button animations */
.btn-primary {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Image gallery */
.gallery-thumb {
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-thumb:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.gallery-thumb.active {
    border-color: #dc2626;
    transform: scale(1.05);
}

/* Modal animations */
.modal {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* WhatsApp button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #FFF;
    text-decoration: none;
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Dark mode styles */
.dark {
    background-color: #1a1a1a;
    color: #ffffff;
}

.dark .bg-white {
    background-color: #2d2d2d !important;
}

.dark .text-gray-900 {
    color: #ffffff !important;
}

.dark .text-gray-800 {
    color: #e5e5e5 !important;
}

.dark .text-gray-700 {
    color: #d1d1d1 !important;
}

.dark .text-gray-600 {
    color: #b8b8b8 !important;
}

.dark .border-gray-200 {
    border-color: #404040 !important;
}

.dark .border-gray-300 {
    border-color: #505050 !important;
}

.dark .bg-gray-50 {
    background-color: #252525 !important;
}

.dark .bg-gray-100 {
    background-color: #2a2a2a !important;
}

/* Vehicle status badges */
.status-disponivel {
    background-color: #10b981;
    color: white;
}

.status-vendido {
    background-color: #ef4444;
    color: white;
}

.status-reservado {
    background-color: #f59e0b;
    color: white;
}

/* Price highlight */
.price-highlight {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

/* Testimonial cards */
.testimonial-card {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid #e2e8f0;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 60px;
    color: #dc2626;
    font-family: serif;
    line-height: 1;
}

/* Form focus effects */
.form-input:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    outline: none;
}

/* Success/Error messages */
.alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #f0fdf4;
    border-left-color: #10b981;
    color: #065f46;
}

.alert-error {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #dc2626;
    color: white;
    border-color: #dc2626;
}

.pagination .current {
    background-color: #dc2626;
    color: white;
    border-color: #dc2626;
}

/* Mobile menu animation */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .card-hover:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .whatsapp-float,
    .navbar,
    .footer {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #fff;
    }
    
    .card-hover {
        border: 2px solid #000;
    }
}

/* 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;
    }
}

/* Custom utilities */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.gradient-text {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}