﻿/**
 * CSS Custom Properties (Variables)
 * Saudi Car Marketplace
 * 
 * Central design tokens for consistent styling
 */

:root {
    /* ============================================
     COLORS - Saudi Theme
     ============================================ */

    /* Primary - Saudi Green */
    --primary: #006C35;
    --primary-light: #00923D;
    --primary-lighter: #00B347;
    --primary-dark: #004D26;
    --primary-darker: #003319;

    /* Accent - Gold */
    --accent: #FFD700;
    --accent-light: #FFE44D;
    --accent-dark: #DAA520;

    /* Neutrals */
    --white: #FFFFFF;
    --black: #000000;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;

    /* ============================================
     SPACING
     ============================================ */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    --spacing-4xl: 96px;

    /* ============================================
     TYPOGRAPHY
     ============================================ */
    --font-family-ar: 'Cairo', sans-serif;
    --font-family-en: 'Roboto', sans-serif;

    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 30px;
    --font-size-4xl: 36px;
    --font-size-5xl: 48px;
    --font-size-6xl: 64px;

    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-black: 900;

    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --line-height-loose: 2;

    /* ============================================
     BORDER RADIUS
     ============================================ */
    --radius-none: 0;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-full: 9999px;

    /* ============================================
     SHADOWS
     ============================================ */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.18);
    --shadow-2xl: 0 16px 48px rgba(0, 0, 0, 0.22);

    /* Colored Shadows */
    --shadow-primary: 0 8px 24px rgba(0, 108, 53, 0.25);
    --shadow-accent: 0 8px 24px rgba(255, 215, 0, 0.25);

    /* ============================================
     TRANSITIONS
     ============================================ */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* ============================================
     Z-INDEX LAYERS
     ============================================ */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;

    /* ============================================
     BREAKPOINTS (for reference in JS)
     ============================================ */
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-2xl: 1400px;

    /* ============================================
     LAYOUT
     ============================================ */
    --container-max-width: 1320px;
    --header-height: 80px;
    --footer-height: auto;

    /* ============================================
     GRADIENTS
     ============================================ */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
    --gradient-overlay: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        /* Adjust colors for dark mode if needed */
        --gray-50: #1F2937;
        --gray-100: #374151;
        /* ... other dark mode adjustments */
    }
}

/* ============================================
   UTILITY CLASSES USING VARIABLES
   ============================================ */

/* Spacing Utilities */
.p-xs {
    padding: var(--spacing-xs);
}

.p-sm {
    padding: var(--spacing-sm);
}

.p-md {
    padding: var(--spacing-md);
}

.p-lg {
    padding: var(--spacing-lg);
}

.p-xl {
    padding: var(--spacing-xl);
}

.m-xs {
    margin: var(--spacing-xs);
}

.m-sm {
    margin: var(--spacing-sm);
}

.m-md {
    margin: var(--spacing-md);
}

.m-lg {
    margin: var(--spacing-lg);
}

.m-xl {
    margin: var(--spacing-xl);
}

/* Border Radius Utilities */
.rounded-sm {
    border-radius: var(--radius-sm);
}

.rounded-md {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-xl {
    border-radius: var(--radius-xl);
}

.rounded-full {
    border-radius: var(--radius-full);
}

/* Shadow Utilities */
.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}

/* Transition Utilities */
.transition-fast {
    transition: all var(--transition-fast);
}

.transition-normal {
    transition: all var(--transition-normal);
}

.transition-slow {
    transition: all var(--transition-slow);
}

/**
 * Saudi Car Marketplace - Main Stylesheet
 * 
 * RTL Arabic Design with Saudi Green Theme
 * Classic Version (Restored)
 * 
 * @version 1.0.0
 */

/* ============================================
   GLOBAL STYLES
   ============================================ */

/* Note: CSS Variables already defined above, no duplication needed */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.8;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--dark-color);
}

.fw-bold {
    font-weight: 700 !important;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    padding: 5px 0;
    min-height: 80px;
}

/* Logo and Site Name */
.navbar-brand {
    color: white !important;
    gap: 10px;
    align-items: center;
    display: flex;
    flex-direction: row;
    padding: 0;
    text-align: right;
}

