/* ================================================= */
/* 1. تعريف متغيرات CSS (COLORS) */
/* ================================================= */
:root {
    /* الألوان الرئيسية */
    --primary-color-dark: #1A237E; /* أزرق داكن (العناوين، الأيقونات، النصوص الرئيسية) */
    --success-color: #4CAF50; /* أخضر (الأزرار الرئيسية، حالة تأكيد الحجز) */
    --success-color-dark: #388E3C; /* أخضر داكن (Hover) */

    /* الألوان الثانوية والتمييز */
    --accent-color: #FFC107; /* أصفر (النجوم، أزرار الإجراءات الثانوية) */
    --accent-color-dark: #FFB300; /* أصفر داكن (Hover) */
    --error-color: #DB4437; /* أحمر (الخروج، الحذف) */
    --info-color: #00c3ff; /* أزرق فاتح (للإشعارات/الرسائل) */
    
    /* ألوان الخلفيات */
    --background-light: #FFFFFF; /* خلفية البطاقات والنماذج */
    --background-body: #F5F5F5; /* خلفية الجسم */
    --background-success-light: #E8F5E9; /* خلفية فاتحة للنجاح */

    /* ألوان النصوص العامة */
    --text-primary: #333;
    --text-secondary: #666;
    --text-placeholder: #999;
    --border-color: #CCC;
}

/* ================================================= */
/* تنسيق عام للخلفية */
/* ================================================= */
* {
    /* تطبيق (Box Model) */
    box-sizing: border-box;
}

body {
    direction: rtl; /* من اليمين لليسار */
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;      /* منع ظهور شريط التمرير (للموبايل) */
    background-color: var(--background-body); /* الخلفية الفاتحة */
    background-image: url('../images/background.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    
    min-height: 100vh; 
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(4px); /* خفيفة الضبابية */
    background-color: rgba(25, 32, 102, 0.4);
    z-index: -1;
}

/* ================================================= */
/* (خاص بصفحة login.html) */
/* ================================================= */
.auth-container {
    width: 90%;
    max-width: 400px;
    background-color: var(--background-light);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 25px 20px;
    text-align: center;
    margin: 20px auto; /* مسافة من الأعلى والأسفل */
}

.logo-area {
    margin-bottom: 20px;
}
.logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
}
.logo-area h1 {
    color: var(--primary-color-dark);
    font-size: 1.8em;
    margin: 0;
}

/* شريط (Tabs) */
.tab-switcher {
    display: flex;
    background-color: #E0E0E0;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
}
.tab-button {
    flex-grow: 1;
    padding: 12px 0;
    border: none;
    background-color: transparent;
    color: var(--primary-color-dark);
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}
.tab-button.active {
    background-color: var(--success-color);
    color: var(--background-light);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* تنسيق inputs */
.input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.input-group:focus-within {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3); /* التأثير الحيوي */
}
.input-group .icon {
    color: var(--primary-color-dark);
    margin-left: 10px;
    font-size: 1.1em;
}
.input-group input {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 5px 0;
    font-size: 1em;
    background: transparent;
}
.input-group input::placeholder {
    color: var(--text-placeholder);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    margin-bottom: 20px;
}
.form-options a {
    color: var(--primary-color-dark);
    text-decoration: none;
}

/* الأزرار */
.primary-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: var(--success-color);
    color: var(--background-light);
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}
.primary-button:hover {
    background-color: var(--success-color-dark);
}
.primary-button:active {
    transform: scale(0.99);
}

.social-login {
    margin-top: 25px;
}
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-placeholder);
    margin-bottom: 15px;
}
.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #E0E0E0;
    margin: 0 10px;
}
.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}
.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: var(--background-light);
    font-size: 1.2em;
    transition: transform 0.2s ease;
}
.social-icon:hover {
    transform: scale(1.05);
}
.google {
    background-color: #DB4437; /* ترك اللون الخاص لجوجل */
}
.facebook {
    background-color: #4267B2; /* ترك اللون الخاص لفيسبوك */
}

