/* =========================================================
   style.css
   ملف التنسيق الموحد لموقع "مكتب الأمانة لتأجير السيارات"
   يُستخدم في جميع الصفحات: Home / AboutUs / Cars / Booking
   ========================================================= */

/* ---------------------------------------------------------
   1) إعادة الضبط والإعدادات العامة للصفحة
   --------------------------------------------------------- */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Tahoma", "Segoe UI", "Arial", sans-serif;
    font-size: 15px;
    line-height: 1.9;
    color: #22333b;
    background-color: #f4f6f5;
    direction: rtl;
    text-align: right;
}

/* ---------------------------------------------------------
   2) تنسيق العناوين والنصوص من مكان واحد
   --------------------------------------------------------- */
h1,
h2,
h3,
h4 {
    color: #0f3d3e;
    font-weight: bold;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

h1 {
    font-size: 26px;
}

h2 {
    font-size: 21px;
}

h3 {
    font-size: 17px;
}

p {
    margin: 0 0 12px 0;
}

a {
    color: #14615f;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    margin: 0 0 12px 0;
    padding: 0 22px 0 0;
}

.muted {
    color: #6b7d7c;
    font-size: 14px;
}

.highlight {
    color: #b5771a;
    font-weight: bold;
}

.req {
    color: #c0392b;
    font-weight: bold;
}

.mono {
    font-family: "Courier New", monospace;
    font-size: 14px;
    color: #12514f;
    unicode-bidi: embed;
}

.page-title {
    display: inline-block;
    border-right: 6px solid #e0a12a;
    padding: 2px 12px 2px 0;
    background-color: #ffffff;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* ---------------------------------------------------------
   3) رأس الصفحة (Header)
   --------------------------------------------------------- */
.site-header {
    background-color: #0f3d3e;
    border-bottom: 5px solid #e0a12a;
    padding: 16px 0;
}

.site-header .brand {
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
}

.site-header .brand-icon {
    font-size: 34px;
    line-height: 1;
    margin-left: 14px;
}

.site-header h1 {
    color: #ffffff;
    font-size: 22px;
    margin: 0;
}

.site-header .tagline {
    color: #cfe3e0;
    font-size: 13px;
    margin: 2px 0 0 0;
}

/* ---------------------------------------------------------
   4) شريط التنقل الأفقي
   --------------------------------------------------------- */
.main-nav {
    background-color: #12514f;
    border-bottom: 1px solid #0b2f30;
}

.main-nav ul {
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 16px;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.main-nav li {
    margin: 0;
}

.main-nav a {
    display: block;
    padding: 13px 20px;
    color: #e7f2f0;
    font-size: 15px;
    font-weight: bold;
    border-bottom: 3px solid transparent;
}

.main-nav a:hover {
    background-color: #0f3d3e;
    color: #ffffff;
    border-bottom-color: #e0a12a;
    text-decoration: none;
}

.main-nav a.active {
    background-color: #0f3d3e;
    color: #e0a12a;
    border-bottom-color: #e0a12a;
}

/* زر الخروج في أقصى يسار شريط التنقل */
.main-nav .nav-end {
    margin-right: auto;
}

.main-nav a.logout {
    color: #ffcf9e;
}

.main-nav a.logout:hover {
    background-color: #a33a2a;
    color: #ffffff;
    border-bottom-color: #ffcf9e;
}

/* ---------------------------------------------------------
   5) حاوية المحتوى والبطاقات
   --------------------------------------------------------- */
.container {
    max-width: 1050px;
    margin: 26px auto;
    padding: 0 16px;
}

.card {
    background-color: #ffffff;
    border: 1px solid #dde7e5;
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 22px;
    box-shadow: 0 2px 6px rgba(15, 61, 62, 0.07);
}

.two-columns {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -11px;
}

.two-columns .card {
    flex: 1 1 300px;
    margin: 0 11px 22px 11px;
}

/* ---------------------------------------------------------
   6) قسم الترحيب والأرقام السريعة
   --------------------------------------------------------- */
.hero {
    background-image: linear-gradient(135deg, #0f3d3e 0%, #1c6f6b 100%);
    color: #eaf5f3;
    border-radius: 10px;
    padding: 28px 26px;
    margin-bottom: 22px;
    box-shadow: 0 3px 10px rgba(15, 61, 62, 0.18);
}

.hero h2 {
    color: #ffffff;
    margin-bottom: 10px;
}

.hero p {
    font-size: 15px;
}

.hero-actions {
    margin: 18px 0 0 0;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -8px 22px -8px;
}

.stat-box {
    flex: 1 1 160px;
    background-color: #ffffff;
    border: 1px solid #dde7e5;
    border-top: 4px solid #e0a12a;
    border-radius: 8px;
    margin: 0 8px 14px 8px;
    padding: 14px 10px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #0f3d3e;
    line-height: 1.4;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #6b7d7c;
}

/* ---------------------------------------------------------
   7) الأزرار
   --------------------------------------------------------- */
.btn {
    display: inline-block;
    background-color: #e0a12a;
    color: #1f2a2b;
    border: 0;
    border-radius: 6px;
    padding: 11px 24px;
    font-family: inherit;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.4;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.btn:hover {
    background-color: #c98c1c;
    text-decoration: none;
}

.btn-light {
    background-color: #f5f8f7;
    color: #0f3d3e;
    margin-right: 8px;
}

.btn-light:hover {
    background-color: #ffffff;
}

.btn-outline {
    background-color: transparent;
    color: #0f3d3e;
    border: 2px solid #0f3d3e;
    box-shadow: none;
}

.btn-outline:hover {
    background-color: #0f3d3e;
    color: #ffffff;
}

.btn-danger {
    background-color: #a33a2a;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #862c1e;
}

/* ---------------------------------------------------------
   8) عناصر الإدخال النصية (تنسيق موحد من مكان واحد)
   --------------------------------------------------------- */
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    color: #22333b;
    background-color: #fbfdfc;
    border: 1px solid #b9cbc9;
    border-radius: 6px;
    padding: 9px 12px;
    margin-top: 4px;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color: #e0a12a;
    background-color: #ffffff;
    outline: 2px solid rgba(224, 161, 42, 0.25);
}

/* الحقول التي تحتوي خطأ */
input.invalid,
select.invalid {
    border-color: #c0392b;
    background-color: #fdf1ef;
}

/* ---------------------------------------------------------
   9) النماذج: fieldset / legend / label / الأخطاء
   --------------------------------------------------------- */
fieldset {
    border: 1px solid #dde7e5;
    border-radius: 8px;
    background-color: #fcfdfd;
    padding: 16px 18px 20px 18px;
    margin: 0 0 20px 0;
}

legend {
    color: #0f3d3e;
    font-size: 16px;
    font-weight: bold;
    padding: 0 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}

.form-grid .field.full {
    grid-column: 1 / -1;
}

.field label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #123f40;
}

.error {
    display: none;
    color: #c0392b;
    font-size: 13px;
    margin-top: 4px;
}

.form-buttons {
    margin-top: 6px;
    text-align: center;
}

.form-buttons .btn {
    margin: 0 6px;
    min-width: 130px;
}

.form-actions {
    margin: 16px 0 0 0;
    text-align: center;
}

/* اختيار السيارات في صفحة الحجز */
.car-choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.car-choice {
    display: flex;
    align-items: center;
    background-color: #fbfdfc;
    border: 1px solid #dde7e5;
    border-radius: 6px;
    padding: 9px 12px;
    cursor: pointer;
    font-size: 14px;
}

.car-choice:hover {
    border-color: #e0a12a;
    background-color: #fffaf0;
}

.car-choice input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-left: 10px;
    cursor: pointer;
}

/* ---------------------------------------------------------
   10) الجداول (حدود، رأس ملون، صفوف متبادلة)
   --------------------------------------------------------- */
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    margin: 8px 0 4px 0;
    font-size: 14px;
}