.navbar-brand .logo-icon {
    height: 70px;
    width: 70px !important;
    object-fit: contain;
    transition: all 0.3s ease;
    margin: 0;

    /* White circle border only - logo keeps original colors */
    border-radius: 50%;
    border: 3px solid white;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.navbar-brand:hover .logo-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.navbar-brand .site-name {
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
    margin: 0;
    line-height: 1.5;
}

/* Navigation Menu - Centered */
.nav-menu {
    gap: 15px;
}

.nav-menu .nav-link {
    font-weight: 600;
    font-size: 15px;
    padding: 0 !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-menu .nav-link i {
    font-size: 16px;
    width: 16px;
    text-align: center;
}

.nav-menu .nav-link:hover {
    color: #FFD700 !important;
    transform: translateY(-1px);
}

.nav-menu .nav-link.active {
    font-weight: 700;
}

/* Language Button */
.language-btn {
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px !important;
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 6px;
    background: transparent !important;
    color: white !important;
    transition: all 0.3s ease;
    gap: 6px;
}

.language-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: white !important;
    transform: translateY(-1px);
}

.language-btn i {
    font-size: 16px;
}

.section-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-color), transparent);
    border-radius: 2px;
}


/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--gold-color);
}

.hero-section h1 {
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: white;
}

.hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--gold-color);
}

.search-form h3 {
    color: var(--primary-color);
    font-weight: 700;
}

/* ============================================
   CAR CARDS
   ============================================ */

.car-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.car-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--gold-color);
}

.car-card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.car-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.car-card:hover .car-card-image img {
    transform: scale(1.1);
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--gold-color) 0%, #FFA500 100%);
    color: var(--dark-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.car-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.car-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.car-card-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.installment-badge {
    background: #f0fff4;
    /* Very light green */
    border-right: 3px solid var(--success-color);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}

.installment-badge .small {
    font-size: 0.75rem;
    color: #555;
    font-weight: 600;
}

.installment-badge .text-success {
    color: var(--primary-color) !important;
}

.car-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.car-detail-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.car-detail-item i {
    margin-left: 5px;
    color: var(--primary-color);
}

.car-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 108, 53, 0.4);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
}

.btn-success {
    background-color: var(--whatsapp-color);
    border: none;
}

.btn-success:hover {
    background-color: #1ea952;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ============================================
   FILTERS SECTION
   ============================================ */

.filters-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border: 2px solid var(--primary-color);
}

.filters-section h5 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    color: var(--primary-color);
    border: 2px solid #e0e0e0;
    margin: 0 3px;
    border-radius: 8px;
    font-weight: 600;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ============================================
   CAR DETAILS PAGE
   ============================================ */

