/* assets/style.css */

/* 1. إعدادات الخطوط والألوان العامة */
:root {
    --primary-color: #198754; /* أخضر سعودي رسمي */
    --secondary-color: #212529; /* أسود للنصوص */
    --bg-color: #f8f9fa; /* خلفية رمادية فاتحة جداً */
    --white: #ffffff;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--secondary-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; }

/* 2. تنسيق الحاويات (Containers) */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 3. تنسيق الصفحة الرئيسية (البطاقات) */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: white;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
}

.hero-title { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 10px; }
.hero-desc { font-size: 1.2rem; color: #666; max-width: 600px; margin: 0 auto 30px; }

/* مربع البحث في الرئيسية */
.search-box {
    width: 100%;
    max-width: 500px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
    text-align: center;
}
.search-box:focus { border-color: var(--primary-color); box-shadow: 0 0 10px rgba(25, 135, 84, 0.2); }

/* شبكة النماذج (Grid) */
.forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.form-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.form-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.card-icon { font-size: 40px; margin-bottom: 15px; color: var(--primary-color); }
.card-title { font-size: 1.2rem; font-weight: bold; margin-bottom: 10px; }
.card-desc { font-size: 0.9rem; color: #777; margin-bottom: 20px; }
.btn-link {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}
.btn-link:hover { background: #146c43; }

/* 4. تنسيق صفحات النماذج (Forms Styles) */
.controls-panel {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.preview-wrapper {
    background: #525659; /* لون خلفية برامج الـ PDF */
    padding: 30px;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: center;
    overflow-x: auto;
}

/* 5. استجابة للجوال (Responsive) */
@media (max-width: 768px) {
    .hero-title { font-size: 1.8rem; }
    .main-container { flex-direction: column; }
    .controls, .preview-area { width: 100%; min-width: auto; }
}

/* إخفاء العناصر عند الطباعة */
@media print {
    .no-print { display: none !important; }
}