/* ================= المتغيرات والثوابت ================= */
:root {
    --teal: #0D9488;         
    --teal-light: #f0fdfa;   
    --teal-soft: #ccfbf1;    
    --teal-dark: #0f172a;    
    --white: #FFFFFF;
    --black: #0f172a;
    --bg-body: #f8fafc;      
    --text-dark: #1e293b;    
    --text-gray: #475569;    
    --glass-bg: rgba(255, 255, 255, 0.85); 
    --border-light: rgba(13, 148, 136, 0.1);
    --shadow-soft: 0 10px 30px -5px rgba(13, 148, 136, 0.08); 
    --shadow-hover: 0 20px 40px -5px rgba(13, 148, 136, 0.15);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================= الإعدادات العامة ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    color: var(--text-dark);
    line-height: 1.8;
    overflow-x: hidden;
    background-color: var(--bg-body);
}

.container { 
    max-width: 1150px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* ================= تأثير الخلفية ================= */
.blur-background {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blur-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px); 
    opacity: 0.12; 
    animation: float 12s infinite alternate ease-in-out;
}

.blur-shape-1 { background-color: var(--teal); width: 700px; height: 700px; top: -200px; right: -150px; }
.blur-shape-2 { background-color: #0ea5e9; width: 600px; height: 600px; bottom: -150px; left: -100px; opacity: 0.08; }

@keyframes float {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(30px) scale(1.02); }
}

/* ================= الشريط العلوي (Header) ================= */
header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    height: 65px; 
    display: flex; align-items: center;
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
}

.header-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
    height: 100%; 
}

.header-content .logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.header-content .logo-box img { 
    display: block; 
    height: 180px; 
    max-width: 380px;
    object-fit: contain;
    margin: 0; 
    -webkit-filter: brightness(0) invert(41%) sepia(96%) saturate(1081%) hue-rotate(142deg) brightness(91%) contrast(92%) drop-shadow(0px 0px 15px rgba(13, 148, 136, 0.8));
    filter: brightness(0) invert(41%) sepia(96%) saturate(1081%) hue-rotate(142deg) brightness(91%) contrast(92%) drop-shadow(0px 0px 15px rgba(13, 148, 136, 0.8));
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: filter;
    transition: all 0.4s ease;
}

.header-content .logo-box:hover img {
    -webkit-filter: brightness(0) invert(41%) sepia(96%) saturate(1081%) hue-rotate(142deg) brightness(91%) contrast(92%) drop-shadow(0px 0px 25px rgba(13, 148, 136, 1));
    filter: brightness(0) invert(41%) sepia(96%) saturate(1081%) hue-rotate(142deg) brightness(91%) contrast(92%) drop-shadow(0px 0px 25px rgba(13, 148, 136, 1));
}