.car-details-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.car-image-slider {
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.car-image-slider img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.car-specs-table {
    width: 100%;
    margin-bottom: 2rem;
}

.car-specs-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.car-specs-table td {
    padding: 1rem;
}

.car-specs-table td:first-child {
    font-weight: 700;
    color: var(--primary-color);
    width: 40%;
}

.whatsapp-order-btn {
    background: linear-gradient(135deg, var(--whatsapp-color) 0%, #1ea952 100%);
    color: white;
    border: none;
    font-size: 1.25rem;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.whatsapp-order-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
    color: white;
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--whatsapp-color) 0%, #1ea952 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
    color: white;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */

.scroll-to-top {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 5px 15px rgba(0, 108, 53, 0.3);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
}

.scroll-to-top:hover {
    transform: scale(1.1);
    background-color: var(--primary-light);
}

.scroll-to-top.show {
    display: flex;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    margin-top: 5rem;
    background-color: var(--dark-color);
}

footer a:hover {
    color: var(--gold-color) !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 992px) {
    .hero-section {
        padding: 60px 0;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .search-form {
        padding: 1.5rem;
    }

    .car-image-slider img {
        height: 300px;
    }

    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .scroll-to-top {
        bottom: 80px;
        left: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--gold-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fw-black {
    font-weight: 900 !important;
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

.rounded-4 {
    border-radius: 1rem !important;
}

.shadow-custom {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    /* Softer custom shadow */
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.border-radius-custom {
    border-radius: 15px;
}

/* Statistics Cards */
.stat-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

/* ============================================
   PREMIUM LOGO ENHANCEMENT - Saudi Automotive Brand
   Adds subtle container and clarity WITHOUT changing size
   ============================================ */

/* Premium Container Effect for Logo */
img[src*="logo.png"],
.logo,
.logo-icon,
.brand-logo {
    /* Existing circle border */
    border-radius: 50% !important;
    border: 3px solid white !important;
    padding: 8px !important;

    /* ENHANCED: Premium multi-layer shadow */
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.1),
        /* Soft white glow ring */
        0 4px 12px rgba(0, 0, 0, 0.25),
        /* Base shadow */
        0 2px 8px rgba(245, 196, 0, 0.15) !important;
    /* Subtle gold accent */

    /* ENHANCED: Soft background container */
    background: var(--logo-bg, radial-gradient(circle at center,
                rgba(255, 255, 255, 0.15) 0%,
                rgba(255, 255, 255, 0.08) 50%,
                transparent 100%));

    /* ENHANCED: Subtle outline for clarity */
    outline: 1px solid rgba(255, 255, 255, 0.2);
    outline-offset: -1px;

    transition: all 0.3s ease !important;
}

/* Premium Hover Effect */
img[src*="logo.png"]:hover,
.logo:hover,
.logo-icon:hover,
.brand-logo:hover {
    /* ENHANCED: Stronger premium glow on hover */
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.15),
        0 6px 16px rgba(0, 0, 0, 0.3),
        0 3px 12px rgba(245, 196, 0, 0.25) !important;

    /* Subtle lift - NO scale change to avoid layout shift */
    transform: translateY(-1px) !important;
}

/* Ensure logos are square for perfect circle */
.navbar-brand img[src*="logo.png"],
.navbar-brand .logo-icon {
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

/* ENHANCED: Navbar logo specific clarity boost */
.navbar-brand img[src*="logo.png"],
.navbar-brand .logo-icon {
    /* Subtle brightness boost for green background */
    filter: brightness(1.05) contrast(1.05);

    /* Extra definition */
    -webkit-font-smoothing: antialiased;
    image-rendering: -webkit-optimize-contrast;
}

/* Footer logo styling */
footer img[src*="logo.png"],
footer .logo {
    width: 80px !important;
    height: 80px !important;
}

/* Admin panel logo */
.admin-logo,
.login-logo {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50% !important;
    border: 3px solid white !important;
    padding: 10px !important;

    /* Premium shadow for admin */
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 2px 8px rgba(245, 196, 0, 0.15) !important;

    background: radial-gradient(circle at center,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0.08) 50%,
            transparent 100%) !important;
}

/* PREMIUM: Subtle pulsing glow for brand presence (very subtle) */
@keyframes subtle-glow {

    0%,
    100% {
        box-shadow:
            0 0 0 4px rgba(255, 255, 255, 0.1),
            0 4px 12px rgba(0, 0, 0, 0.25),
            0 2px 8px rgba(245, 196, 0, 0.15);
    }

    50% {
        box-shadow:
            0 0 0 4px rgba(255, 255, 255, 0.12),
            0 4px 12px rgba(0, 0, 0, 0.25),
            0 2px 8px rgba(245, 196, 0, 0.2);
    }
}

/* Apply ONLY to navbar logo for premium feel */
.navbar-brand img[src*="logo.png"],
.navbar-brand .logo-icon {
    animation: subtle-glow 4s ease-in-out infinite;
}

/* Disable animation on hover to avoid distraction */
.navbar-brand img[src*="logo.png"]:hover,
.navbar-brand .logo-icon:hover {
    animation: none;
}

/* ============================================
   CAROUSEL ENHANCEMENTS
   ============================================ */

/* Navigation Arrows (Circles) */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 108, 53, 0.7);
    /* Primary color with opacity */
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
    margin: 0 15px;
    transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: var(--primary-color);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 24px;
    height: 24px;
}

/* Indicators (Dots) */
.carousel-indicators {
    bottom: 20px;
}

.carousel-indicators [data-bs-target] {
    width: 60px !important;
    height: 40px !important;
    border-radius: 5px !important;
    background-color: #ddd !important;
    background-size: cover !important;
    background-position: center !important;
    border: 2px solid white !important;
    margin: 0 4px !important;
    opacity: 0.6;
    transition: all 0.3s ease;
    text-indent: -999px;
    /* Hide any text */
}

.carousel-indicators .active {
    opacity: 1;
    transform: scale(1.1);
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
        margin: 0 10px;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 20px;
        height: 20px;
    }
}

/**
 * UX/UI Enhancements
 * Additional styles for better user experience
 */

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */

* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   IMPROVED CAR CARDS
   ============================================ */

.car-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.car-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 108, 53, 0.15) !important;
}

.car-card:hover .car-card-image img {
    transform: scale(1.05);
}

.car-card-image {
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.car-card-image img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BUTTON IMPROVEMENTS
   ============================================ */

.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: scale(0.95);
}

/* ============================================
   FORM IMPROVEMENTS
   ============================================ */

.form-control,
.form-select {
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 108, 53, 0.15);
    transform: translateY(-2px);
}

.form-control:hover,
.form-select:hover {
    border-color: var(--primary-light);
}

/* Form validation feedback */
.was-validated .form-control:valid {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2300923D' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
}

