:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #e94560;
    --accent-hover: #ff6b6b;
    --gold-color: #d4af37;
    --gold-light: #f4d03f;
    --text-light: #ffffff;
    --text-muted: #a0a0a0;
    --bg-dark: #0f0f1a;
    --bg-card: #1e1e32;
    --gradient-primary: linear-gradient(135deg, var(--accent-color), var(--gold-color));
    --gradient-dark: linear-gradient(180deg, var(--primary-color), var(--bg-dark));
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 20px 60px rgba(233, 69, 96, 0.3);
    --border-radius: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    direction: rtl;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--accent-color); border-radius: 5px; }

/* Navbar */
.navbar {
    background: transparent;
    padding: 1rem 0;
    transition: var(--transition);
    z-index: 1000;
}
.navbar.scrolled {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0;
}
.navbar-brand img {
    height: 55px;
    transition: var(--transition);
}
.navbar.scrolled .navbar-brand img { height: 45px; }

.nav-link {
    color: var(--text-light) !important;
    font-weight: 600;
    margin: 0 0.5rem;
    position: relative;
    transition: var(--transition);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover { color: var(--accent-color) !important; }

.navbar-toggler {
    border: 2px solid var(--accent-color);
    padding: 0.5rem;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(233, 69, 96, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero & Carousel */
#heroCarousel { height: 100vh; min-height: 600px; }
.carousel-inner, .carousel-item { height: 100%; }
.carousel-image {
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6);
}
.carousel-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 15, 26, 0.8) 100%);
    display: flex; align-items: center; justify-content: center;
}
.carousel-content { text-align: center; padding: 2rem; max-width: 800px; }
.animate-title {
    font-size: 3.5rem; font-weight: 900; margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-light), var(--gold-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: fadeInUp 0.8s ease;
}
.animate-subtitle { font-size: 1.5rem; color: var(--text-muted); animation: fadeInUp 0.8s ease 0.2s backwards; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.carousel-control-prev, .carousel-control-next {
    width: 60px; height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    transition: var(--transition);
}
.carousel-control-prev { right: 30px; left: auto; }
.carousel-control-next { left: 30px; right: auto; }
.carousel-control-prev:hover, .carousel-control-next:hover { background: var(--gold-color); transform: translateY(-50%) scale(1.1); }

.carousel-indicators { bottom: 30px; }
.carousel-indicators button { width: 12px; height: 12px; border-radius: 50%; background: var(--text-muted); border: none; margin: 0 5px; transition: var(--transition); }
.carousel-indicators button.active { background: var(--accent-color); transform: scale(1.3); }

/* About Brief */
.about-brief { padding: 5rem 0; position: relative; background: var(--gradient-dark); }
.brief-content { text-align: center; max-width: 800px; margin: 0 auto; }
.brief-icon {
    width: 100px; height: 100px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(233, 69, 96, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px 10px rgba(233, 69, 96, 0); }
}
.brief-content h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--gold-light); }
.brief-content p { font-size: 1.2rem; color: var(--text-muted); line-height: 2; }

/* Logo Section (New) */
.logo-section {
    padding: 4rem 0;
    background: var(--primary-color);
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.logo-box {
    text-align: center;
}
.logo-box img {
    max-width: 200px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}
.logo-box img:hover { transform: scale(1.05); }
.logo-box h3 { color: var(--gold-light); font-weight: 700; margin-bottom: 0.5rem; }
.logo-box p { color: var(--text-muted); }

/* Section Title */
.section-title { text-align: center; font-size: 2.5rem; font-weight: 800; margin-bottom: 3rem; color: var(--text-light); }
.section-title::after { content: ''; display: block; width: 80px; height: 4px; background: var(--gradient-primary); margin: 1rem auto 0; border-radius: 2px; }

/* Gallery */
.gallery-section { padding: 5rem 0; background: var(--bg-dark); }
.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.gallery-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(233, 69, 96, 0.8);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition);
}
.gallery-overlay i { font-size: 2rem; color: var(--text-light); transform: scale(0); transition: var(--transition); }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .gallery-overlay i { transform: scale(1); }

