/* --- Root & General --- */
:root {
    --main-red: #ff1e1e;
    --bg-dark: #0b0b0b;
    --card-bg: #141416;
    --border-color: #222;
    --text-gray: #888;
}
html {
    scroll-behavior: smooth;
}

html, body {
    max-width: 100%;
    overflow-x: hidden; /* هادي هي اللي كتحيد داك الخط التحتاني وتمنع الهروب لليمن */
    margin: 0;
    padding: 0;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Poppins', sans-serif; 
    background: var(--bg-dark); 
    color: white; 
    overflow-x: hidden; 
    margin: 0;
    padding-top: 80px;
}

/* --- Header --- */
/* --- Header التنسيق الجديد --- */
header {
    position: fixed; /* ولا absolute حسب الرغبة، ولكن fixed أحسن باش يبقى كيبان */
    top: 0;
    left: 0;         /* هادي ضرورية باش يبدا من أقصى اليسار */
    width: 100%;     /* يشد العرض كامل */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%; /* 5% باش يخلي شوية الفراغ للوغو واللغات من الجناب */
    background: rgba(0, 0, 0, 0.9); /* خلفية سوداء شفافة */
    backdrop-filter: blur(10px);   /* تأثير الضبابة كيعطي لمسة عصرية */
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;   /* باش يبقى فوق كاع العناصر */
    box-sizing: border-box; /* هادي مهمة باش padding ميخرجش الـ header على العرض */
}

nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links { display: flex; gap: 20px; }

/* --- Language Dropdown --- */
.lang-container {
    position: relative;
    cursor: pointer;
    background: #1a1a1a;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid #333;
    font-size: 0.85rem;
}

.lang-selected i { font-size: 0.7rem; margin-left: 5px; color: var(--main-red); }

.lang-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    list-style: none;
    width: 150px;
    border-radius: 8px;
    display: none; /* مخفي فالبداية */
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

.lang-dropdown li {
    padding: 10px 15px;
    transition: 0.3s;
    color: #ccc;
}

.lang-dropdown li:hover { background: var(--main-red); color: white; }

.lang-container:hover .lang-dropdown { display: flex; }

/* دعم اللغة العربية (RTL) */
body.rtl { direction: rtl; text-align: right; }
body.rtl .nav-links { gap: 20px; }
body.rtl .lang-dropdown { right: auto; left: 0; }

.logo { font-size: 1.5rem; font-weight: bold; text-transform: uppercase; }
.logo span { color: var(--main-red); }

nav a { color: white; text-decoration: none; margin-left: 15px; font-size: 0.9rem; transition: 0.3s; }
nav a:hover { color: var(--main-red); }

/* --- Hero Section --- */
.hero { 
    height: 60vh; 
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.8)), 
                url('images/cupra.jpg'); 
    background-size: cover;
    background-position: center;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center;
    padding-top: 20px; /* نقصنا الـ padding باش الصورة تعمر البلاصة اللي خوتها الـ Header */
}

.hero-content h1 { 
    font-size: 1.5rem;
    line-height: 1.2;
}

.hero-content h1 span { 
    color: var(--main-red); 
    display: block; 
    font-size: 3rem; 
    margin-top: 5px;
    font-weight: 800;
}

.hero-content p { color: #ccc; margin-top: 10px; font-size: 0.9rem; }

/* --- Fleet & Filter --- */
.fleet-section { text-align: center; padding: 50px 8% 20px; }
.fleet-section h2 { font-size: 2rem; font-weight: 700; }
.fleet-section h2 span { color: var(--main-red); }

.filter-buttons { 
    display: flex; 
    justify-content: center; 
    gap: 10px; 
    margin-top: 25px; 
    flex-wrap: wrap;
}

.btn-cat { 
    padding: 10px 20px; 
    border-radius: 8px; 
    border: 1px solid #333; 
    background: #1a1a1a; 
    color: #aaa; 
    cursor: pointer; 
    font-size: 0.85rem; 
    transition: 0.3s;
}

.btn-cat.active, .btn-cat:hover { 
    background: var(--main-red); 
    color: white; 
    border-color: var(--main-red);
    box-shadow: 0 5px 15px rgba(255, 30, 30, 0.2); 
}

/* --- Car Grid & Cards (العبارات نتاع blotopay) --- */
.car-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 30px; 
    padding: 30px 8% 80px; 
}