.was-validated .form-control:invalid {
    border-color: var(--danger-color);
}

/* ============================================
   LOADING STATES
   ============================================ */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   IMPROVED EMPTY STATES
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.empty-state-icon {
    font-size: 80px;
    color: #ccc;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.empty-state-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   IMPROVED TOOLTIPS
   ============================================ */

[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumb {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "â€º";
    color: #999;
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================
   IMPROVED BADGES
   ============================================ */

.badge {
    padding: 6px 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 20px;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */

.scroll-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 108, 53, 0.3);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 108, 53, 0.4);
}

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {
    .car-card {
        margin-bottom: 20px;
    }

    .btn {
        min-height: 44px;
        /* Touch target size */
        min-width: 44px;
    }

    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {

    .navbar,
    .whatsapp-float,
    .scroll-to-top,
    footer {
        display: none !important;
    }

    .car-card {
        page-break-inside: avoid;
    }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    min-width: 250px;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification i {
    font-size: 24px;
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-success i {
    color: var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}

.toast-error i {
    color: var(--danger-color);
}

/**
 * Mobile Responsive Enhancements
 * 
 * Specific overrides for mobile devices (< 992px)
 */

/* =========================================
   DESKTOP: Hide burger menu
   ========================================= */
@media (min-width: 992px) {
    .navbar-toggler {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    /* =========================================
       HEADER & LOGO OPTIMIZATION
       ========================================= */

    /* Ensure Container is relative for absolute positioning of logo */
    .navbar .container-fluid {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px !important;
    }

    /* 1. Logo and Site Name - Left Side */
    .navbar-brand {
        position: relative;
        left: auto;
        transform: none;
        margin: 0 !important;
        padding: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        z-index: 5;
    }

    /* 2. Logo Size for Mobile */
    .navbar-brand .logo-icon {
        height: 45px !important;
        width: 45px !important;
        max-height: none !important;
        transition: all 0.3s ease;

        /* White circle border only */
        border-radius: 50%;
        border: 2px solid white;
        padding: 5px;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    }

    /* Show site name on mobile next to logo */
    .navbar-brand .site-name {
        display: block !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        color: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.3 !important;
        text-shadow: none !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Ensure the Navbar has proper height */
    .navbar {
        padding: 10px 0 !important;
        min-height: 60px;
    }

    /* 3. Hamburger Menu Button - Right Side */
    .navbar-toggler {
        position: relative;
        z-index: 10;
        border: 2px solid rgba(255, 255, 255, 0.8) !important;
        padding: 8px 10px !important;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
    }

    .navbar-toggler:hover,
    .navbar-toggler:focus {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 1) !important;
    }

    .navbar-toggler-icon {
        width: 24px;
        height: 20px;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    /* Language button - Right Side */
    .language-btn {
        font-size: 13px !important;
        padding: 6px 12px !important;
        margin-left: auto;
        z-index: 10;
        position: relative;
    }

    /* Mobile Menu Collapse */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #0B773A 0%, #0D8A45 100%);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border-radius: 0 0 12px 12px;
        margin-top: 5px;
        z-index: 1000;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
    }

    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        max-height: 500px;
    }

    /* Menu Items Styling */
    .navbar-nav {
        padding: 15px 0;
        width: 100%;
    }

    .navbar-nav .nav-item {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }

    .navbar-nav .nav-link {
        padding: 15px 20px !important;
        font-size: 16px !important;
        color: #fff !important;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        transition: all 0.3s ease;
        min-height: 50px;
        /* Better touch target */
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:active,
    .navbar-nav .nav-link.active {
        background: rgba(255, 255, 255, 0.15);
        transform: scale(1.02);
    }

    .navbar-nav .nav-link i {
        font-size: 18px;
    }

    /* 4. Center Search Form on Mobile */
    .hero-section {
        text-align: center;
        padding: 40px 0;
    }

    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    /* Full width search inputs */
    .search-form .col-md-3,
    .search-form .col-md-2 {
        width: 100%;
        margin-bottom: 15px;
    }

    /* Adjust floating WhatsApp for mobile */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px;
        font-size: 24px;
        z-index: 999;
    }

    /* Ensure proper spacing for sticky header */
    main {
        padding-top: 10px;
    }
}

/* Extra small devices (phones, 600px and down) */
@media (max-width: 575.98px) {
    .navbar-brand .logo-icon {
        height: 40px !important;
        width: 40px !important;
    }

    .navbar-brand .site-name {
        display: block !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .navbar {
        min-height: 55px;
    }

    .navbar-nav .nav-link {
        font-size: 15px !important;
        padding: 12px 15px !important;
    }

    .language-btn {
        font-size: 12px !important;
        padding: 5px 10px !important;
    }
}

/**
 * Premium Hero Section Styles
 * Using Saudi Car Marketplace Colors
 * Saudi Green (#006C35) + Gold (#FFD700)
 */

/* ============================================
   HERO SECTION - MAIN CONTAINER
   ============================================ */
.hero-premium {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 60px 0;
}

/* Background with Gradient */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            var(--primary-darker) 0%,
            /* #003319 */
            var(--primary-dark) 25%,
            /* #004D26 */
            var(--primary) 50%,
            /* #006C35 */
            var(--primary-light) 100%
            /* #00923D */
        );
    z-index: -2;
}

.hero-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%,
            rgba(255, 215, 0, 0.1) 0%,
            /* Gold glow */
            transparent 50%);
    z-index: -1;
}

/* ============================================
   HERO CONTENT
   ============================================ */
.hero-content {
    z-index: 10;
    color: var(--white);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: var(--font-weight-black);
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 600px;
}

/* ============================================
   STATS SECTION
   ============================================ */
.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
    transition: all var(--transition-normal);
}

