/* styles.css */
/* ===== ألوان مستوحاة من شعار المعهد - أزرق ملكي وذهبي ===== */
:root {
    --primary-warm: #1a3a8f; /* أزرق ملكي - من الكتاب في الشعار */
    --secondary-warm: #c8a84e; /* ذهبي - من الشريط في الشعار */
    --accent-warm: #e8d48b; /* ذهبي فاتح */
    --bg-soft: #f0f4fa; /* أزرق فاتح جداً */
    --glass-bg: rgba(240, 244, 250, 0.3);
    --glass-border: rgba(26, 58, 143, 0.4);
    --text-dark: #1a1a2e;
    --text-light: #e8edf5;
    
    /* تحسينات الخطوط - سلم طباعي احترافي */
    --font-primary: 'Cairo', sans-serif;
    --font-size-base: 1rem; /* 16px */
    --font-size-lg: 1.125rem; /* 18px */
    --font-size-xl: 1.25rem; /* 20px */
    --font-size-2xl: 1.5rem; /* 24px */
    --font-size-3xl: 1.875rem; /* 30px */
    --font-size-4xl: 2.25rem; /* 36px */
    --font-size-5xl: 3rem; /* 48px */
    
    --line-height-tight: 1.2;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;
    
    --letter-spacing-tight: -0.02em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.02em;
    --letter-spacing-wider: 0.05em;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--text-dark);
    background: linear-gradient(135deg, #f0f4fa 0%, #e0e8f5 100%);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== التسلسل الهرمي للعناوين ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: 0.5em;
}

h1 {
    font-size: var(--font-size-5xl);
    font-weight: 900;
}

h2 {
    font-size: var(--font-size-4xl);
}

h3 {
    font-size: var(--font-size-3xl);
}

h4 {
    font-size: var(--font-size-2xl);
}

h5 {
    font-size: var(--font-size-xl);
}

h6 {
    font-size: var(--font-size-lg);
}

/* تحسين قراءة الفقرات */
p {
    margin-bottom: 1.5rem;
    line-height: var(--line-height-relaxed);
}

/* نص صغير ومساعد */
small, .text-small {
    font-size: 0.875rem;
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-wide);
}

/* نص كبير مميز */
.lead {
    font-size: var(--font-size-lg);
    font-weight: 400;
    line-height: var(--line-height-relaxed);
    color: #3a3a5e;
}

/* تحسين التباعد للقوائم */
ul, ol {
    padding-right: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: var(--line-height-relaxed);
}

li {
    margin-bottom: 0.5rem;
}

/* تحسين شكل الروابط */
a {
    color: var(--primary-warm);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-warm);
}

/* خلفية ثابتة بصور طلاب ملهمة */
.floating-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}
.floating-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.08;
    animation: slowZoom 50s infinite alternate;
}
@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* طبقة ثانية من صور الازدهار */
.prosperity-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(26, 58, 143, 0.15) 0%, transparent 35%),
        radial-gradient(circle at 80% 70%, rgba(232, 212, 139, 0.15) 0%, transparent 35%),
        radial-gradient(circle at 40% 80%, rgba(200, 168, 78, 0.15) 0%, transparent 40%),
        url('https://images.unsplash.com/photo-1524178232363-1fb2b075b655?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover, cover, cover, cover;
    background-position: center;
    background-blend-mode: overlay;
    opacity: 0.1;
}

/* تحسينات الكاروسيل */
.carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15);
}
.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    background-size: cover;
    background-position: center;
}
.carousel-slide.active {
    opacity: 1;
    z-index: 10;
}
.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.7) 0%, rgba(26, 58, 143, 0.4) 100%);
    z-index: 20;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    color: white;
}
.carousel-text {
    font-size: 2rem;
    font-weight: 800;
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    background: linear-gradient(to left, #e0e8f5, #1a3a8f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(224, 232, 245, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(26, 58, 143, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.carousel-arrow:hover {
    background: rgba(232, 212, 139, 0.4);
    border-color: #1a3a8f;
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 0 30px #e8d48b;
    color: #1a1a2e;
}
.arrow-right { right: 20px; }
.arrow-left { left: 20px; }
.carousel-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    gap: 14px;
    background: rgba(26, 26, 46, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 22px;
    border-radius: 60px;
    border: 1px solid rgba(232, 212, 139, 0.4);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.2);
}
.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(224, 232, 245, 0.5);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(26, 58, 143, 0.5);
}
.dot.active {
    background: #e8d48b;
    box-shadow: 0 0 20px #1a3a8f;
    transform: scale(1.6);
    border-color: #fff;
}
.dot:hover {
    background: #e0e8f5;
    transform: scale(1.3);
    box-shadow: 0 0 15px #c8a84e;
}
@keyframes gentle-pulse {
    0% { box-shadow: 0 0 10px rgba(26,58,143,0.3); }
    50% { box-shadow: 0 0 30px rgba(232,212,139,0.6); }
    100% { box-shadow: 0 0 10px rgba(26,58,143,0.3); }
}
.carousel-arrow { animation: gentle-pulse 3s infinite; }
.carousel-overlay { padding-bottom: 80px; }
@media (max-width: 640px) {
    .carousel-text { font-size: 1.5rem; }
    .carousel-arrow { width: 40px; height: 40px; font-size: 1.2rem; }
    .carousel-dots { gap: 10px; padding: 8px 16px; }
}