.menu-toggle {
    cursor: pointer; font-size: 1.3rem; color: var(--teal);
    background: rgba(255, 255, 255, 0.9); border: 1px solid rgba(13, 148, 136, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 5px 15px rgba(13, 148, 136, 0.1);
}

.menu-toggle:hover { 
    background-color: var(--teal); color: var(--white); 
    transform: rotate(-180deg) scale(1.05);
}

/* ================= القائمة الجانبية ================= */
.menu-backdrop {
    position: fixed; inset: 0; 
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 1999; opacity: 0; visibility: hidden; transition: all 0.4s ease;
}
.menu-backdrop.active { opacity: 1; visibility: visible; }

.nav-overlay {
    position: fixed; top: 0; right: -100%; bottom: 0; 
    width: 360px; max-width: 85vw;
    background-color: var(--teal-dark); 
    background-image: linear-gradient(to bottom, #0f172a, #042f2e);
    box-shadow: -10px 0 50px rgba(0,0,0,0.5);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    z-index: 2000; display: flex; flex-direction: column;
}
.nav-overlay.active { right: 0; }

.nav-header { display: flex; justify-content: flex-end; align-items: center; padding: 25px 25px 0; }

.close-menu {
    position: absolute; top: 20px; left: 20px; z-index: 10;
    font-size: 1.3rem; cursor: pointer; color: var(--text-gray);
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background-color: rgba(255, 255, 255, 0.05); border: none; transition: var(--transition);
}
.close-menu:hover { color: var(--white); background-color: #ef4444; }

.nav-links-container {
    padding: 50px 25px 20px; 
    display: flex; flex-direction: column; gap: 10px;
    overflow-y: auto;
}
.nav-links-container a {
    text-decoration: none; color: rgba(255, 255, 255, 0.85); font-size: 1.1rem; font-weight: 700;
    padding: 14px 18px; border-radius: 14px; transition: var(--transition); display: flex; align-items: center; gap: 15px;
    background-color: rgba(255, 255, 255, 0.02);
}
.nav-links-container a i { 
    color: var(--teal-light); font-size: 1.1rem; background-color: rgba(13, 148, 136, 0.2); width: 40px; height: 40px; border-radius: 10px;
    display: flex; justify-content: center; align-items: center;
}
.nav-links-container a:hover { background-color: rgba(255, 255, 255, 0.05); color: var(--white); transform: translateX(-5px); }

/* ================= القسم الرئيسي (Hero) ================= */
.hero { 
    padding: 80px 20px 60px; 
    text-align: center; 
    position: relative;
    
    /* دمج الصورة مع لون الموقع: يبدأ شبه شفاف وينتهي بلون الصفحة #f8fafc بالكامل في الأسفل */
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0.65) 0%, rgba(248, 250, 252, 0.75) 70%, #f8fafc 100%), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero h1.hero-title { 
    display: flex; justify-content: center; align-items: center; flex-wrap: nowrap; gap: 12px; 
    font-size: 4rem; font-weight: 900; margin-bottom: 20px; letter-spacing: -1px; 
    position: relative; z-index: 2;
}
.hero h1.hero-title span { white-space: nowrap; }
.hero h1 .text-dark { color: var(--black); }
.hero h1 .text-teal-blur { color: var(--teal); text-shadow: 0 0 25px rgba(13, 148, 136, 0.5); }
.hero h2 { font-size: 1.3rem; font-weight: 600; margin-bottom: 60px; color: var(--text-gray); line-height: 1.6; position: relative; z-index: 2; }

/* ================= البطاقات ================= */
.portals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 50px; position: relative; z-index: 2; }
.portal-card {
    background: var(--glass-bg); backdrop-filter: blur(20px); border: 1px solid var(--border-light); border-radius: 28px; box-shadow: var(--shadow-soft); 
    transition: var(--transition); padding: 50px 35px; text-align: center; text-decoration: none; color: var(--text-dark); cursor: pointer; display: block;
}
.portal-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); border-color: var(--teal); background: var(--white);}
.icon-wrapper {
    background-color: var(--teal-light); color: var(--teal); width: 85px; height: 85px; border-radius: 24px;
    display: flex; align-items: center; justify-content: center; font-size: 2.2rem; margin: 0 auto 20px; transition: var(--transition);
}
.portal-card:hover .icon-wrapper { background-color: var(--teal); color: var(--white); transform: scale(1.05); }
.portal-card h3 { font-size: 1.6rem; font-weight: 800; color: var(--teal); margin-bottom: 10px; }
.portal-card p { font-size: 1.1rem; font-weight: 600; color: var(--text-gray); line-height: 1.5; }

/* ================= قسم الميزات ================= */
.features { padding: 40px 0 80px; }
.feature-block { 
    background: var(--glass-bg); border: 1px solid var(--border-light); border-radius: 30px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-soft); padding: 50px; margin-bottom: 50px; 
}
.feature-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.feature-header .icon-wrapper { margin: 0; width: 60px; height: 60px; font-size: 1.5rem; border-radius: 18px;}
.feature-block h3 { font-size: 1.8rem; color: var(--text-dark); font-weight: 900; }
.feature-intro { font-weight: 600; font-size: 1.1rem; margin-bottom: 30px; display: block; color: var(--text-gray); line-height: 1.9; }
.article-list { list-style: none; display: grid; grid-template-columns: 1fr; gap: 15px; }
.article-list li {
    display: flex; align-items: flex-start; gap: 20px; font-size: 1.05rem; font-weight: 600;
    padding: 18px 22px; border: 1px solid var(--border-light); border-radius: 18px;
    background-color: var(--white); color: var(--text-dark); transition: var(--transition);
}
.article-list li:hover { box-shadow: var(--shadow-soft); border-color: var(--teal); transform: translateX(-5px); }
.article-list li i { color: var(--teal); background-color: var(--teal-light); width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; border-radius: 10px; flex-shrink: 0; }
.article-list li.more-item { display: none; opacity: 0; }
.article-list.expanded li.more-item { display: flex; animation: showItem 0.5s forwards; }
@keyframes showItem { to { opacity: 1; transform: translateY(0); } }
.show-more-btn { background-color: var(--bg-body); color: var(--teal); border: 1px solid var(--border-light); padding: 14px 35px; border-radius: 25px; font-weight: 800; cursor: pointer; margin: 30px auto 0; transition: var(--transition); display: block; }
.show-more-btn:hover { background-color: var(--teal); color: var(--white); border-color: var(--teal); box-shadow: var(--shadow-soft); }
.feature-result { margin-top: 35px; padding: 22px 25px; background: var(--teal-light); color: var(--teal); border-radius: 18px; font-weight: 800; border-right: 5px solid var(--teal); }