.stat-item:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--accent);
    transform: translateY(-5px);
}

.stat-item i {
    font-size: 1.5rem;
    color: var(--accent);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: var(--font-weight-bold);
    color: var(--white);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   GLASSMORPHISM SEARCH BAR
   ============================================ */
.hero-search-container {
    margin-bottom: 2rem;
}

.search-glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-normal);
}

.search-glass-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.2);
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 1.2rem;
}

.search-input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    color: var(--gray-800);
    transition: all var(--transition-normal);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2);
}

.search-input::placeholder {
    color: var(--gray-500);
}

/* Search Filters */
.search-filters {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
}

.filter-select {
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--gray-800);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.filter-select:hover,
.filter-select:focus {
    background: var(--white);
    border-color: var(--accent-light);
    outline: none;
}

.search-btn {
    padding: 0.875rem 2rem;
    background: var(--accent);
    color: var(--gray-900);
    border: none;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-bold);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

/* ============================================
   CTA BUTTONS
   ============================================ */
.hero-cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero-primary {
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: var(--gray-900);
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-bold);
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all var(--transition-normal);
}

.btn-hero-primary:hover {
    background: var(--accent-light);
    color: var(--gray-900);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
}

.btn-hero-secondary {
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-bold);
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all var(--transition-normal);
}

.btn-hero-secondary:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

/* ============================================
   CAR IMAGE SECTION
   ============================================ */
.hero-car-container {
    position: relative;
    z-index: 5;
}

.hero-car-wrapper {
    position: relative;
    padding: 2rem;
}

.hero-car-image {
    position: relative;
    z-index: 2;
}

.car-img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
    animation: float 6s ease-in-out infinite;
}

/* Floating Badges */
.floating-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    animation: float-badge 4s ease-in-out infinite;
    z-index: 10;
}

.floating-badge i {
    color: var(--accent);
    font-size: 1.2rem;
}

.badge-1 {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.badge-2 {
    top: 50%;
    left: 5%;
    animation-delay: 1.5s;
}

.badge-3 {
    bottom: 15%;
    right: 15%;
    animation-delay: 3s;
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */
.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(255, 215, 0, 0.15) 0%,
            transparent 70%);
    animation: pulse-circle 8s ease-in-out infinite;
}

.circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -50px;
    animation-delay: 2s;
}

.circle-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes float-badge {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-circle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s both;
}

.animate-fade-in-delay-3 {
    animation: fadeIn 1s ease-out 0.9s both;
}

.animate-fade-in-delay-4 {
    animation: fadeIn 1s ease-out 1.2s both;
}