/* إخفاء النموذج غير النشط */
.auth-form.hidden {
    display: none;
}

/* ================================================= */
/* الهيدر العلوي (header.html) */
/* ================================================= */

#main-header {
    background-color: var(--background-light);
    color: var(--primary-color-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    height: 55px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    position: fixed; /* تثبيت الهيدر في الأعلى */
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: transform 0.3s ease; /* تأثير الاختفاء عند التمرير */
}

/* الاختفاء عند التمرير */
.header-hidden {
    transform: translateY(-100%);
}

.header-logo {
    display: flex;
    align-items: center;
}
.logo-small {
    width: 30px;
    height: 30px;
    margin-left: 8px;
}
.header-logo h1 {
    font-size: 1.2em;
    margin: 0;
    font-weight: bold;
}

.header-icon-button {
    background: none;
    border: none;
    font-size: 1.4em;
    color: var(--primary-color-dark);
    cursor: pointer;
    padding: 5px;
}

/* ================================================= */
/* القائمة السفلية (bottom-nav.html) */
/* ================================================= */

#bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--background-light);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color-dark);
    font-size: 0.8em;
    padding: 5px;
    transition: color 0.3s ease;
}

.nav-item i {
    font-size: 1.3em;
    margin-bottom: 3px;
}

/* الأيقونة النشطة */
.nav-item.active {
    color: var(--success-color);
}
.nav-item:hover {
    color: var(--success-color-dark); /* اللون عند التمرير */
}

/* ================================================= */
/* القائمة الجانبية (sidebar.html) */
/* ================================================= */

#sidebar-menu {
    position: fixed;
    top: 0;
    left: -300px; /* إخفاء القائمة الجانبية  */
    width: 280px;
    height: 100%;
    z-index: 200; /* أعلى من أي شيء */
    transition: left 0.3s ease;
}

#sidebar-menu.open {
    left: 0; /* إظهار القائمة */
}

.sidebar-content {
    background-color: var(--background-light);
    width: 100%;
    height: 100%;
    padding: 20px 0;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
    display: none;
}
#sidebar-menu.open #sidebar-overlay {
    display: block;
}

.user-info {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #E0E0E0;
}
.user-avatar {
    font-size: 4em;
    color: var(--success-color);
    margin-bottom: 5px;
}
.user-info h3 {
    margin: 5px 0 2px;
    color: var(--primary-color-dark);
}
.user-info p {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-placeholder);
}

.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-links li {
    padding: 0;
}
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--primary-color-dark);
    font-size: 1em;
    transition: background-color 0.2s ease;
}
.sidebar-link i {
    margin-left: 15px;
    font-size: 1.1em;
}
.sidebar-link:hover {
    background-color: var(--background-body);
    color: var(--success-color);
}
.logout-item {
    margin-top: 20px;
}
.logout-link {
    color: var(--error-color);
}

/* ================================================= */
/* الصفحة الرئيسية (index.html) */
/* ================================================= */

/* عدم تداخل المحتوى مع الهيدر والقائمة السفلية (تم إضافة Padding في main.js) */
.page-content {
    padding: 15px;
}

/* العناوين الرئيسية للأقسام */
.section-title {
    color: var(--primary-color-dark);
    font-size: 1.3em;
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 15px;
}

/* شريط البحث والفلترة */
.search-bar-container {
    display: flex;
    align-items: center;
    padding: 10px 0;
}
.main-search-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    outline: none;
    background-color: var(--background-light);
    transition: border-color 0.3s;
}

/* زر الفلترة */
.filter-button {
    background-color: var(--accent-color);
    border: none;
    border-radius: 8px;
    color: var(--primary-color-dark);
    font-size: 1.1em;
    padding: 12px 15px;
    margin-right: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    height: 46px; /* تطابق الارتفاع */
}

