/* static/css/custom.css */

/* --- 1. General Layout & Body --- */
body {
    background-color: var(--bs-tertiary-bg);
    min-height: 100vh;
}

.page-content {
    flex-grow: 1;
}

/* حاوية المحتوى الرئيسية */
.content-wrapper {
    background-color: var(--bs-body-bg);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid var(--bs-border-color-translucent);
}

/* --- 2. Public Homepage & School Cards --- */
.public-home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.main-logo {
    max-width: 120px;
    height: auto;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.main-logo:hover {
    transform: scale(1.05);
}

.school-card {
    background-color: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
}

.school-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--bs-primary);
}

.school-logo {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bs-body-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-color: #fff;
}

.school-logo-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: var(--bs-tertiary-bg);
    border: 4px solid var(--bs-body-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary-color);
    font-size: 1.5rem;
}

.school-card .card-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--bs-body-color);
}

/* زر الدخول في بطاقة المدرسة */
.school-card .login-button .btn {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    font-weight: 600;
    width: 80%;
}

.school-card:hover .login-button .btn {
    opacity: 1;
    transform: translateY(0);
}

/* --- 3. Forms & Registration --- */
.registration-card {
    border-radius: 1rem;
    overflow: hidden;
    border: none;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .05);
}

.registration-card .card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.registration-card .input-group-text {
    background-color: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-secondary-color);
}

.registration-card .form-control:focus,
.registration-card .form-select:focus {
    z-index: 3;
}

/* --- 4. Dashboard Cards (Stats & Actions) --- */
.stat-card,
.action-card {
    border: none;
    border-radius: 1rem;
    transition: all 0.2s ease;
}

.stat-card:hover,
.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
}

.stat-card .display-4 {
    font-weight: 800;
    font-size: 2.5rem;
}

.action-card .card-body i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.action-card:hover .card-body i {
    opacity: 1;
    transform: scale(1.1);
}

/* --- 5. Calendar & General --- */
.fc-event {
    cursor: pointer;
    border: none !important;
    border-radius: 4px;
    padding: 2px 5px;
}

.card-header h4,
.card-header h6 {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    font-weight: 700;
}

/* --- 6. CKEditor Content Styling (RTL/LTR Support) --- */

/* تنسيق محتوى المحرر ليكون متجاوباً مع اللغة */
.ck-content {
    /* start تعني: يمين في العربية، ويسار في الإنجليزية */
    text-align: start !important;
    direction: inherit;
}

/* إجبار القوائم في الوضع العربي على الاتجاه الصحيح */
[dir="rtl"] .ck-content ul,
[dir="rtl"] .ck-content ol {
    padding-right: 2rem !important;
    /* مسافة من اليمين للنقاط */
    padding-left: 0 !important;
    /* إلغاء مسافة اليسار */
    text-align: right !important;
}

/* إجبار القوائم في الوضع الإنجليزي */
[dir="ltr"] .ck-content ul,
[dir="ltr"] .ck-content ol {
    padding-left: 2rem !important;
    padding-right: 0 !important;
    text-align: left !important;
}

/* إجبار عناصر القائمة (li) على المحاذاة الصحيحة */
[dir="rtl"] .ck-content li {
    text-align: right !important;
    direction: rtl !important;
}

/* ضمان ظهور العناوين والجداول بشكل صحيح */
.ck-content h1,
.ck-content h2,
.ck-content h3,
.ck-content p,
.ck-content table {
    text-align: start !important;
}