:root {
    --primary: #0369a1;
    --primary-dark: #075985;
    --sky-light: #e0f2fe;
    --sky-lighter: #f0f9ff;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border: #cbd5e1;
    --badge-green: #059669;
    --badge-amber: #d97706;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Tajawal', sans-serif; }
body { background-color: var(--bg); color: var(--text-main); line-height: 1.7; }

header {
    background: linear-gradient(135deg, #bae6fd 0%, #e0f2fe 50%, #f0f9ff 100%);
    color: var(--text-main); padding: 3rem 1.5rem 2.5rem; text-align: center;
    border-bottom: 1px solid #bae6fd;
}
.platform-badge {
    display: inline-block; background: #ffffff; color: var(--primary);
    border: 1px solid #7dd3fc; padding: 0.35rem 1.1rem; border-radius: 99px;
    font-size: 0.9rem; font-weight: 700; margin-bottom: 0.8rem;
}
header h1 { font-size: 2.3rem; font-weight: 800; color: #0c4a6e; margin-bottom: 0.5rem; }
header p.subtitle { color: var(--text-muted); font-size: 1.05rem; max-width: 680px; margin: 0 auto 1rem; }

.founder-tag {
    display: inline-block; background: rgba(255, 255, 255, 0.85); color: #0f172a;
    padding: 0.4rem 1.2rem; border-radius: 8px; font-size: 0.92rem; font-weight: 700; border: 1px solid #7dd3fc;
}

.container { max-width: 1080px; margin: 0 auto; padding: 1.5rem; }
.level-header { font-size: 1.3rem; font-weight: 800; color: #0c4a6e; margin: 2rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1.25rem; }
.course-card, .sub-card, .unit-box { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; }
.course-card {
    transition: all 0.2s ease; text-decoration: none; color: inherit; position: relative;
    display: flex; flex-direction: column; justify-content: space-between; cursor: pointer;
}
.course-card:hover, .sub-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.course-code {
    display: inline-block; background: var(--sky-lighter); color: var(--primary);
    border: 1px solid #bae6fd; font-weight: 800; font-size: 0.85rem; padding: 0.2rem 0.7rem; border-radius: 6px; margin-bottom: 0.6rem;
}
.course-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.course-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.2rem; }
.course-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.8rem; font-weight: 600; }
.card-link { color: var(--primary); font-weight: 700; font-size: 0.95rem; }
.status-tag { position: absolute; top: 1.2rem; left: 1.2rem; font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.7rem; border-radius: 6px; color: white; }
.tag-ready { background: var(--badge-green); }
.tag-soon { background: #64748b; }

.portal-box {
    background: var(--sky-lighter); border: 1px solid #7dd3fc; border-radius: 12px; padding: 1.5rem; margin-top: 2.5rem;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.portal-btn { background: var(--primary); color: white; border: none; padding: 0.7rem 1.4rem; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 0.95rem; }

.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15,23,42,0.7); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; overflow-y: auto;
}
.modal-card {
    background: var(--card-bg); color: var(--text-main); max-width: 580px; width: 100%;
    border-radius: 14px; padding: 2rem; position: relative; border: 1px solid var(--border);
}
.close-modal {
    position: absolute; top: 1rem; left: 1rem; background: var(--bg); color: var(--text-main);
    border: 1px solid var(--border); width: 32px; height: 32px; border-radius: 50%; font-weight: bold; cursor: pointer;
}

footer { text-align: center; padding: 2rem 1rem; color: var(--text-muted); font-size: 0.92rem; border-top: 1px solid var(--border); margin-top: 3rem; background: var(--card-bg); }
footer a { color: var(--primary); text-decoration: none; font-weight: 700; cursor: pointer; }


/* توحيد لون الترويسة العلوية والتذييل السفلي لجميع صفحات المنصة */
header, footer {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%) !important;
    border-color: #7dd3fc !important;
}
header {
    border-bottom: 2px solid #7dd3fc;
}
footer {
    border-top: 2px solid #7dd3fc !important;
}