/* تأثيرات إضافية لبطاقات الإحصائيات */
.stat-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(26, 58, 143, 0.2);
}
.stat-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 30px 60px -10px rgba(26, 58, 143, 0.5);
    border-color: rgba(232, 212, 139, 0.6);
}
.stat-icon {
    transition: all 0.6s ease;
}
.stat-card:hover .stat-icon {
    transform: rotate(360deg) scale(1.2);
    color: #e8d48b;
}

/* القائمة الرئيسية - تأثيرات دافئة */
.desktop-nav-link {
    position: relative;
    font-weight: 700;
    color: #1a1a2e;
    transition: all 0.3s;
}
.desktop-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to left, #1a3a8f, #c8a84e, #e8d48b);
    transition: width 0.3s ease;
}
.desktop-nav-link:hover {
    color: #c8a84e;
    text-shadow: 0 0 8px #e0e8f5;
}
.desktop-nav-link:hover::after {
    width: 100%;
}

/* قائمة الموبايل المنسدلة */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(224, 232, 245, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(26, 58, 143, 0.4);
    border-top: 1px solid rgba(232, 212, 139, 0.3);
    box-shadow: 0 30px 40px -20px rgba(0,0,0,0.3), 0 0 30px rgba(26,58,143,0.3);
    padding: 1.5rem;
    z-index: 100;
    transform-origin: top;
    animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(240, 244, 250, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(26, 58, 143, 0.3);
    border-radius: 3rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    color: #1a1a2e;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.mobile-menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(232, 212, 139, 0.3), transparent);
    transition: left 0.6s;
}

.mobile-menu-link:hover::before {
    left: 100%;
}

.mobile-menu-link:hover {
    background: rgba(26, 58, 143, 0.3);
    border-color: #e8d48b;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 30px -8px #c8a84e;
}

.mobile-menu-link i {
    font-size: 1.3rem;
    color: #c8a84e;
    transition: transform 0.3s;
}

.mobile-menu-link:hover i {
    transform: scale(1.3) rotate(10deg);
    color: #1a3a8f;
}

/* زر الهامبرغر */
.hamburger-btn {
    background: rgba(26, 58, 143, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(232, 212, 139, 0.5);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a2e;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(26, 58, 143, 0.3);
}

.hamburger-btn:hover {
    background: #e8d48b;
    border-color: #1a3a8f;
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 0 30px #e0e8f5;
}

/* خلفيات دافئة */
.warm-bg-pattern {
    position: relative;
}
.warm-bg-pattern::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.transparenttextures.com/colors/beige-paper.png');
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.glass-light {
    background: rgba(240, 244, 250, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.glass-dark {
    background: rgba(26, 26, 46, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

/* تأثيرات ناعمة للهيرو */
.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232,212,139,0.2) 0%, rgba(26,58,143,0.1) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 1;
    animation: floatGlow 15s infinite alternate;
}

@keyframes floatGlow {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
    100% { transform: translate(10%, 10%) scale(1.5); opacity: 0.7; }
}

.hero-glow-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(200,168,78,0.2) 0%, transparent 70%);
    animation-direction: alternate-reverse;
}

/* تدرجات نصية أزرق/ذهبي */
.text-gradient-gold {
    background: linear-gradient(to left, #1a3a8f, #e8d48b, #c8a84e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-gradient-warm {
    background: linear-gradient(to left, #c8a84e, #e8d48b, #1a3a8f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* تحسينات إضافية للتباعد */
.container {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

section {
    margin-bottom: 4rem;
}

.card {
    padding: 2rem;
    border-radius: 1.5rem;
}

/* تحسين المسافات بين العناصر */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mb-20 { margin-bottom: 5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.p-12 { padding: 3rem; }

/* تحسين عرض الصور */
img {
    max-width: 100%;
    height: auto;
    display: block;
}