/* Why Choose Us */
.why-choose-section { padding: 5rem 0; background: var(--gradient-dark); }
.feature-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
    height: 100%;
}
.feature-card:hover { transform: translateY(-10px); border-color: var(--accent-color); box-shadow: var(--shadow-hover); }
.feature-icon {
    width: 80px; height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}
.feature-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; color: var(--gold-light); }
.feature-card p { color: var(--text-muted); font-size: 1rem; }

/* Cars Section */
.cars-section { padding: 5rem 0; background: var(--primary-color); }
.car-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid transparent;
    height: 100%;
}
.car-card:hover { transform: translateY(-10px); border-color: var(--gold-color); box-shadow: var(--shadow-hover); }
.car-image-container {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    cursor: pointer;
}
.car-image-container img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.car-image-container:hover img { transform: scale(1.1); }
.car-badge {
    position: absolute; top: 15px; right: 15px;
    background: var(--accent-color);
    color: var(--text-light);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}
.car-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    opacity: 0; transition: var(--transition);
}
.car-image-container:hover .car-overlay { opacity: 1; }
.view-btn { background: var(--accent-color); color: var(--text-light); border: none; padding: 0.5rem 1.5rem; border-radius: 25px; font-weight: 600; transition: var(--transition); }
.view-btn:hover { background: var(--gold-color); }

.car-info { padding: 1.5rem; }
.car-info h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; }
.car-meta { display: flex; gap: 1rem; margin-bottom: 1rem; }
.car-meta span { color: var(--text-muted); font-size: 0.9rem; }
.car-meta i { color: var(--accent-color); }
.car-price { font-size: 1.5rem; font-weight: 800; color: var(--gold-light); }

/* About Section */
.about-section { padding: 5rem 0; background: var(--bg-dark); }
.about-image { position: relative; border-radius: var(--border-radius); overflow: hidden; }
.about-image img { width: 100%; border-radius: var(--border-radius); }
.experience-badge {
    position: absolute; bottom: 30px; left: 30px;
    background: var(--gradient-primary);
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-card);
}
.experience-badge .number { display: block; font-size: 3rem; font-weight: 900; color: var(--text-light); }
.experience-badge .text { font-size: 1rem; color: rgba(255, 255, 255, 0.9); }
.about-content h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--gold-light); }
.about-content p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1.5rem; }
.about-feature { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.8rem; }
.about-feature i { color: var(--accent-color); }
.vision-box {
    background: var(--bg-card);
    border-right: 4px solid var(--accent-color);
    padding: 1.5rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Services */
.services-section { padding: 5rem 0; background: var(--gradient-dark); }
.service-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid transparent;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.service-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--gradient-primary); transform: scaleX(0); transition: var(--transition); }
.service-card:hover { transform: translateY(-10px); border-color: var(--accent-color); box-shadow: var(--shadow-hover); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
    width: 90px; height: 90px;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.2), rgba(212, 175, 55, 0.2));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.2rem;
    color: var(--accent-color);
    transition: var(--transition);
}
.service-card:hover .service-icon { background: var(--gradient-primary); color: var(--text-light); transform: rotateY(180deg); }
.service-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; }
.service-card p { color: var(--text-muted); line-height: 1.6; }