/* زر البحث */
.search-submit-button {
    background-color: var(--success-color);
    border: none;
    border-radius: 8px;
    color: var(--background-light);
    font-size: 1.1em;
    padding: 12px 15px;
    margin-right: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-submit-button:hover {
    background-color: var(--success-color-dark);
}

/* قسم الإعلانات (Swiper) */
.ad-section {
    margin-bottom: 30px;
}

.ad-section .swiper {
    padding: 0 !important; /* إزالة التباعد الداخلي */
}

.ad-section .swiper-slide {
    height: 270px; 
    overflow: hidden; 
    border-radius: 10px;
}

.swiper-slide img {
    width: 100%;
    height: 100%; 
    border-radius: 10px;
    
    /* لضمان أن الصورة تغطي المساحة بالكامل دون تشويه */
    object-fit: cover; 
}

/* نقاط التحكم الخاصة بالإعلانات */
.ad-pagination .swiper-pagination-bullet-active {
    background: var(--success-color) !important;
}

/* الملاعب المميزة (Swiper) */
.featured-fields-section {
    margin-bottom: 30px;
}
.featured-fields-wrapper {
    padding-bottom: 10px; /* لإظهار الظل/النهاية */
}
.field-card {
    width: 250px !important; /* عرض ثابت لبطاقة الملعب في التمرير الأفقي */
    border-radius: 10px;
    background-color: var(--background-light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-left: 15px;
    overflow: hidden;
}
.field-image {
    width: 100%;
    /* تحديث: زيادة الارتفاع ليتناسب مع نسبة 4:3 تقريباً (250x180) */
    height: 180px;
    object-fit: cover;
}
.field-info {
    padding: 10px;
}
.field-info h3 {
    margin: 0 0 5px;
    font-size: 1.1em;
    color: var(--primary-color-dark);
}
.field-location, .field-rating {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 5px;
}
.field-location i {
    margin-left: 5px;
    color: var(--success-color);
}
.field-rating i {
    color: var(--accent-color); /* لون النجمة */
    margin-left: 3px;
}
.field-price {
    display: block;
    font-size: 1em;
    font-weight: bold;
    color: var(--success-color);
    margin-top: 8px;
    margin-bottom: 10px; /* إضافة مسافة قبل الأزرار */
}

/* ================================================= */
/* تنسيق أزرار الإجراءات داخل بطاقة الملعب الجديدة */
/* ================================================= */

.field-actions {
    display: flex;
    justify-content: space-between; /* توزيع الأزرار بشكل متساوٍ */
    gap: 8px; /* مسافة بين الزرين */
    margin-top: 10px; 
}

.action-button {
    flex: 1; /* جعل كل زر يأخذ نصف المساحة المتبقية */
    padding: 8px 5px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

/* زر "احجز الآن" (الأساسي) */
.primary-action {
    background-color: var(--success-color); /* الأخضر الأساسي */
    color: var(--background-light);
}
.primary-action:hover {
    background-color: var(--success-color-dark);
}

/* زر "عرض التفاصيل" (الثانوي) */
.secondary-action {
    background-color: var(--accent-color); /* اللون الأصفر الثانوي */
    color: var(--primary-color-dark); /* اللون الداكن */
}
.secondary-action:hover {
    background-color: var(--accent-color-dark);
}

/* ================================================= */
/* تنسيقات قسم الفعاليات والأخبار (Events Section) - الجديد */
/* ================================================= */

.events-section {
    margin-bottom: 30px;
}
.events-wrapper {
    padding-bottom: 10px; /* لإظهار الظل */
}

/* بطاقة الفعالية (تعتمد على تنسيق بطاقة الملعب الأساسي) */
.event-card {
    /* نفس أبعاد بطاقة الملعب */
    width: 250px !important; 
    border-radius: 10px;
    background-color: var(--background-light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-left: 15px;
    overflow: hidden;
}

.event-image {
    width: 100%;
    /* ارتفاع أصغر من صورة الملعب لتركيز أكبر على النص */
    height: 150px; 
    object-fit: cover;
}

.event-info {
    padding: 10px;
}
.event-info h3 {
    margin: 0 0 5px;
    font-size: 1.1em;
    color: var(--primary-color-dark);
    font-weight: bold;
}

.event-date, .event-location {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 5px;
    display: block; /* لضمان أخذ سطر جديد */
}
.event-date i, .event-location i {
    margin-left: 5px;
    color: var(--accent-color); /* اللون الثانوي لتمييز أيقونات الأحداث */
}

/* تنسيق زر الإجراء الخاص بالفعاليات (نفس الأزرار العامة) */
.event-info .action-button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    margin-top: 10px;
    font-size: 1em;
    border-radius: 8px;
}

/* ================================================= */
/* قسم "كيف يعمل؟" */
/* ================================================= */

.how-it-works-section {
    margin-bottom: 40px;
}
.steps-container {
    display: flex;
    flex-wrap: wrap; /* لجعلها صفين إذا لزم الأمر */
    justify-content: space-around;
    text-align: center;
}
.step-item {
    width: 45%; /* ليكونوا اثنين في الصف */
    margin-bottom: 20px;
    padding: 10px 5px;
}
.step-icon {
    font-size: 2em;
    color: var(--success-color);
    background-color: var(--background-success-light);
    padding: 15px;
    border-radius: 50%;
    margin-bottom: 10px;
}
.step-item p {
    font-weight: bold;
    color: var(--primary-color-dark);
    margin: 5px 0 0;
}
.step-item span {
    font-size: 0.8em;
    color: var(--text-placeholder);
    display: block;
}

/* ================================================= */
/* تنسيق الـ Modal (نافذة الفلترة المنبثقة) */
/* ================================================= */

.modal {
    display: none; /* إخفاؤها مبدئياً */
    position: fixed;
    z-index: 300; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}
.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* للظهور في منتصف الشاشة */
    padding: 20px;
    border-radius: 12px;
    width: 90%; 
    max-width: 400px;
    position: relative;
}
.close-button {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.modal-title {
    color: var(--primary-color-dark);
    margin-bottom: 20px;
    text-align: center;
}
.filter-apply-button {
    margin-top: 25px;
}

/* ================================================= */
/* تنسيقات حقول الفلاتر الجديدة والمُحسَّنة */
/* ================================================= */

.filter-option-group {
    margin-bottom: 15px;
    text-align: right;
    /* لتحديد موضع السهم المخصص */
    position: relative; 
}

.filter-option-group h4 {
    color: var(--primary-color-dark);
    font-size: 1em;
    margin: 0 0 8px;
    font-weight: bold;
}

/* تنسيق حقل الإدخال العادي (Input) */
.filter-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    background-color: var(--background-light);
    box-shadow: none;
    transition: border-color 0.3s;
}

/* تنسيق القائمة المنسدلة (Select) مع إخفاء السهم الأصلي */
.filter-select {
    width: 100%;
    padding: 10px;
    /* مسافة إضافية لليسار لتظهر الأيقونة المخصصة */
    padding-left: 35px; 
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    background-color: var(--background-light);
    
    /* إخفاء السهم الافتراضي للمتصفحات */
    -webkit-appearance: none; 
    -moz-appearance: none;
    appearance: none; 
    
    box-shadow: none;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* إضافة سهم مخصص للقائمة المنسدلة باستخدام العنصر الزائف ::after */
.filter-option-group:has(.filter-select)::after {
    content: '\f078'; /* كود أيقونة السهم لأسفل */
    font-family: 'Font Awesome 6 Free'; 
    font-weight: 900; 
    
    position: absolute;
    /* يتم تحديد الموضع ليتوافق مع بداية حقل الـ select */
    top: 50%; 
    left: 15px; 
    /* حساب الموضع العمودي بدقة (50% من طول العنصر + نصف ارتفاع العنوان) */
    transform: translateY(calc(-50% + 19px)); 
    
    color: var(--primary-color-dark);
    font-size: 0.8em;
    pointer-events: none; /* يسمح بالنقر على عنصر الـ select أسفله */
}

/* ================================================= */
/* تنسيقات صفحة عرض الملاعب (fields.html) */
/* ================================================= */

/* تنسيق حاوية الخريطة الجديدة */
.fields-map-container {
    height: 250px; /* ارتفاع مناسب لعرض الخريطة على الموبايل */
    width: 100%;
    margin-top: 15px; /* مسافة بسيطة بعد شريط البحث */
    margin-bottom: 20px; /* مسافة بسيطة قبل قائمة الملاعب */
    border-radius: 12px;
    overflow: hidden; /* لإخفاء أي زوائد عند تدوير الزوايا */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* تنسيق بطاقة الملعب في شكل القائمة (List Card) */
.field-list-card {
    display: flex; /* لترتيب الصورة والتفاصيل جنباً إلى جنب */
    background-color: var(--background-light);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
    padding: 10px; /* مساحة داخلية حول المحتوى */
}

.field-list-image {
    /* الصورة تأخذ ثلث المساحة تقريباً */
    width: 35%; 
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    margin-left: 10px; /* مسافة بين الصورة والتفاصيل */
}

.field-list-details {
    /* التفاصيل تأخذ باقي المساحة */
    width: 65%; 
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* دفع الإجراءات للأسفل */
}

.field-list-title {
    font-size: 1.1em;
    color: var(--primary-color-dark);
    margin: 0 0 5px;
    font-weight: bold;
}

.field-list-meta p {
    margin: 3px 0;
    font-size: 0.85em;
    color: var(--text-secondary);
}
.field-list-meta i {
    margin-left: 5px;
    color: var(--success-color);
}

.field-list-rating {
    font-size: 0.9em;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 5px;
}
.field-list-rating span {
    color: var(--text-placeholder);
    font-size: 0.9em;
    font-weight: normal;
}
.field-list-type i {
    color: var(--primary-color-dark);
}

/* تنسيق منطقة الأزرار والسعر في البطاقة الكبيرة */
.field-list-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
}

.field-list-price {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--success-color);
    flex-grow: 1; /* للسعر ليأخذ المساحة الأكبر */
}

/* تعديل حجم الأزرار في هذه البطاقة لتبدو أصغر */
.field-list-actions .action-button {
    padding: 6px 8px; /* تصغير الـ padding */
    font-size: 0.8em;
    margin-right: 5px;
    flex-basis: 30%; /* تحديد عرض نسبي لكل زر */
    min-width: 65px;
}

/* تنسيق زر "تحميل المزيد" */
.load-more-container {
    text-align: center;
    padding: 20px 0 80px; /* ترك مسافة للقائمة السفلية */
}

#load-more-button {
    width: 90%;
    max-width: 350px;
    padding: 12px;
}
#load-more-button i {
    margin-right: 10px;
}

