/* --- Global Styles & Reset --- */
:root {
    --color-blue: #1976D2;      /* Knowledge Blue */
    --color-green: #4CAF50;     /* Future Green */
    --color-orange: #FF5722;    /* Insight Orange */
    --color-white: #FFFFFF;
    --color-grey: #616161;
    --color-light-grey: #F5F5F5;
    --color-text-dark: #333333;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--color-white);
    color: var(--color-text-dark);
    direction: rtl; 
    text-align: right;
    min-height: 100vh;
}

.register-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* --- 1. Visual Section (القسم البصري - يمين الشاشة في RTL) --- */
.visual-section {
    flex: 1;
    background: linear-gradient(135deg, var(--color-blue), var(--color-green));
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    position: relative;
    text-align: center;
    top: -80px;
}

.logo-header {
    position: absolute;
    top: 70px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-header img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
}

.logo-text {
    font-size: 20px;
    font-weight: 900;
    color: var(--color-white);
}

.animation-video {

    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
}

.slogan-text {
    font-size: 18px;
    font-weight: 400;
    margin-top: 20px;
}

/* --- 2. Form Section (قسم النموذج - يسار الشاشة في RTL) --- */
.form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 7%;
    max-width: 50%;
    margin: 0 auto;
}

.form-section h2 {
    font-size: 36px;
    color: var(--color-blue);
    margin-bottom: 5px;
}

.sub-heading {
    font-size: 16px;
    color: var(--color-grey);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text-dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
    outline: none;
}

/* Conditional Field Style */
.conditional-group {
    transition: all 0.5s ease-in-out;
}

/* Register Button */
.btn-register {
    width: 100%;
    background-color: var(--color-orange);
    color: var(--color-white);
    padding: 15px;
    font-size: 18px;
    margin-top: 20px;
}

.btn-register:hover {
    background-color: #e64a19; 
}

.login-link {
    margin-top: 25px;
    font-size: 14px;
    color: var(--color-grey);
    text-align: center;
}

.login-link a {
    color: var(--color-blue);
    font-weight: 700;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .register-container {
        flex-direction: column;
    }

    .visual-section {
        flex: none;
        height: 250px;
        padding: 20px;
        order: 1; /* يظهر أولاً في وضع العمود */
    }
    
    .logo-header {
        top: 60px;
        right: 20px;
    }

    .animation-video {
        display: none; /* إخفاء الفيديو في الأجهزة الصغيرة لتوفير المساحة */
    }
    .slogan-text{
        display: none;
    }
    .form-section {
        flex: none;
        max-width: 100%;
        padding: 40px 5%;
        order: 2;
    }
    .slogan-text {
    font-size: 18px;
    font-weight: 400;
    margin-top: 70px;
}

}


/* --- تنسيق عام للحقول (إذا لم يكن موجودًا) --- */
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group input[type="password"], /* إضافة كلمة المرور */
.form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box; /* لضمان أن العرض يشمل الـ padding والـ border */
    margin-top: 5px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #007bff; /* لون التركيز الرئيسي لمنصتك */
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* --- تنسيق رسائل التنبيه/النجاح --- */
.message-box {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 700;
    text-align: right; /* للعربية */
    border-right: 5px solid; /* شريط جانبي ملون */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.5s;
}

.message-box p {
    margin: 0;
    line-height: 1.5;
}

/* لون رسالة الخطأ (Warning/Error) */
.message-box.error {
    background-color: #fce4e4; /* أحمر فاتح جداً */
    color: #c62828; /* أحمر داكن */
    border-right-color: #c62828;
}

/* لون رسالة النجاح (Success) */
.message-box.success {
    background-color: #e8f5e9; /* أخضر فاتح جداً */
    color: #2e7d32; /* أخضر داكن */
    border-right-color: #2e7d32;
}

/* حركة بسيطة للظهور */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
