/* ==============================================
   Driver Club - Main Stylesheet
   نادي السائقين - التنسيقات الرئيسية
   ============================================== */

/* استيراد خط عربي */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

/* المتغيرات */
:root {
    --primary-color: #6C5CE7;
    --primary-dark: #5849c2;
    --secondary-color: #00CEC9;
    --accent-color: #FD79A8;
    --success-color: #00B894;
    --warning-color: #FDCB6E;
    --danger-color: #E74C3C;
    --dark-color: #2D3436;
    --gray-dark: #636E72;
    --gray-light: #B2BEC3;
    --light-color: #F8F9FA;
    --white: #FFFFFF;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 5px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

/* إعادة التعيين */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

/* الحاوية */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==============================================
   الهيدر
   ============================================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* التنقل */
.nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav a {
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    color: var(--gray-dark);
}

.nav a:hover,
.nav a.active {
    background: var(--primary-color);
    color: var(--white);
}

/* قائمة الموبايل */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 15px;
        box-shadow: var(--shadow);
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav a {
        width: 100%;
        text-align: center;
    }
}

/* ==============================================
   البانر / السلايدر
   ============================================== */
.banner-section {
    padding: 20px 0;
}

.banner-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.banner-slide {
    display: none;
}

.banner-slide.active {
    display: block;
}

.banner-slide img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .banner-slide img {
        height: 300px;
    }
}

.banner-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.banner-dot.active {
    background: var(--white);
    width: 25px;
    border-radius: 5px;
}

/* ==============================================
   التصنيفات
   ============================================== */
.categories-section {
    padding: 30px 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title a {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

.category-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 10px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

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

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.25rem;
    color: var(--white);
}

.category-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark-color);
}

@media (max-width: 480px) {
    .category-card {
        padding: 15px 5px;
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .category-name {
        font-size: 0.75rem;
    }
}

/* ==============================================
   بطاقات الموردين
   ============================================== */
.vendors-section {
    padding: 30px 0;
}

.vendors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

@media (max-width: 600px) {
    .vendors-grid {
        grid-template-columns: 1fr;
    }
}

.vendor-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.vendor-image {
    height: 160px;
    overflow: hidden;
    position: relative;
}

.vendor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vendor-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--success-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.vendor-content {
    padding: 15px;
}

.vendor-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.vendor-category {
    display: inline-block;
    background: var(--light-color);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--gray-dark);
    margin-bottom: 10px;
}

.vendor-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--gray-dark);
    margin-bottom: 10px;
}

.vendor-location i {
    color: var(--primary-color);
}

.vendor-offers {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--light-color);
}

.offers-count {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.view-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.view-btn:hover {
    background: var(--primary-dark);
}

/* ==============================================
   بطاقات العروض
   ============================================== */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.offer-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.offer-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 20px;
    color: var(--white);
}

.offer-discount {
    font-size: 2rem;
    font-weight: 800;
}

.offer-title {
    font-size: 1rem;
    margin-top: 5px;
    opacity: 0.9;
}

.offer-body {
    padding: 15px;
}

.offer-vendor {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.offer-vendor-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-color);
}

.offer-vendor-name {
    font-weight: 600;
    color: var(--dark-color);
}

.offer-vendor-city {
    font-size: 0.8rem;
    color: var(--gray-dark);
}

.offer-details {
    font-size: 0.9rem;
    color: var(--gray-dark);
    margin-bottom: 15px;
}

.offer-validity {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--gray-dark);
}

.offer-validity i {
    color: var(--warning-color);
}

/* ==============================================
   صفحة المورد
   ============================================== */
.vendor-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 40px 0 80px;
    color: var(--white);
}

.vendor-hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.vendor-hero-logo {
    width: 100px;
    height: 100px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.3);
}

.vendor-hero-info h1 {
    font-size: 1.75rem;
    margin-bottom: 5px;
}

.vendor-hero-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.vendor-hero-categories span {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.vendor-details-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-top: -50px;
    box-shadow: var(--shadow-lg);
}

.vendor-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-color);
}

.vendor-contact-item:last-child {
    border-bottom: none;
}

.vendor-contact-item i {
    width: 40px;
    height: 40px;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.vendor-contact-item a {
    color: var(--primary-color);
    font-weight: 500;
}

/* ==============================================
   البحث والفلاتر
   ============================================== */
.search-section {
    padding: 20px 0;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--light-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-dark);
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid var(--light-color);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--white);
    cursor: pointer;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ==============================================
   صفحة الأسئلة الشائعة
   ============================================== */
.faq-section {
    padding: 30px 0;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.faq-question {
    padding: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--light-color);
}

.faq-question i {
    transition: var(--transition);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 500px;
}

.faq-answer p {
    color: var(--gray-dark);
    line-height: 1.8;
}

/* ==============================================
   صفحة الإعلانات
   ============================================== */
.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.announcement-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.announcement-card.pinned {
    border: 2px solid var(--primary-color);
}

.announcement-image {
    height: 200px;
    overflow: hidden;
}

.announcement-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.announcement-content {
    padding: 20px;
}

.announcement-date {
    font-size: 0.85rem;
    color: var(--gray-dark);
    margin-bottom: 10px;
}

.announcement-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.announcement-text {
    color: var(--gray-dark);
    line-height: 1.8;
}

/* ==============================================
   الفوتر
   ============================================== */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--white);
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--gray-light);
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--white);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--gray-light);
    font-size: 0.9rem;
}

/* ==============================================
   Pagination
   ============================================== */
.pagination-nav {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 5px;
}

.pagination li a {
    display: block;
    padding: 10px 15px;
    background: var(--white);
    border-radius: var(--radius);
    color: var(--dark-color);
    font-weight: 500;
    box-shadow: var(--shadow);
}

.pagination li.active a,
.pagination li a:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ==============================================
   رسائل التنبيه
   ============================================== */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ==============================================
   حالة فارغة
   ============================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-light);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--gray-dark);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--gray-light);
}

/* ==============================================
   التحميل
   ============================================== */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==============================================
   Utilities
   ============================================== */
.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.text-muted { color: var(--gray-dark); }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.d-none { display: none; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }

/* ==============================================
   Page Header Section
   ============================================== */
.page-header-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 40px 0;
    color: var(--white);
    text-align: center;
}

.page-header-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-header-section p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* ==============================================
   FAQ Section
   ============================================== */
.faq-section {
    padding: 40px 0;
}

/* ==============================================
   Announcements Section
   ============================================== */
.announcements-section {
    padding: 40px 0;
}

.pinned-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 12px;
    font-size: 0.8rem;
    position: absolute;
    top: 15px;
    right: 15px;
    border-radius: 15px;
}

.announcement-card {
    position: relative;
}

/* ==============================================
   Offers Section
   ============================================== */
.offers-section {
    padding: 30px 0;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

@media (max-width: 600px) {
    .offers-grid {
        grid-template-columns: 1fr;
    }
}