/* ========================= */
/* DASHBOARD PAGE STYLES */
/* ========================= */

.dashboard-page {
    /* يضمن تباعد مناسب للمحتوى لعدم الاصطدام بالهيدر والناف بار */
    padding-top: 60px; 
    padding-bottom: 70px;
    padding-left: 15px;
    padding-right: 15px;
}

.dashboard-page h2 {
    font-size: 1.3rem;
    color: var(--primary-color-dark); 
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* --- Stats Cards --- */
.dashboard-stats-section {
    margin-bottom: 30px;
}

.stats-cards-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 15px;
}

.stat-card {
    flex: 1;
    text-align: center;
    background-color: var(--background-light);
    padding: 15px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: #777;
    margin: 0;
}


/* --- Booking Cards --- */
/* تم تعديل هذا الكلاس ليتطابق مع h2 في HTML الآن */
.upcoming-bookings-section h2 { 
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.booking-card {
    background-color: var(--background-light);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
    margin-bottom: 15px;
    border-right: 5px solid var(--accent-color); /* شريط جانبي يميز البطاقة */
}

.booking-card.next-booking {
    border: 2px solid var(--primary-color-dark);
    border-right: 5px solid var(--primary-color-dark);
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.booking-title {
    font-size: 1.1rem;
    margin: 0;
    color: var(--primary-color-dark);
}

.booking-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--background-light);
}