.animate-slide-in {
    animation: slideIn 1.2s ease-out 0.5s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    .hero-premium {
        min-height: auto;
        padding: 40px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .search-filters {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-item {
        min-width: 100px;
        padding: 0.75rem;
    }

    .hero-car-wrapper {
        margin-top: 3rem;
    }

    .floating-badge {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-cta-buttons {
        flex-direction: column;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        justify-content: space-between;
    }

    .stat-item {
        flex: 1;
        min-width: auto;
    }
}

/* RTL Support */
html[dir="rtl"] .search-icon {
    right: auto;
    left: 1.5rem;
}

html[dir="rtl"] .search-input {
    padding: 1rem 1.5rem 1rem 3.5rem;
}

/* 
 * Antigravity Hero Section v2.0 - Ultra Premium
 * Design System: Antigravity UI
 * Colors: Deep Saudi Green (#0B5D2A) & Gold (#F5C400)
 */

:root {
    --ag-green-dark: #0B5D2A;
    --ag-green-light: #0F7A3A;
    --ag-green-deep: #003319;
    --ag-gold: #F5C400;
    --ag-gold-glow: rgba(245, 196, 0, 0.4);
    --ag-white: #FFFFFF;

    /* Request 4: Glass style updates */
    --ag-glass-bg: rgba(255, 255, 255, 0.08);
    /* Updated opacity */
    --ag-glass-border: rgba(255, 255, 255, 0.12);
    --ag-glass-blur: 8px;
    --ag-glass-highlight: rgba(255, 255, 255, 0.25);

    /* Physics */
    --ag-shadow-ambient: 0 40px 80px -20px rgba(0, 0, 0, 0.4);
    --ag-shadow-float: 0 20px 40px rgba(0, 0, 0, 0.2);
    --ag-inner-glow: inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.hero-antigravity {
    position: relative;
    min-height: 90vh;
    background: radial-gradient(circle at 60% 50%, #136a36 0%, var(--ag-green-dark) 45%, var(--ag-green-deep) 100%);
    overflow: hidden;
    padding-top: 120px;
    padding-bottom: 100px;
    display: flex;
    align-items: center;
}

/* Texture & Ambient Light */
.hero-antigravity::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 0;
}

/* Request 2: Radial Gradient behind car */
.hero-car-radial-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #F5C400 0%, transparent 70%);
    opacity: 0.08;
    /* 8% opacity */
    z-index: -1;
    pointer-events: none;
}

/* Request 1: Car Shadow */
.hero-car-shadow {
    filter: drop-shadow(0px 18px 40px rgba(0, 0, 0, 0.15));
    /* Opacity 15% */
}

.hero-bg-pattern {
    display: none;
    /* Replaced by noise texture for premium feel */
}

/* Ambient Gold Glows */
.hero-glow-blob {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--ag-gold-glow) 0%, transparent 70%);
    filter: blur(120px);
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
}

.hero-glow-blob.top-right {
    top: -200px;
    right: -100px;
}

.hero-glow-blob.bottom-left {
    bottom: -300px;
    left: -200px;
    opacity: 0.1;
}

.hero-content-wrapper {
    position: relative;
    z-index: 10;
}

/* Typography */
.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--ag-white);
    text-shadow: 0px 6px 20px rgba(0, 0, 0, 0.25);
}

.hero-subtitle {
    font-size: 1.35rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 3.5rem;
    max-width: 550px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Antigravity Glass Cards (Stats) */
.hero-stats-float {
    display: flex;
    gap: 1rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

@media (min-width: 992px) {
    .hero-stats-float {
        display: flex;
        gap: 1.25rem;
        max-width: 100%;
    }
}

.stat-glass-card {
    position: relative;
    background: rgba(11, 93, 42, 0.35);
    /* Slightly lighter for clarity at smaller size */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1.25rem;
    /* Smaller padding */
    border-radius: 20px;
    /* Slightly tighter radius */
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    /* Ensure consistency */
}

.stat-glass-card:hover {
    transform: translateY(-5px) scale(1.03);
    background: rgba(11, 93, 42, 0.5);
    border-color: var(--ag-gold);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.stat-icon {
    width: 38px;
    /* Smaller icon square */
    height: 38px;
    background: #006C35;
    color: var(--ag-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.1rem;
    /* Smaller icon font */
    margin-bottom: 0.6rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.stat-value {
    font-size: 1.25rem;
    /* Smaller value text */
    font-weight: 800;
    color: var(--ag-white);
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 0.8rem;
    /* Smaller label text */
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

/* Floating Search Panel - Masterpiece */
.search-glass-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 28px;
    padding: 10px;
    /* Reduced padding slightly for sleeker look */
    display: flex;
    align-items: center;
    gap: 15px;
    /* Deep multi-layer shadow for float effect */
    box-shadow:
        0 20px 50px -10px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    max-width: 650px;
    margin-top: 2rem;
    transform: translateZ(20px);
    /* Hardware acceleration hint */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.search-glass-panel:hover {
    transform: translateY(-5px) translateZ(20px);
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.search-input-group {
    flex: 2;
    position: relative;
    padding: 5px 20px;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.search-input-group:last-child {
    border-left: none;
}

.search-input-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 700;
    margin-bottom: 2px;
}

/* Clean Select inputs */
.form-select-clean {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 1.1rem;
    color: var(--ag-green-deep);
    font-weight: 700;
    padding: 5px 0;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left center;
    /* RTL support logic handled by direction, usually right for LTR */
}

/* RTL adjustment for select arrow if needed, usually browser handles it or we force it */
[dir="rtl"] .form-select-clean {
    background-position: left center;
}

.btn-search-gold {
    width: 65px;
    height: 65px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--ag-gold) 0%, #E6B800 100%);
    border: none;
    color: var(--ag-green-deep);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        0 10px 20px rgba(245, 196, 0, 0.3),
        inset 0 2px 2px rgba(255, 255, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.3, 0, 0.2, 1);
}

.btn-search-gold:hover {
    transform: scale(1.05);
    box-shadow:
        0 15px 30px rgba(245, 196, 0, 0.5),
        inset 0 2px 5px rgba(255, 255, 255, 0.6);
}

/* Floating Badges */
.floating-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.floating-badge:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.floating-badge i {
    color: var(--ag-gold);
    font-size: 1.1rem;
    filter: drop-shadow(0 2px 4px rgba(245, 196, 0, 0.4));
}

.floating-badge span {
    font-weight: 800;
    color: var(--ag-green-deep);
    font-size: 0.95rem;
}

/* New Premium Feature Cards */
.hero-feature-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.6);
    z-index: 10;
    transition: all 0.3s ease;
}

.hero-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--ag-gold) 0%, #E6B800 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    color: var(--ag-green-deep);
    font-size: 1.2rem;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--ag-green-deep);
    line-height: 1;
}

.feature-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
}

