/* ملف CSS موحد لجميع الصفحات */
:root {
    --primary-color: #C96468;
    --secondary-color: #792A2D;
    --accent-color: #C96468;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --gradient: linear-gradient(135deg, #C96468 0%, #792A2D 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(135deg, #F8ECED 0%, #ECCACB 100%);
    min-height: 100vh;
    color: var(--dark-color);
    line-height: 1.4;
    direction: rtl;
    background: url('bg.jpg') no-repeat center center fixed;
    background-size: cover;
    position: relative;

}

/* طبقة تظليل لتحسين قراءة النص */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: -1;
}

/* تصميم الهيدر المشترك */
.header {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    text-align: center;
    gap: 20px;
    padding: 15px 0;
    position: relative;
    z-index: 1;

}

/* تنسيق عام للشعارات */
.logo {
    width: auto;  /* الحفاظ على نسبة الأبعاد */
    height: 100px; /* ارتفاع ثابت */
    object-fit: contain; /* للحفاظ على الوضوح */
    transition: all 0.3s ease; /* تأثير حركي سلس */
}

/* الشعار الأيسر */
.left-logo {
    max-height: 150px;
    width: auto;
}

/* الشعار الأيمن */
.right-logo {
    max-width: 150px; /* يمكنك تغيير القيمة حسب الحاجة */
    margin-right: 15px;
}

.header-content {
    flex: 1;
}

.header img {
    max-width: 80px;
    height: auto;
    margin: 0;
    transition: transform 0.3s ease;
}

.header img:hover {
    transform: scale(1.05);
}

/* تصميم العناوين */
h1, h2, h3, h4 {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    flex: 1;
}

h1 {
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 0.95rem;
}

h4 {
    color: var(--primary-color);
    text-align: center;
    margin-top: 20px;
    font-weight: 600;
}

/* تصميم الحاويات */
.container {
    max-width: 800px;
    margin: 10px auto;
    padding: 20px;
    background-color: rgba(225, 233, 249, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out forwards;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 10px;
    background: var(--gradient);
}

.container10 {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 0 15px;
    background-color: white;
    text-align: center;
    font-weight: bold;
}
.compact-text {
    margin-bottom: 5px !important;
    line-height: 1 !important;
    color:red; 
}

/* تصميم النماذج */
.form-group {
    margin-bottom: 15px;
    position: relative;
}

.form-row {
    display: flex !important;
    gap: 20px;
    margin-bottom: 15px;
    flex-direction: row; /* الترتيب الأفقي */
}

.form-group-half {
    flex: 1;
    min-width: 0; /* يمنع مشاكل التمدد */
}

.form-group-half label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group-half input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    color: var(--dark-color);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.3);
    background-color: white;
}

/* تصميم الأزرار */
.btn,
input[type="submit"],
button {
    display: inline-block;
    padding: 16px;
    background: var(--gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    width: 100%;
    margin-top: 10px;
}

.btn:hover,
input[type="submit"]:hover,
button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.btn:active,
input[type="submit"]:active,
button:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: #f8f9fa;
}

/* تصميم الجداول */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
    box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,0.05);
}

th, td {
    padding: 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

th {
    background: #f8f9fa;
    font-weight: 700;
    color: var(--secondary-color);
}

tr:nth-child(even) {
    background: #f8f9fa;
}

/* تصميم الأقسام والنتائج */
.departments {
    margin: 20px 0;
}

.department {
    background: white;
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent-color);
    font-size: 0.95rem;
}

.department:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.3rem 0.8rem rgba(0,0,0,0.1);
}

.no-results {
    padding: 15px;
    background: #fff5f5;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    border: 1px solid #ffdddd;
    color: var(--error-color);
    font-weight: 600;
    font-size: 0.95rem;
}

/* تصميم رسائل الخطأ */
.error-message {
    color: var(--error-color);
    font-size: 16px;
    margin: 15px 0;
    text-align: center;
    padding: 10px;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    display: none;
}

/* تصميم الفوتر */
footer {
    margin-top: 30px;
    text-align: center;
    padding: 20px;
}