/* ================= الفوتر المطور ================= */
.premium-footer { background-color: var(--teal-dark); color: #94a3b8; padding: 60px 0 0 0; position: relative; border-top: 4px solid var(--teal); }
.footer-main-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 50px; position: relative; z-index: 2; }
.footer-col h4 { color: var(--white); font-size: 1.2rem; font-weight: 800; margin-bottom: 20px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ''; position: absolute; bottom: 0; right: 0; width: 30px; height: 3px; background-color: var(--teal); }

.social-heading { font-size: 1.2rem; color: var(--white); margin-bottom: 20px; font-weight: 800; }
.social-links { display: flex; gap: 15px; }
.social-links a { 
    display: flex; align-items: center; justify-content: center; 
    width: 48px; height: 48px; background-color: rgba(255,255,255,0.05); 
    color: var(--white); border-radius: 50%; 
    transition: var(--transition); font-size: 1.3rem; 
    border: 1px solid rgba(255,255,255,0.1);
}
.social-links a:hover { 
    background-color: var(--teal); 
    transform: translateY(-5px); 
    border-color: var(--teal); 
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.4); 
}

.links-col ul { list-style: none; }
.links-col ul li { margin-bottom: 12px; }
.links-col ul a { color: #94a3b8; text-decoration: none; font-size: 1.05rem; transition: var(--transition); }
.links-col ul a:hover { color: var(--white); padding-right: 5px; }

.contact-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.contact-list a { display: flex; align-items: center; gap: 12px; background-color: rgba(255,255,255,0.03); padding: 10px 15px; border-radius: 12px; color: #94a3b8; text-decoration: none; transition: var(--transition); }
.contact-list a i { color: var(--teal); background-color: rgba(13,148,136,0.15); width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 8px; flex-shrink: 0; }
.contact-list a:hover { background-color: rgba(13,148,136,0.1); color: var(--white); }

.footer-bottom-bar { border-top: 1px solid rgba(255,255,255,0.05); padding: 25px 0; display: flex; justify-content: center; align-items: center; font-size: 0.95rem; }

/* ================= التجاوب للموبايل ================= */
@media (max-width: 768px) {
    header { height: 55px; } 
    .header-content .logo-box img { height: 150px; max-width: 320px; }
    
    .hero h1.hero-title { font-size: 10vw; gap: 6px; } /* تعديل حجم العنوان الذي تم طلبه */
    
    .portals-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    
    /* التعديل الذي جعل البطاقات مربعة وخفف الارتفاع */
    .portal-card { padding: 20px 10px; } 
    .portal-card .icon-wrapper { width: 60px; height: 60px; font-size: 1.6rem; margin: 0 auto 12px; }
    
    .portal-card h3 { font-size: 1.1rem; }
    .portal-card p { font-size: 0.85rem; }
    .feature-block { padding: 30px 20px; }
    
    /* التعديل الخاص بتصغير القائمة الجانبية للموبايل */
    .nav-overlay { width: 280px; max-width: 75vw; }
    
    .footer-main-grid { 
        display: grid;
        grid-template-columns: 1fr 1fr; 
        gap: 40px 15px; 
    }
    
    .brand-col {
        grid-column: span 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        padding-bottom: 25px;
    }
    
    .contact-col {
        grid-column: span 2;
    }
    
    .footer-col h4 { font-size: 1.1rem; margin-bottom: 15px; text-align: right; }
    .footer-col h4::after { right: 0; left: auto; transform: none; width: 30px; }
    .links-col ul, .contact-list { text-align: right; }
    
    .links-col ul a { font-size: 0.95rem; }
    .contact-list a { padding: 10px; font-size: 0.9rem; }
    .contact-list a i { width: 35px; height: 35px; font-size: 1.1rem; }
    
    .footer-bottom-bar { text-align: center; font-size: 0.85rem; }
}