/* ========================================
   EcoMoto.uz - Common Styles
   ======================================== */

/* Base Variables */
:root {
    --primary-color: #e74c3c;
    --primary-dark: #c0392b;
    --primary-darker: #a93226;
    --secondary-color: #2c3e50;
    --secondary-light: #34495e;
    --accent-color: #f39c12;
    --accent-dark: #e67e22;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f4;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-sm: 8px;
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* ========================================
   Animation Keyframes
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

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

@keyframes bounceGentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========================================
   Hero Background Patterns
   ======================================== */
.hero-bg {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--info-color) 100%);
}

.hero-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(231, 76, 60, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(44, 62, 80, 0.1) 0%, transparent 50%);
}

.service-hero,
.contact-hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    position: relative;
    overflow: hidden;
}

.service-hero::before,
.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* ========================================
   Button Styles
   ======================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid currentColor;
    color: inherit;
    padding: 10px 22px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

.btn-outline:hover {
    background: currentColor;
    color: white;
    text-decoration: none;
}

/* ========================================
   Card Styles
   ======================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.card-hover,
.motorcycle-card,
.service-card,
.contact-card {
    background: linear-gradient(145deg, #ffffff 0%, var(--gray-50) 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius-lg);
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.card-hover::before,
.motorcycle-card::before,
.service-card::before,
.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card-hover:hover,
.motorcycle-card:hover,
.service-card:hover,
.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card-hover:hover::before,
.motorcycle-card:hover::before,
.service-card:hover::before,
.contact-card:hover::before {
    transform: scaleX(1);
}

/* ========================================
   Form Styles
   ======================================== */
.filter-select,
.sort-dropdown {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    transition: var(--transition);
    width: 100%;
}

.filter-select:focus,
.sort-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-input {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    transition: var(--transition);
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-section,
.contact-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Icon Styles
   ======================================== */
.service-icon,
.contact-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: var(--transition);
}

.card-hover:hover .service-icon,
.service-card:hover .service-icon,
.contact-card:hover .contact-icon {
    transform: scale(1.1) rotate(10deg);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
    margin: 0 auto 16px;
}

/* ========================================
   Social Media Icons
   ======================================== */
.social-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
    color: white;
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

.social-icon.facebook {
    background: linear-gradient(135deg, #3b5998 0%, #2d4373 100%);
}

.social-icon.instagram {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-icon.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #005580 100%);
}

.social-icon.youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

/* ========================================
   Badge Styles
   ======================================== */
.badge-new {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-featured {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.price-tag {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
}

/* ========================================
   Navbar Styles
   ======================================== */
.navbar-blur {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* ========================================
   Text Utilities
   ======================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Filter Styles
   ======================================== */
.filter-sidebar {
    background: linear-gradient(145deg, #ffffff 0%, var(--gray-50) 100%);
    box-shadow: var(--shadow);
}

.filter-group {
    border-bottom: 1px solid var(--gray-200);
}

.filter-group:last-child {
    border-bottom: none;
}

/* ========================================
   Range Slider Styles
   ======================================== */
.price-range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--gray-200);
    outline: none;
}

.price-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

.price-range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
}

/* ========================================
   Loading Animation
   ======================================== */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* ========================================
   Process Steps
   ======================================== */
.process-step {
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.process-step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Timeline Styles
   ======================================== */
.timeline-item {
    position: relative;
    padding-left: 60px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: -20px;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item:last-child::before {
    bottom: 50%;
}

.timeline-dot {
    position: absolute;
    left: 10px;
    top: 8px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* ========================================
   Highlight Boxes
   ======================================== */
.feature-highlight {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin: 24px 0;
}

.office-hours {
    background: linear-gradient(145deg, #ffffff 0%, var(--gray-50) 100%);
    border-radius: 16px;
    padding: 24px;
    border-left: 4px solid var(--primary-color);
}

/* ========================================
   Map Styles
   ======================================== */
.map-container {
    background: var(--gray-50);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    height: 400px;
    position: relative;
}

.map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
}

/* ========================================
   Animation Classes
   ======================================== */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-bounce-gentle {
    animation: bounceGentle 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

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

/* ========================================
   Additional Common Styles
   ======================================== */
.spec-card {
    background: linear-gradient(145deg, #ffffff 0%, var(--gray-50) 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    padding: 24px;
    transition: var(--transition);
}

.spec-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.spec-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.price-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 20px;
    padding: 16px 24px;
    color: white;
    text-align: center;
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

.feature-tag {
    background: rgba(231, 76, 60, 0.1);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
}

.contact-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    position: relative;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .service-icon,
    .contact-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }
    
    .social-icon {
        width: 50px;
        height: 50px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .spec-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .glass-card,
    .card-hover,
    .motorcycle-card,
    .service-card,
    .contact-card,
    .spec-card {
        border-radius: var(--border-radius);
        padding: 20px;
    }
    
    .filter-sidebar {
        border-radius: var(--border-radius);
        padding: 16px;
    }
}

/* ========================================
   Back to Top Button
   ======================================== */
.back-to-top {
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
}

/* ========================================
   Enhanced Mobile Styles
   ======================================== */

/* Touch device optimization */
.touch-device {
    -webkit-tap-highlight-color: transparent;
}

.touch-device .btn-primary,
.touch-device .btn-secondary,
.touch-device button {
    -webkit-tap-highlight-color: rgba(231, 76, 60, 0.2);
}

.touch-active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Mobile menu enhancements */
.mobile-menu {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease;
}

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

/* Mobile responsiveness improvements */
@media (max-width: 640px) {
    .navbar-blur {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    .hero-pattern {
        background-size: 150% 150%;
    }
    
    .glass-card {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .text-gradient {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        padding: 10px;
    }
    
    .mobile-menu .space-y-1 > * {
        margin-bottom: 0.25rem;
    }
    
    .hero-bg {
        min-height: 50vh;
    }
}

/* Landscape mobile orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-menu {
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .hero-bg {
        min-height: 100vh;
    }
}

/* Focus states for better accessibility */
.focus\:ring-primary:focus {
    --tw-ring-opacity: 0.5;
    --tw-ring-color: rgb(231 76 60 / var(--tw-ring-opacity));
}

.mobile-menu-button:focus,
.back-to-top:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Enhanced transitions for better UX */
nav a,
.mobile-menu a {
    transition: all 0.2s ease;
}

nav a:hover,
.mobile-menu a:hover {
    transform: translateX(4px);
}

.mobile-menu a:hover {
    transform: translateX(8px);
}

/* Improved loading states */
.navbar-blur {
    will-change: backdrop-filter;
}

/* Better scrolling on mobile */
@supports (-webkit-overflow-scrolling: touch) {
    .mobile-menu {
        -webkit-overflow-scrolling: touch;
    }
}
