/*
 * shared.css — الأنماط المشتركة بين جميع صفحات المنصة
 * الرحلة التعليمية
 */

/* ===============================
   المتغيرات اللونية
================================ */
:root {
    /* الأزرق — المرحلة الجامعية */
    --univ-primary: #1D4ED8;
    --univ-dark:    #1E3A8A;

    /* الأخضر — المرحلة الوزارية */
    --min-primary: #15803D;
    --min-dark:    #14532D;

    /* البنفسجي — اختبارات المهنة */
    --pro-primary: #7C3AED;
    --pro-dark:    #5B21B6;

    /* المشترك */
    --dash-bg:     #F3F4F6;
    --dash-white:  #FFFFFF;
    --dash-text:   #1F2937;
    --dash-muted:  #6B7280;
    --dash-border: #E5E7EB;
    --dash-radius: 16px;
    --dash-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --dash-shadow-md: 0 10px 25px rgba(0,0,0,0.08);
}

/* ===============================
   الهيدر العام (Page Header)
================================ */
.page-header,
.phase-header {
    border-radius: 28px;
    padding: 65px 40px;
    color: white;
    margin-bottom: 45px;
    position: relative;
    overflow: hidden;
}

.page-header::before,
.phase-header::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-orb 7s ease-in-out infinite;
}

.page-header::after,
.phase-header::after {
    content: '';
    position: absolute;
    bottom: -50px; left: 8%;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-orb 9s ease-in-out infinite reverse;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0); }
    50%       { transform: translate(12px, -12px); }
}

.page-header-content,
.phase-header-content {
    position: relative;
    z-index: 2;
}

/* ===============================
   الشارة (Badge) في الهيدر
================================ */
.header-badge,
.lib-hero-badge,
.news-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
}

/* ===============================
   عنوان الصفحة
================================ */
.page-title,
.phase-title {
    font-size: 36px;
    font-weight: 900;
    margin: 0 0 12px;
    line-height: 1.2;
}

.page-subtitle,
.phase-subtitle {
    font-size: 16px;
    opacity: 0.85;
    margin: 0;
    font-weight: 500;
}

/* ===============================
   Breadcrumbs
================================ */
.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.breadcrumb-pill,
.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 700;
}

.breadcrumb-sep {
    opacity: 0.5;
    font-size: 14px;
}

/* ===============================
   زر العودة
================================ */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--dash-white);
    color: var(--dash-text) !important;
    border-radius: 12px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 15px;
    border: 1px solid var(--dash-border);
    transition: all 0.3s ease;
    margin-bottom: 35px;
    box-shadow: var(--dash-shadow);
}

.back-button:hover {
    transform: translateX(-5px);
}

/* ===============================
   البحث الفوري
================================ */
.search-wrap {
    position: relative;
    margin-bottom: 30px;
    max-width: 460px;
}

.search-input {
    width: 100%;
    padding: 13px 20px 13px 50px;
    border: 1.5px solid var(--dash-border);
    border-radius: 14px;
    font-size: 15px;
    font-family: 'Tajawal', sans-serif;
    background: var(--dash-white);
    color: var(--dash-text);
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: var(--dash-shadow);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dash-muted);
    font-size: 18px;
    pointer-events: none;
}

/* ===============================
   شريط الإحصائيات
================================ */
.stats-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--dash-muted);
    font-size: 14px;
    font-weight: 600;
}

/* ===============================
   حالة فارغة
================================ */
.empty-state {
    text-align: center;
    padding: 70px 30px;
    color: var(--dash-muted);
}

.empty-icon {
    font-size: 3.5rem;
    opacity: 0.2;
    display: block;
    margin-bottom: 14px;
}

.empty-text {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dash-text);
}

/* ===============================
   Responsive
================================ */
@media (max-width: 768px) {
    .page-header,
    .phase-header { padding: 40px 24px; }

    .page-title,
    .phase-title  { font-size: 26px; }

    .search-wrap  { max-width: 100%; }
}
