/* Home Page - Custom Styles & Mobile Fixes */

/* منع الـ overflow الأفقي على كل الصفحة */
body {
    overflow-x: hidden;
}

section {
    overflow-x: hidden;
}

/* ضمان عدم خروج أي عنصر من الحدود */
.max-w-7xl {
    overflow-x: hidden;
}

/* ==========================================
   HERO SECTION - Mobile Fixes
========================================== */
@media (max-width: 1023px) {
    /* على الموبايل: الـ grid يكون عمود واحد */
    .hero-grid-2col {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    /* الفيديو يكون أصغر على الجوال */
    #hero-video-container {
        max-width: 280px !important;
        margin: 0 auto !important;
    }
}

@media (max-width: 480px) {
    #hero-video-container {
        max-width: 220px !important;
    }
}

/* ==========================================
   FEATURED CARS - Mobile Card Width
========================================== */
@media (max-width: 768px) {
    #featured-cars-carousel .car-carousel-track .car-card,
    #featured-cars-carousel .car-carousel-track .car-list-card {
        width: calc(100vw - 4rem) !important;
        max-width: 320px;
    }

    #featured-cars-carousel .car-carousel-track {
        gap: 1.5rem;
    }

    /* تصغير أزرار التنقل */
    .car-carousel-prev,
    .car-carousel-next {
        width: 42px !important;
        height: 42px !important;
    }
}

@media (max-width: 480px) {
    #featured-cars-carousel .car-carousel-track .car-card {
        width: calc(100vw - 2rem) !important;
    }
}

/* ==========================================
   BRANDS CAROUSEL - Nav Buttons
========================================== */
.brands-nav-btn {
    width: 48px;
    height: 48px;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: #1A3263;
    font-size: 18px;
}

.brands-nav-btn:hover {
    background: #1A3263;
    color: white;
    border-color: #1A3263;
    transform: scale(1.05);
}

.brands-nav-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.brands-pagination-dots {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.brands-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D1D5DB;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.brands-dot.active {
    background: #1A3263;
    width: 24px;
    border-radius: 4px;
}

/* ==========================================
   TESTIMONIALS - Nav Buttons
========================================== */
.testimonials-nav-btn {
    width: 48px;
    height: 48px;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: #1A3263;
    font-size: 18px;
}

.testimonials-nav-btn:hover {
    background: #1A3263;
    color: white;
    border-color: #1A3263;
}

.testimonials-nav-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.testimonials-pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.testimonials-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D1D5DB;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.testimonials-dot.active {
    background: #1A3263;
    width: 24px;
    border-radius: 4px;
}

/* ==========================================
   SEARCH FILTER - RTL Fix
========================================== */
.search-select-wrapper {
    position: relative;
}

.search-select-wrapper .fa-chevron-down {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9CA3AF;
    font-size: 12px;
    z-index: 1;
}

.search-select-wrapper select {
    padding-left: 2.5rem !important;
    padding-right: 1rem !important;
}

/* ==========================================
   CAR CARD - إصلاح عام
========================================== */
.car-card {
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Fix car-card width on mobile */
@media (max-width: 768px) {
    #featured-cars-carousel .car-carousel-track .car-card,
    #car-list-carousel .car-carousel-track .car-card {
        width: calc(100vw - 4rem) !important;
        max-width: 320px;
    }

    #featured-cars-carousel .car-carousel-track,
    #car-list-carousel .car-carousel-track {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    #featured-cars-carousel .car-carousel-track .car-card,
    #car-list-carousel .car-carousel-track .car-card {
        width: calc(100vw - 2rem) !important;
    }
}

/* ==========================================
   GENERAL SECTION PADDING - Mobile
========================================== */
@media (max-width: 640px) {
    section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    /* عناوين السكشن على الموبايل */
    .section-title-ar {
        font-size: 24px !important;
    }
}

/* ==========================================
   TESTIMONIAL CARD STYLES
========================================= */
.testimonial-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid #E5E7EB;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.testimonial-card .quote-icon svg {
    width: 48px;
    height: 48px;
}

.testimonial-text {
    color: #4B5563;
    font-size: 15px;
    line-height: 1.7;
    flex: 1;
}

.rating-stars {
    display: flex;
    gap: 4px;
}

.rating-stars .fa-star {
    font-size: 16px;
}

.customer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.customer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1A3263;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.customer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.customer-details {
    flex: 1;
}

.customer-name {
    font-size: 16px;
    font-weight: 700;
    color: #1A3263;
    margin: 0;
}

.customer-title {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
}

.testimonials-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonials-page {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    min-width: 100%;
    padding: 0 0.5rem;
}

@media (max-width: 1023px) {
    .testimonials-page {
        grid-template-columns: 1fr;
    }
}

.testimonials-dot.active {
    background: #1A3263 !important;
    width: 24px;
    border-radius: 4px;
}