/* Positioning - Tightly around car */
.card-top-right {
    top: 5%;
    right: 15%;
}

.card-bottom-left {
    bottom: 10%;
    left: 5%;
}

/* Animations */
/* Animations */
@keyframes float-car {

    0%,
    100% {
        transform: translateY(0) scale(1.15);
    }

    50% {
        transform: translateY(-20px) scale(1.15);
    }
}

@keyframes float-badge {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Updated Positions to hug the car */
/* Updated Positions to hug the car perfectly */
.badge-pos-1 {
    top: 20%;
    right: 5%;
    animation-delay: 0s;
    animation: float-badge 5s ease-in-out infinite;
}

.badge-pos-2 {
    bottom: 25%;
    left: 10%;
    animation-delay: 2.5s;
    animation: float-badge 5s ease-in-out infinite;
}

/* Add "Connector Dot" to look like a feature callout */
.floating-badge::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--ag-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--ag-gold);

    /* Position relative to badge */
}

/* Dot positioning specific to each badge */
.badge-pos-1::after {
    bottom: -15px;
    /* Pointing down to car hood */
    left: 50%;
    transform: translateX(-50%);
}

.badge-pos-2::after {
    top: -15px;
    /* Pointing up to car rear */
    left: 50%;
    transform: translateX(-50%);
    background: var(--ag-white);
    /* Variation */
    box-shadow: 0 0 10px white;
}

/* Connecting Line (faint) */
.floating-badge::before {
    content: '';
    position: absolute;
    width: 1px;
    height: 15px;
    background: rgba(255, 255, 255, 0.3);
    left: 50%;
}

.badge-pos-1::before {
    bottom: -15px;
}

.badge-pos-2::before {
    top: -15px;
}


/* Responsive */
@media (max-width: 991px) {
    .hero-antigravity {
        padding-top: 50px;
        text-align: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-stats-float {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .stat-glass-card {
        min-width: 45%;
    }

    .search-glass-panel {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .search-input-group {
        border-left: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        padding-bottom: 15px;
        width: 100%;
    }

    .btn-search-gold {
        width: 100%;
        height: 50px;
        border-radius: 15px;
    }

    .hero-car-stage {
        margin-top: 4rem;
    }

    /* Mobile Car Mask adjustments */
    .hero-car-img {
        width: 100% !important;
        -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%) !important;
        mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%) !important;
    }
}

/* Premium Carousel Enhancements */
#heroCarCarousel {
    width: 100%;
    margin-top: -30px;
}

#heroCarCarousel .carousel-indicators {
    bottom: -60px;
}

#heroCarCarousel .carousel-indicators [data-bs-target] {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    border: none !important;
    background-color: var(--ag-white) !important;
    opacity: 0.3 !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 0 6px !important;
}

#heroCarCarousel .carousel-indicators .active {
    opacity: 1 !important;
    background-color: var(--ag-gold) !important;
    transform: scale(1.4);
    box-shadow: 0 0 15px var(--ag-gold-glow);
}