table.data-table th,
table.data-table td {
    border: 1px solid #cfdedd;
    padding: 9px 10px;
    text-align: center;
    vertical-align: middle;
}

table.data-table thead th {
    background-color: #0f3d3e;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

table.data-table tbody tr:nth-child(even) {
    background-color: #eef4f3;
}

table.data-table tbody tr:hover {
    background-color: #e2ede9;
}

/* جدول معلومات الاتصال: العمود الأول عنوان */
table.contact-table th {
    width: 190px;
    background-color: #eef4f3;
    color: #0f3d3e;
    text-align: right;
}

table.contact-table td {
    text-align: right;
}

/* صور السيارات الصغيرة */
.car-thumb {
    display: block;
    width: 100px;
    height: 70px;
    border: 1px solid #cfdedd;
    border-radius: 4px;
    background-color: #ffffff;
    margin: 0 auto;
}

/* خانة الاختيار داخل جدول السيارات */
.choose-cell {
    white-space: nowrap;
}

.choose-cell input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    vertical-align: middle;
}

.choose-label {
    font-size: 13px;
    font-weight: bold;
    color: #12514f;
    margin-right: 5px;
    cursor: pointer;
}

.selection-note {
    margin: 14px 0 0 0;
    font-size: 14px;
    color: #12514f;
}

.counter {
    display: inline-block;
    background-color: #0f3d3e;
    color: #ffffff;
    font-weight: bold;
    border-radius: 4px;
    padding: 1px 10px;
}

/* ---------------------------------------------------------
   11) صناديق النتيجة (نتيجة الحجز ونتيجة المساعد الذكي)
   --------------------------------------------------------- */
.result-box {
    display: none;
    background-color: #eff9f2;
    border: 1px solid #a8d8b9;
    border-right: 6px solid #2e9e5b;
    border-radius: 8px;
    padding: 18px 20px;
    margin-top: 20px;
}

.result-box h3 {
    color: #1d6b3d;
    margin-bottom: 10px;
}

.result-box .line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed #b9ddc6;
    font-size: 14px;
}