.car-card-luxury { 
    background: var(--card-bg); 
    border-radius: 20px; 
    overflow: hidden; 
    position: relative; 
    border: 1px solid var(--border-color); 
    transition: 0.3s ease;
}

.car-card-luxury:hover { transform: translateY(-10px); border-color: var(--main-red); }

/* الحل النهائي لبيوضية الصور */
.car-card-luxury img {
    width: 100% !important;
    height: 230px !important;
    object-fit: cover !important; /* هادي هي اللي كتمسح لبيوضية */
    display: block;
}

.price-badge { 
    position: absolute; 
    top: 15px; 
    right: 15px; 
    background: var(--main-red); 
    color: white; 
    padding: 7px 14px; 
    border-radius: 10px; 
    font-weight: bold; 
    font-size: 0.9rem; 
    z-index: 2;
}

.car-info-luxury { padding: 25px; }
.car-info-luxury h3 { text-align: center; text-transform: uppercase; font-size: 1.4rem; margin-bottom: 15px; color: white; }

.car-specs-mini { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 12px; 
    margin-bottom: 25px; 
    color: var(--text-gray); 
    font-size: 0.85rem; 
}

.car-specs-mini span i { color: var(--main-red); margin-right: 8px; }

.btn-select { 
    width: 100%; 
    padding: 14px; 
    background: var(--main-red); 
    color: white; 
    border: none; 
    border-radius: 12px; 
    font-weight: bold; 
    cursor: pointer; 
    transition: 0.3s;
}

.btn-select:hover { opacity: 0.9; transform: scale(0.98); }

/* --- Modals & Admin UI --- */
.modal { 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.95); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    z-index: 1000; 
}

.modal-content { 
    background: #1c1c1e; 
    padding: 30px; 
    border-radius: 20px; 
    width: 90%; 
    max-width: 400px; 
    border: 1px solid #333;
}

.modal-content h3 { margin-bottom: 20px; color: var(--main-red); }

.modal-content input, .form-select { 
    width: 100%; 
    padding: 12px; 
    margin-bottom: 15px; 
    background: #000; 
    border: 1px solid #333; 
    color: white; 
    border-radius: 10px; 
    outline: none;
}

.btn-save { 
    width: 100%; 
    padding: 14px; 
    background: var(--main-red); 
    border: none; 
    color: white; 
    font-weight: bold; 
    border-radius: 10px; 
    cursor: pointer; 
}