.status-confirmed {
    background-color: var(--success-color);
}

.status-pending {
    background-color: var(--accent-color);
    color: var(--text-primary);
}

.booking-details p {
    font-size: 0.9rem;
    margin: 5px 0;
    color: #555;
}

.booking-details i {
    margin-left: 5px;
    color: var(--accent-color);
}

.booking-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px dashed #eee;
}

.booking-price {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-color-dark);
    margin-left: auto; /* يدفع السعر إلى اليسار في تخطيط RTL */
}

.link-as-button {
    display: block;
    margin-top: 20px;
}

.full-width {
    width: 100%;
}

/* ========================= */
/* TABS BAR STYLES */
/* ========================= */

.booking-tabs-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    /* تثبيت الشريط تحت الهيدر */
    position: sticky; 
    top: 60px; /* إذا كان ارتفاع الهيدر 60px */
    z-index: 10;
    background-color: #f8f8f8; /* خلفية فاتحة */
    border-bottom: 1px solid #ddd;
}

.booking-tab-button {
    flex-grow: 1;
    text-align: center;
    padding: 12px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #888; /* لون نصي رمادي للأزرار غير النشطة */
    transition: color 0.3s, border-bottom 0.3s;
    border-bottom: 3px solid transparent;
}

.booking-tab-button.active {
    color: var(--primary-color-dark); /* لون أزرق افتراضي للزر النشط */
    border-bottom: 3px solid var(--primary-color-dark);
}