footer p {
    margin: 5px 0;
    font-size: 14px;
    color: #792A2D;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* تصميم روابط التواصل */
.contact-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background: var(--gradient);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.contact-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
    text-decoration: none;
}

/* تصميم نموذج التسجيل */
.registration-form {
    margin-top: 30px;
    padding: 20px;
    background: #ECCACB;
    border-radius: 12px;
    box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,0.05);
}


.department-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.department-select:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.3);
    background-color: white;
}

/* تنسيق خيارات القائمة المنسدلة */
.department-select option {
    padding: 10px;
    background-color: white;
    color: var(--dark-color);
}

/* الرسوم المتحركة */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 15px;
}

.departments {
    margin-top: 20px;
}

.department {
    margin-bottom: 15px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.tuition-info {
    color: #642325;
    font-weight: bold;
    margin-right: 10px;
}

.department-info {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.6;
}

.department-name {
    font-weight: normal;
    color: #333;
    font-size: 1.5em;
}

.grade-info {
    color: #666;
    font-size: 1.5em;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #666;
    background-color: #f5f5f5;
    border-radius: 4px;
    margin-top: 20px;
}
/* التصميم المتجاوب */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
        border-radius: 15px;
    }

    .header {
        flex-direction: column-reverse;
        text-align: center;
        gap: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 0.9rem;
    }

    .department-name {
    font-weight: normal;
    color: #0a0a0a;
    font-size: 1em;
    }
    
    .department-info {
    margin: 0;
    font-size: 1em;
    line-height: 1;
    }

    .departments {
    margin-top: 5px;
    }

    .department {
    margin-bottom: 15px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    }

    .grade-info {
    color: #666;
    font-size: 1em;
    }

    footer p {
        margin: 4px 0;
        font-size: 10px;
        color: #792A2D;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    select {
        padding: 10px 12px;
        font-size: 14px;
    }

    .btn,
    input[type="submit"],
    button {
        padding: 14px;
        font-size: 16px;
    }

    th, td {
        padding: 8px;
        font-size: 14px;
    }
}

    .department-select {
        padding: 10px 12px;
        font-size: 14px;
    }

        .form-row {
    flex-direction: column !important;
    gap: 10px !important;
    box-sizing: border-box;
    max-width: 100%;
    }
    
    .form-group-half {
        width: 100%; /* جعل الحقول تأخذ العرض الكامل */
    }

@media (max-width: 480px) {
    .container {
        padding: 12px;
        margin: 8px;
        border-radius: 12px;
    }

    .header img {
        max-width: 70px;
    }

    h1 {
        font-size: 1.3rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 0.75rem;
    }

    .btn,
    input[type="submit"],
    button {
        padding: 12px;
        font-size: 15px;
    }

    .contact-link {
        padding: 10px 20px;
        font-size: 14px;
    }

    footer p {
        margin: 3px 0;
        font-size: 9px;
        color: #792A2D;
    }

    .department-select {
        padding: 8px 10px;
        font-size: 12px;
    }

}

    .department-name {
    font-weight: normal;
    color: #0a0a0a;
    font-size: 0.8em;
    }
    
    .department-info {
    margin: 0;
    font-size: 0.8em;
    line-height: 1;
    }

    .departments {
    margin-top: 5px;
    }

    .department {
    margin-bottom: 15px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    }

    .grade-info {
    color: #666;
    font-size: 0.8em;
    }


    .form-row {
        gap: 8px; /* مسافة أصغر بين الحقول */
    }
    
    input[type="email"],
    input[type="tel"] {
    font-size: 14px; /* حجم خط مناسب للجوال */
    }

/* تنسيقات صفحة صورة الجدول المحمية */
.image-container {
    margin: 30px 0;
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.department-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

.notes {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-right: 4px solid var(--accent-color);
    text-align: center;
}

.notes h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .department-image {
        width: 100%;
    }
}

/* تنسيقات صفحة الصورة المحمية */
.image-viewer {
    margin: 30px auto;
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow: hidden;
}

.department-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

.protected-container {
    position: relative;
    display: inline-block;
}

.notes {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-right: 4px solid var(--accent-color);
    text-align: center;
}

.notes h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .image-viewer {
        padding: 10px;
    }
    
    .department-image {
        width: 100%;
    }
}