/* ==============================================
   منصة مدارج العلم - ملف الأنماط المخصص
   ============================================== */

/* ─── المتغيرات ─────────────────────────────── */
:root {
    --teal:          #259390;
    --teal-dark:     #1a6b68;
    --teal-light:    #2db5b1;
    --gold:          #bd9b00;
    --gold-dark:     #9a7f00;
    --cream:         #fcfcfb;
    --transition:    0.3s ease;
    --shadow-soft:   0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-med:    0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow:   0 0 20px rgba(37, 147, 144, 0.15);
}

/* ─── إعدادات عامة ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    overflow-x: hidden;
    font-size: 1rem;
    line-height: 1.7;
}

[x-cloak] { display: none !important; }

/* ─── الروابط والأزرار ───────────────────────── */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── الصور ──────────────────────────────────── */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ─── إخفاء تجاوز النص ───────────────────────── */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Typography ─────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.3px;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1.25rem; }

.prose p, .text-gray-600 {
    line-height: 1.8;
    letter-spacing: 0.2px;
}

/* ─── الأقسام ────────────────────────────────── */
section { scroll-margin-top: 80px; }

/* ─── تأثير الزجاج ───────────────────────────── */
.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ─── تأثير الإضاءة على البطاقات ────────────── */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.card-shine:hover::before {
    opacity: 1;
    left: 100%;
}

/* ─── زر الواتساب العائم ─────────────────────── */
.whatsapp-float {
    animation: floatBounce 2s ease-in-out infinite;
}

@keyframes floatBounce {
    0%, 100% { transform: translateY(0);     }
    50%       { transform: translateY(-10px); }
}

/* ─── مؤشر التحميل ───────────────────────────── */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--cream);
    border-bottom-color: var(--teal);
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    to { transform: rotate(360deg); }
}

/* ─── تأثير Shimmer ──────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -1000px 0; }
    100% { background-position:  1000px 0; }
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 0%, #f8f8f8 20%, #f0f0f0 40%, #f0f0f0 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s linear infinite;
}

/* ─── شريط التمرير ───────────────────────────── */
::-webkit-scrollbar       { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--cream); border-radius: 10px; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--teal) 0%, var(--teal-dark) 100%);
    border-radius: 10px;
    border: 2px solid var(--cream);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
}

/* ─── Focus للإتاحة ──────────────────────────── */
*:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

/* ─── شاشات صغيرة ────────────────────────────── */
@media (max-width: 640px) {
    html { font-size: 15px; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }
}

/* ─── تقليل الحركة ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration:       0.01ms !important;
        animation-iteration-count: 1     !important;
        transition-duration:       0.01ms !important;
        scroll-behavior:           auto   !important;
    }
}

/* ─── طباعة ──────────────────────────────────── */
@media print {
    nav, footer, .fixed { display: none !important; }
    body { background: white; color: black; }
}