.tab-count {
    font-size: 0.8rem;
    font-weight: 400;
    margin-right: 5px;
}

/* ========================= */
/* TAB CONTENT STYLES */
/* ========================= */

.tab-content {
    display: none; /* افتراضيًا، جميع محتويات الألسنة مخفية */
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block; /* المحتوى النشط فقط يظهر */
}

.tab-intro-text {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border-right: 5px solid var(--accent-color);
}

.status-completed {
    background-color: var(--primary-color-dark); /* أزرق */
    color: var(--background-light);
}

/* تعديل الـ padding لـ page-content للتأكد من أن المحتوى يظهر أسفل شريط الألسنة */
.dashboard-page {
    padding-top: 10px; /* بدلاً من تركها 60px */
    padding-bottom: 70px;
    padding-left: 15px;
    padding-right: 15px;
}
/* إزالة أي تنسيق H2 عام قديم */
.upcoming-bookings-section h2, .dashboard-page h2 {
    display: none; /* إخفاء أي H2 كانت موجودة لتنظيم الأقسام */
}

/* ========================= */
/* CONTACT PAGE STYLES (منقّح ومراجع) */
/* ========================= */

.contact-page {
    padding-top: 60px; 
    padding-bottom: 70px;
    padding-left: 15px;
    padding-right: 15px;
}

.contact-page h2.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    /* هذا اللون الداكن سيظل مطبقًا على قسم السوشيال ميديا */
    color: var(--text-primary); 
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.contact-page h2.section-title i {
    margin-left: 8px;
    /* هذا اللون الأساسي سيظل مطبقًا على قسم السوشيال ميديا */
    color: var(--primary-color-dark); 
}