/* Contact */
.contact-section { padding: 6rem 0; background: var(--gradient-primary); position: relative; overflow: hidden; }
.contact-content { text-align: center; position: relative; z-index: 1; }
.contact-content h2 { font-size: 3rem; font-weight: 900; margin-bottom: 1rem; }
.contact-content p { font-size: 1.2rem; color: rgba(255, 255, 255, 0.9); margin-bottom: 2rem; }
.tiktok-btn {
    display: inline-flex; align-items: center; gap: 1rem;
    background: var(--text-light);
    color: var(--bg-dark);
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.tiktok-btn:hover { transform: translateY(-5px) scale(1.05); color: var(--accent-color); }

/* Footer */
.footer { background: var(--primary-color); padding: 3rem 0 1rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 2rem; margin-bottom: 2rem; }
.footer-brand p { color: var(--text-muted); }
.social-link {
    width: 50px; height: 50px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light);
    font-size: 1.5rem;
    transition: var(--transition);
    text-decoration: none;
}
.social-link:hover { background: var(--accent-color); transform: translateY(-5px); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-bottom p { color: var(--text-muted); margin: 0; }

/* Floating Button */
.floating-tiktok {
    position: fixed; bottom: 30px; left: 30px;
    width: 60px; height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light);
    font-size: 1.8rem;
    text-decoration: none;
    z-index: 999;
    box-shadow: 0 5px 25px rgba(233, 69, 96, 0.5);
    transition: var(--transition);
    animation: bounce 2s infinite;
}
.floating-tiktok:hover { background: var(--gold-color); transform: scale(1.1); color: var(--text-light); }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 60% { transform: translateY(-5px); } }

/* Modal */
/* ==================== Modal Section (معدل لعرض أكبر) ==================== */

/* جعلنا عرض النافذة 95% من الشاشة */
/* ==================== Modal Section (معدل للعرض الكبير وإصلاح الزر) ==================== */

.modal-dialog {
    max-width: 100vw;
    margin: 0;
    height: 100vh;
}

.modal-content {
    background: transparent;
    border: none;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* زر الإغلاق - تم الإصلاح هنا */
.btn-close {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1050; /* رقم عالي ليظهر فوق كل شيء */
    
    /* خلفية داكنة شفافة خلف الأيقونة */
    background-color: rgba(0, 0, 0, 0.5); 
    
    /* هذا السطر يجعل الأيقونة البيضاء مرئية */
    filter: invert(1) grayscale(100%) brightness(200%);
    
    opacity: 1;
    border-radius: 50%;
    padding: 1.2rem; /* حجم الزر */
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    transition: var(--transition);
}

.btn-close:hover {
    background-color: var(--accent-color);
    transform: rotate(90deg) scale(1.1);
}

.modal-body {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modal-carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
}

/* الصورة - تم فرض عرض أكبر هنا */
#modalImage {
    /* نجبر الصورة على أخذ 90% من عرض الشاشة */
    width: 90vw; 
    
    /* الطول يتكيف تلقائياً مع العرض */
    height: auto; 
    
    /* الحد الأقصى للطول 90% لكي لا تلمس الحواف */
    max-height: 90vh;
    
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

/* أزرار التنقل */
.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    right: 20px;
}

.modal-next {
    left: 20px;
}

.modal-footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1050;
}

.modal-dots {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

.modal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.modal-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.modal-dot.active {
    background: var(--accent-color);
    transform: scale(1.4);
}

/* Responsive */
@media (max-width: 767px) {
    .modal-nav {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    .modal-prev { right: 5px; }
    .modal-next { left: 5px; }
    
    #modalImage {
        width: 100vw; /* الموبايل نعطيها العرض بالكامل */
        max-height: 80vh;
    }
    
    .btn-close {
        padding: 1rem;
    }
}
/* Responsive */
@media (max-width: 991px) {
    .navbar-collapse { background: rgba(26, 26, 46, 0.98); margin-top: 1rem; border-radius: var(--border-radius); padding: 1rem; }
    .animate-title { font-size: 2.5rem; }
    .carousel-control-prev, .carousel-control-next { width: 45px; height: 45px; }
}
@media (max-width: 767px) {
    .animate-title { font-size: 2rem; }
    .section-title { font-size: 2rem; }
    .contact-content h2 { font-size: 2rem; }
    .floating-tiktok { width: 50px; height: 50px; font-size: 1.5rem; bottom: 20px; left: 20px; }
    .footer-content { flex-direction: column; text-align: center; }
}