/* Mobile Adjustments for Indicators */
@media (max-width: 768px) {
    #heroCarCarousel {
        margin-top: 0;
        margin-bottom: 2rem;
        /* Add space below carousel for text */
    }

    #heroCarCarousel .carousel-indicators {
        bottom: -30px;
        /* Position closer to car but above text */
    }

    #heroCarCarousel .carousel-indicators [data-bs-target] {
        width: 8px !important;
        /* Smaller dots on mobile */
        height: 8px !important;
        margin: 0 4px !important;
    }
}

/* Ensure images don't overflow carousel items */
.carousel-item {
    padding: 10px;
    overflow: visible !important;
}

/* Masking Fix for Boxy Backgrounds */
.hero-car-img {
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0) 65%) !important;
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 10%, rgba(0, 0, 0, 0) 65%) !important;
}

/* ============================================
   LTR Layout Fixes for English Mode
   Ensures proper left-to-right alignment
   ============================================ */

html[dir="ltr"] .hero-antigravity {
    text-align: left !important;
}

html[dir="ltr"] .hero-title {
    text-align: left !important;
}

html[dir="ltr"] .hero-subtitle {
    text-align: left !important;
}

html[dir="ltr"] .hero-stats-float {
    justify-content: flex-start !important;
}

html[dir="ltr"] .search-glass-panel {
    flex-direction: row !important;
}

html[dir="ltr"] .pe-lg-5 {
    padding-right: 0 !important;
    padding-left: 3rem !important;
}

html[dir="ltr"] .ps-lg-5 {
    padding-left: 0 !important;
    padding-right: 3rem !important;
}

html[dir="ltr"] .stat-glass-card {
    text-align: center !important;
}

/* Fix icon margins for LTR */
html[dir="ltr"] .me-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

html[dir="ltr"] .ms-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

/* Ensure text flows left in LTR */
html[dir="ltr"] .animate-fade-in-up {
    text-align: left !important;
}

/* Search panel alignment */
html[dir="ltr"] .search-input-label {
    text-align: left !important;
}

/* 
 * CSS Car Illustration for Hero Section
 * Simple, clean car silhouette using CSS
 */

.hero-car-css {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 300px;
    margin: 0 auto;
}

/* Car Body */
.car-body {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 120px;
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 50%, #c0c0c0 100%);
    border-radius: 60px 60px 20px 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Car Roof */
.car-roof {
    position: absolute;
    top: -50px;
    left: 80px;
    width: 200px;
    height: 60px;
    background: linear-gradient(135deg, #a0a0a0 0%, #d0d0d0 50%, #a0a0a0 100%);
    border-radius: 40px 40px 0 0;
}

/* Windows */
.car-window {
    position: absolute;
    top: -40px;
    background: rgba(100, 150, 200, 0.6);
    border: 2px solid #666;
}

.car-window.front {
    left: 90px;
    width: 80px;
    height: 45px;
    border-radius: 30px 10px 0 0;
    transform: skewX(-10deg);
}

.car-window.back {
    right: 90px;
    width: 80px;
    height: 45px;
    border-radius: 10px 30px 0 0;
    transform: skewX(10deg);
}

/* Wheels */
.car-wheel {
    position: absolute;
    bottom: -30px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #333 30%, #666 50%, #333 70%);
    border-radius: 50%;
    border: 8px solid #222;
    box-shadow:
        inset 0 0 20px rgba(0, 0, 0, 0.5),
        0 10px 20px rgba(0, 0, 0, 0.4);
}

.car-wheel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: #444;
    border-radius: 50%;
    border: 3px solid #FFD700;
}

.car-wheel.front {
    left: 60px;
}

.car-wheel.back {
    right: 60px;
}

/* Headlights */
.car-headlight {
    position: absolute;
    bottom: 40px;
    width: 30px;
    height: 20px;
    background: linear-gradient(90deg, #FFD700 0%, #FFF 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.car-headlight.left {
    left: 10px;
}

.car-headlight.right {
    right: 10px;
}

/* Grille */
.car-grille {
    position: absolute;
    bottom: 50px;
    left: 20px;
    width: 60px;
    height: 30px;
    background: #333;
    border-radius: 5px;
    border: 2px solid #666;
}

/* Animation */
@keyframes car-float {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-15px);
    }
}

.car-body {
    animation: car-float 4s ease-in-out infinite;
}

/* Shine effect */
.car-shine {
    position: absolute;
    top: 20px;
    left: 100px;
    width: 150px;
    height: 40px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 100%);
    border-radius: 50%;
    transform: rotate(-5deg);
}