.intro-text {
    font-size: 0.95rem;
    /* هذا اللون الرمادي سيظل مطبقًا على قسم السوشيال ميديا */
    color: #555; 
    margin-bottom: 25px;
    line-height: 1.6;
}

/* --- Form Styles (Applies to .app-form) --- */

.contact-form-section {
    margin-top: 30px;
}

.app-form .form-group {
    margin-bottom: 15px;
}

.app-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95rem;
    /* هذا اللون الداكن سيتم تجاوزه بـ #FFF أدناه */
    color: var(--text-primary); 
}

/* توحيد أنماط المدخلات والنصوص هنا */
.app-form input[type="text"],
.app-form input[type="email"], 
.app-form input[type="tel"],
.app-form select,
.app-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box; 
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

/* --- Social Media Links (Big Focus) --- */

.social-media-section {
    margin-top: 20px;
    padding: 20px;
    background-color: #f9f9f9; /* خلفية تميز هذا القسم */
    border-radius: 12px;
}

.social-links-big {
    display: flex;
    flex-direction: column; /* جعل الروابط عمودية */
    gap: 15px;
    margin-top: 20px;
}

.social-icon-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    color: var(--background-light);
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.social-icon-link:hover {
    transform: translateX(-5px);
}

.social-icon-link i {
    font-size: 1.8rem;
    margin-left: 15px;
}

.facebook {
    background-color: #3b5998;
}

.whatsapp {
    background-color: #25D366;
}

.instagram {
    background-color: #E1306C; 
}

/* ========================= */
/* CONTACT FORM LIGHT TEXT OVERRIDES (تعديل الألوان حسب طلب المستخدم) */
/* ========================= */

/* جعل عنوان قسم الرسالة باللون الأبيض */
.contact-form-section h2.section-title {
    color: var(--background-light); 
}

/* جعل أيقونة العنوان في قسم الرسالة بلون فاتح */
.contact-form-section h2.section-title i {
    color: var(--info-color); /* لون أزرق فاتح */
}

/* جعل النص التمهيدي للنموذج باللون الأبيض */
.contact-form-section .intro-text {
    color: var(--background-light);
}

/* جعل نصوص الليبلز (الاسم، الموضوع، الرسالة) باللون الأبيض */
.contact-form-section .app-form label {
    color: var(--background-light);
}

/* ========================= */
/* PROFILE PAGE STYLES (profile.html) */
/* ========================= */

.profile-page {
    background-color: var(--background-light); /* الخلفية باللون الأبيض */
    padding-top: 60px;
    padding-bottom: 70px;
    padding-left: 15px;
    padding-right: 15px;
    min-height: calc(100vh - 60px);
}

/* --- Header & Avatar --- */
.profile-header-section {
    text-align: center;
    padding: 20px 0 30px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.avatar-container {
    position: relative;
    width: 100px; /* حجم الصورة الرمزية */
    height: 100px;
    margin: 0 auto 10px auto;
}

.profile-avatar-large {
    width: 100%;
    height: 100%;
    /* تم التعديل: القيمة 50% تضمن شكل دائري مثالي */
    border-radius: 50%; 
    object-fit: cover;
    border: 4px solid var(--primary-color-dark);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.change-avatar-button {
    position: absolute;
    bottom: 0;
    left: 0; 
    background-color: var(--accent-color);
    color: var(--background-light);
    border: 2px solid var(--background-light);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background-color 0.2s;
}

.change-avatar-button:hover {
    background-color: var(--accent-color-dark);
}

.user-display-name {
    font-size: 1.5rem;
    color: var(--primary-color-dark);
    margin: 5px 0 2px 0;
}

.user-membership-status {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
}

/* --- Form & Sections --- */
.section-title-icon {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color-dark);
    margin-bottom: 20px;
}

.section-title-icon i {
    margin-left: 8px;
    color: var(--primary-color-dark);
}

/* من ملف assets/css/style.css */

.disabled-group input {
    /* هذه التنسيقات تجعل الحقل يبدو معطّلاً */
    background-color: #f0f0f0; 
    color: #888;
    cursor: not-allowed;
    /* نضمن أن هذه الخصائص لا تتعارض مع تنسيق الإدخال العام */
}

/* تنسيق الإدخال العام الذي ينطبق على كل الحقول */
.app-form input[type="text"],
.app-form input[type="email"], /* تأكد أن email مُضافة هنا */
.app-form input[type="tel"], /* تأكد أن tel مُضافة هنا */
.app-form select,
.app-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box; 
    font-size: 1rem;
    font-family: inherit;
}