.cancel-btn { margin-top: 15px; color: #666; cursor: pointer; display: block; }

/* --- Footer --- */
footer {
    background: #000;
    padding: 60px 20px 30px;
    text-align: center;
    border-top: 1px solid #1a1a1a;
}

.footer-logo { font-size: 1.8rem; font-weight: bold; margin-bottom: 15px; }
.footer-logo span { color: var(--main-red); }

footer p { color: #666; font-size: 0.95rem; margin-bottom: 25px; max-width: 400px; margin-inline: auto; }

.social-links { display: flex; justify-content: center; gap: 25px; margin-bottom: 30px; }
.social-links a { color: #888; font-size: 1.5rem; transition: 0.3s; }
.social-links a:hover { color: var(--main-red); }

.footer-bottom { 
    color: #444; 
    font-size: 0.8rem; 
    border-top: 1px solid #111; 
    padding-top: 25px; 
    margin-top: 20px;
}

/* --- Responsive (Desktop) --- */
@media (min-width: 768px) {
    header { padding: 25px 8%; }
    .hero { height: 70vh; } 
    .hero-content h1 { font-size: 3.5rem; white-space: normal; } 
    .hero-content h1 span { font-size: 5rem; }
    .hero-content p { font-size: 1.2rem; }
}
/* --- Common Section Header --- */
.section-header { text-align: center; margin-bottom: 40px; padding: 0 20px; }
.section-header h2 { font-size: 2.2rem; margin-bottom: 10px; }
.section-header p { color: var(--text-gray); max-width: 600px; margin: 0 auto; }

/* --- Services Section --- */
.services-section { padding: 80px 8%; background: #080808; }
.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
}

.service-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: 0.3s;
}


.service-card:hover { border-color: var(--main-red); transform: translateY(-5px); }
.service-card i { font-size: 2.5rem; color: var(--main-red); margin-bottom: 20px; }
.service-card h3 { margin-bottom: 15px; font-size: 1.3rem; }
.service-card p { color: var(--text-gray); font-size: 0.9rem; line-height: 1.6; }

/* --- Map Section --- */
.map-section { padding: 80px 0 0; background: var(--bg-dark); }
.map-container { 
    width: 100%; 
    height: 200px !important; /* رقيقة بحال لي طلبتي */
    border-radius: 15px; 
    overflow: hidden; 
    line-height: 0; 
    border: 1px solid #333;
    filter: none !important; /* حيدنا كاع الفلترز */
    opacity: 1; 
}
/* باش نضمنو الـ iframe يشد الطول الجديد كامل */
.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- Header التنسيق الاحترافي الرقيق --- */
/* --- Header التعديل الجديد: شفاف وعريض --- */
/* --- Header (النسخة الرقيقة، الشفافة والمتحركة) --- */
.main-header {
    background: rgba(0, 0, 0, 0.4); /* خلفية شفافة بزاف باش يبان الـ body */
    backdrop-filter: blur(8px);
    padding: 5px 0; /* رقيق جداً فـ الطول */
    width: 100%;
    position: absolute; /* كيمشي مع الهبطة وما كيبقاش كيبان */
    top: 0;
    z-index: 1000;
    border-bottom: none; /* حيدنا الخط الأحمر تماماً */
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.nav-links {
    list-style: none;
    display: flex; 
    justify-content: space-around; 
    width: 95%; 
    margin: 0;
    margin-top: 15px;
    padding: 10px 0 5px 0; /* زدنا شوية الفوق (10px) ونقصنا التحت (5px) باش يضبط الوسط */
}

.nav-links li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px; 
    display: flex;
    flex-direction: column; 
    align-items: center;
    gap: 2px; /* مسافة صغيرة بين الأيقونة والكلمة */
    transition: 0.3s;
}
.nav-links li a i {
    font-size: 16px; 
}

/* الجزء الخاص بـ Service 24H/24 */
.header-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    font-size: 11px;
    width: 40%; 
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    padding-top: 5px; /* مسافة خفيفة فوق Service 24h */
    margin-top: 2px; /* تقريبها شوية من الروابط اللي فوقها */
}
.status-dot {
    width: 7px;
    height: 7px;
    background-color: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 5px #2ecc71;
}

/* Responsive للتيليفون */
@media (max-width: 768px) {
    .nav-links {
        width: 100%;
        gap: 5px;
    }
    .nav-links li a {
        font-size: 11px; /* يبقى صغير فالتليفون باش يقد السطر */
    }
}

/* ستايل خاص بالأيقونات Lucide وسط الكارطة */
.car-specs-mini span {
    display: flex;
    align-items: center;
    color: #94a3b8; /* لون رمادي أنيق */
    font-size: 0.85rem;
}

.car-specs-mini i {
    color: #94a3b8 !important; /* فرض اللون الرمادي */
    stroke-width: 1.5px; /* هادي هي اللي كتخلي الرمز رقيق */
    margin-right: 8px;
}

/* تحسين شكل النصوص فالتلفون */
@media (max-width: 480px) {
    .car-specs-mini {
        gap: 8px;
        font-size: 0.75rem;
    }
}
/* 1. جعل حركة الصور ناعمة جداً (Transition Smooth) */
.car-card-luxury img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform; /* كيعلم المتصفح باش يجهز الكرت شاشة */
}

/* 2. الزوم بلا تقطاع */
.car-card-luxury:hover img {
    transform: scale(1.08) !important; /* زوم خفيف كيبان احترافي كتر */
}

/* 3. تنعيم حركة العنوان (اللون) */
.car-info-luxury h3 {
    transition: color 0.4s ease-in-out !important;
}

/* 4. تطوير الزر (Sélectionner) باش يولي Smooth */
.btn-select {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-bottom: 0px solid transparent;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-select:hover {
    transform: translateY(-4px) !important;
    background-color: #e60000 !important;
    /* ظل ناعم (Blur عالي) ماشي قاصح */
    box-shadow: 0 10px 20px rgba(255, 30, 30, 0.3) !important; 
}

/* 5. حركة الكارطة فاش كطلع (Smooth lift) */
.car-card-luxury {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.5s ease, 
                box-shadow 0.5s ease !important;
}