.result-box .line strong {
    color: #0f3d3e;
}

.result-box .line.final {
    border-bottom: 0;
    font-size: 17px;
    font-weight: bold;
    color: #0f3d3e;
    padding-top: 10px;
}

.result-box .line.discount strong,
.result-box .line.discount span {
    color: #b5771a;
}

.result-box .note {
    margin-top: 12px;
    font-size: 13px;
    color: #4a5f5c;
}

/* تنسيق خاص بصندوق المساعد الذكي */
.ai-box {
    background-color: #fffaf0;
    border-color: #f0d9a8;
    border-right-color: #e0a12a;
}

.ai-box h3 {
    color: #9a6a12;
}

.ai-box .line {
    border-bottom-color: #f0e0bd;
}

.ai-box .suggested {
    font-size: 19px;
    font-weight: bold;
    color: #0f3d3e;
    margin: 4px 0 8px 0;
}

/* ---------------------------------------------------------
   12) عناصر إضافية (قائمة الميزات، رابط النشر، زر الخروج)
   --------------------------------------------------------- */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 6px 0 0 0;
}

.feature-list li {
    position: relative;
    padding: 5px 26px 5px 0;
    font-size: 14px;
    border-bottom: 1px dotted #dde7e5;
}

.feature-list li:last-child {
    border-bottom: 0;
}

.feature-list li:before {
    content: "\2714";
    position: absolute;
    right: 0;
    color: #2e9e5b;
    font-weight: bold;
}

.publish-card {
    border-right: 6px solid #e0a12a;
}

.publish-link a {
    display: inline-block;
    background-color: #eef4f3;
    border: 1px dashed #b9cbc9;
    border-radius: 6px;
    padding: 8px 16px;
    font-family: "Courier New", monospace;
    font-size: 15px;
    color: #0f3d3e;
    unicode-bidi: embed;
}

.publish-link a:hover {
    background-color: #e2ede9;
    text-decoration: none;
}

.logout-bar {
    text-align: center;
    border-right: 6px solid #a33a2a;
}

/* ---------------------------------------------------------
   13) تذييل الصفحة
   --------------------------------------------------------- */
.site-footer {
    background-color: #0f3d3e;
    color: #cfe3e0;
    text-align: center;
    padding: 16px 12px;
    margin-top: 30px;
    font-size: 13px;
    border-top: 5px solid #e0a12a;
}

.site-footer p {
    margin: 4px 0;
}

/* ---------------------------------------------------------
   14) تصميم متجاوب (Media Query)
   --------------------------------------------------------- */
@media screen and (max-width: 700px) {

    body {
        font-size: 14px;
    }

    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 18px;
    }

    .site-header .brand-icon {
        font-size: 26px;
        margin-left: 10px;
    }

    .site-header h1 {
        font-size: 17px;
    }

    /* الأزرار تصبح بعرض كامل على الشاشات الصغيرة */
    .hero-actions .btn {
        display: block;
        width: 100%;
        margin: 0 0 10px 0;
        text-align: center;
    }

    /* شريط التنقل يصبح عمودياً على الشاشات الصغيرة */
    .main-nav ul {
        flex-direction: column;
        padding: 0;
    }

    .main-nav a {
        padding: 10px 16px;
        border-bottom: 1px solid #0d4343;
        border-right: 4px solid transparent;
    }

    .main-nav a:hover,
    .main-nav a.active {
        border-right-color: #e0a12a;
        border-bottom-color: #0d4343;
    }

    .main-nav .nav-end {
        margin-right: 0;
    }

    .container {
        margin: 16px auto;
        padding: 0 12px;
    }

    .card {
        padding: 14px 14px;
    }

    .form-grid,
    .car-choices {
        grid-template-columns: 1fr;
    }

    .stats {
        margin: 0 0 18px 0;
    }

    .stat-box {
        flex: 1 1 45%;
        margin: 0 0 10px 0;
    }

    .two-columns {
        margin: 0;
    }

    .two-columns .card {
        margin: 0 0 18px 0;
    }

    table.data-table {
        font-size: 12px;
    }

    table.data-table th,
    table.data-table td {
        padding: 6px 5px;
    }

    /* جدول السيارات: إخفاء عمود الفئة وتصغير الصور ليتناسب مع عرض الجوال */
    table.cars-table {
        font-size: 11px;
    }

    table.cars-table th,
    table.cars-table td {
        padding: 4px 3px;
    }

    table.cars-table th:nth-child(5),
    table.cars-table td:nth-child(5) {
        display: none;
    }

    table.cars-table .car-thumb {
        width: 62px;
        height: 44px;
    }

    table.cars-table .choose-label {
        font-size: 10px;
    }

    .car-thumb {
        width: 76px;
        height: 54px;
    }

    .form-buttons .btn {
        display: block;
        width: 100%;
        margin: 0 0 10px 0;
    }

    .btn-light {
        margin-right: 0;
    }

    .result-box .line {
        font-size: 13px;
    }
}