.hint-text {
    display: block;
    font-size: 0.8rem;
    color: var(--error-color); /* لون تنبيه */
    margin-top: 5px;
}

.hint-text i {
    margin-left: 5px;
}

.form-action-group {
    margin-top: 30px;
}

.action-save-button {
    font-size: 1.1rem;
    font-weight: bold;
    /* *يجب أن يكون اللون الأساسي موجودًا في style.css العام* */
}

/* --- Security Section --- */
.section-divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, #ccc, var(--background-light));
    margin: 30px 0;
}

.profile-security-section {
    margin-top: 20px;
}

.security-action-cards {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.action-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px 10px;
    border-radius: 12px;
    color: var(--background-light); 
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.action-card i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.delete-action-bg {
    background-color: var(--error-color); /* لون أحمر للخطر */
}
/* يجب تعريف primary-action-bg في ملف style.css الأساسي */
.primary-action-bg {
    background-color: var(--primary-color-dark); 
}

/* ========================= */
/* SETTINGS PAGE STYLES (settings.html) */
/* ========================= */

.settings-page {
    padding-top: 60px;
    padding-bottom: 70px;
    padding-left: 15px;
    padding-right: 15px;
    /* الخلفية بيضاء تماماً */
    background-color: var(--background-light); 
    min-height: calc(100vh - 60px); 
}

.settings-section {
    background-color: var(--background-light);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.settings-section .section-title-icon {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* --- Common Item Styles (Applied to all list items) --- */
.setting-item, .setting-action-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.setting-item:last-child, .setting-action-link:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-details {
    display: flex;
    /* تعديل: السماح للعناصر بالتراص إذا كانت الشاشة ضيقة */
    flex-direction: column; 
    align-items: flex-start;
}

/* تعديل: دمج الأيقونة والاسم في سطر واحد لسهولة القراءة */
.setting-icon {
    font-size: 1.1rem;
    margin-left: 10px;
    color: var(--primary-color-dark);
}

.setting-label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-color-dark);
    /* لضمان توافق الأيقونة والاسم في البداية */
    display: flex; 
    align-items: center;
}

.setting-label i.setting-icon {
    margin-top: 0;
    margin-bottom: 0;
}


.setting-description {
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
}

.arrow-icon {
    color: #bbb;
    font-size: 0.9rem;
}

/* --- Value Styles (Used for App Version) --- */
.setting-value {
    font-weight: bold;
    color: #555;
    font-size: 0.95rem;
}

/* --- Toggle Switch Styles (تم تعديل الحركة لتتوافق مع RTL) --- */
/* The switch - the box around the slider */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 25px;
    margin-right: 10px; /* مسافة لليمين */
}

/* Hide default HTML checkbox */
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: var(--background-light);
    transition: 0.4s;
}

input:checked + .slider {
    background-color: var(--success-color); /* لون أخضر عند التفعيل */
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--success-color);
}

input:checked + .slider:before {
    /* ** التعديل الأساسي: تم تغيير -20px إلى 20px للحركة الصحيحة في RTL ** */
    transform: translateX(20px); 
}

/* Rounded sliders */
.slider.round {
    border-radius: 25px;
}

.slider.round:before {
    border-radius: 50%;
}