:root {
    --primary: #5E2B97;
    --accent: #00d2ff;
    --dark: #0f0a1a;
    --light: #f8f7ff;
    --card-bg: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Cairo', sans-serif; overflow-x: hidden; scroll-behavior: smooth; }

img{
    pointer-events: none; /* يمنع النقر والسحب وفتح القائمة المختصرة */
}

.container { width: 90%; max-width: 1200px; margin: auto; }
.section { padding: 80px 0; }
.bg-light { background: var(--light); }
.section-title { text-align: center; font-size: 3rem; font-weight: 900; margin-bottom: 50px; color: var(--primary); }

/* Navbar & Menu */
.navbar { height: 100px; background: #fff; display: flex; align-items: center; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 15px rgba(0,0,0,0.05); }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; width: 90%; margin: auto; }
.logo img { height: 80px; box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, 0.5); }
.nav-content { display: flex; align-items: center; gap: 25px; }
.nav-links { display: flex; list-style: none; gap: 20px; }
.nav-links a { text-decoration: none; color: var(--dark); font-weight: 700; transition: 0.3s; font-size: 1.3rem;}
.nav-links a:hover { color: var(--primary); }
.lang-switcher { background: var(--primary); color: #fff; border: none; padding: 10px 22px; border-radius: 50px; cursor: pointer; font-family: 'Montserrat'; font-weight: 700; }
.menu-toggle { display: none; font-size: 1.6rem; color: var(--primary); cursor: pointer; }

/* Hero */
.hero-section { height: 95vh; background: url('../img/back.jpg') center/cover no-repeat; position: relative; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(15,10,26,0.92) 0%, rgba(94,43,151,0.5) 100%); display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; }
.hero-content h1 { font-size: 4.5rem; font-weight: 900; line-height: 1.1; margin-bottom: 20px; }
.hero-content h1 span { color: var(--accent); }
.hero-content p { font-size: 1.3rem; max-width: 800px; margin-inline: auto; margin-bottom: 35px; }

/* الخدمات المنسقة */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.service-card { background: #fff; padding: 50px 30px; border-radius: 25px; text-align: center; position: relative; overflow: hidden; transition: 0.4s; box-shadow: 0 10px 40px rgba(0,0,0,0.05); }
.service-icon { width: 80px; height: 80px; background: var(--light); color: var(--primary); font-size: 2.5rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; border-radius: 50%; transition: 0.5s; }
.service-card h3 { margin-bottom: 15px; color: var(--primary); }
.service-card p { color: #666; font-size: 0.95rem; line-height: 1.6; }
.service-hover-line { position: absolute; bottom: 0; left: 0; width: 0; height: 5px; background: var(--primary); transition: 0.4s; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(94,43,151,0.15); }
.service-card:hover .service-icon { background: var(--primary); color: #fff; transform: rotateY(360deg); }
.service-card:hover .service-hover-line { width: 100%; }

/* ======================
   فريق العمل - تصميم مضغوط مع إزالة الفراغات السفلية
   ====================== */
.stack-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    margin: 0 auto;
}

.stack-card {
    width: 260px;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.stack-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(94, 43, 151, 0.2);
}

/* حاوية الصورة */
.stack-card .img-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f0eef5;
    flex-shrink: 0;
}

.stack-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.stack-card:hover img {
    transform: scale(1.05);
}

/* المعلومات الأساسية (الاسم والمنصب) - تظهر دائماً */
.stack-info {
    padding: 16px 12px 12px;  /* تقليل padding السفلي */
    background: #fff;
    text-align: center;
    transition: background 0.3s;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stack-info h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.stack-info span {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}

/* الوصف التفصيلي - يظهر عند التحويم فقط */
.member-desc {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #555;
    margin: 0;
}

.stack-card:hover .member-desc {
    max-height: 80px;
    opacity: 1;
    margin-top: 6px;
}

/* استجابة للشاشات المتوسطة والصغيرة */
@media (max-width: 768px) {
    .stack-grid {
        gap: 20px;
    }
    .stack-card {
        width: calc(50% - 10px);
        min-width: 180px;
    }
    .stack-card .img-wrapper {
        height: 240px;
    }
    .stack-info {
        padding: 12px 10px 10px;
    }
    .stack-info h3 {
        font-size: 1.1rem;
        margin-bottom: 2px;
    }
    .stack-info span {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }
    .member-desc {
        font-size: 0.75rem;
    }
}

@media (max-width: 550px) {
    .stack-grid {
        gap: 16px;
        padding: 0 12px;
    }
    .stack-card {
        width: 100%;
        max-width: 100%;
    }
    .stack-card .img-wrapper {
        height: 340px;
    }
    .stack-info {
        padding: 12px 12px 12px;
    }
    .stack-info h3 {
        font-size: 1.2rem;
    }
    .stack-info span {
        font-size: 1.2rem;
    }
}
/* التواصل */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-form { display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form textarea { padding: 18px; border-radius: 12px; border: 2px solid #ddd; outline: none; font-family: inherit; transition: border-color 0.3s, box-shadow 0.3s; }
.contact-form input:hover, .contact-form textarea:hover { border-color: #b39ddb; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(94, 43, 151, 0.12); }
.map-box { height: 450px; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }

/* الموبايل */
@media (max-width: 992px) {
    .menu-toggle { display: block; }
    .nav-content { position: absolute; top: 80px; left: 0; width: 100%; background: #fff; flex-direction: column; padding: 30px; display: none; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
	.stack-info span { display: block; color: var(--accent); font-weight: bold; margin-bottom: 0px; font-size: 0.9rem; }
	.nav-links a {font-size:1.1rem}
    .nav-content.active { display: flex; }
    .stack-grid { padding: 0 15px; }
    .stack-card { width: 100%; height: 450px; }
    .contact-wrapper { grid-template-columns: 1fr; padding: 0 15px; }
    .map-box { height: 350px; margin-top: 20px; }
    .hero-content h1 { font-size: 2.8rem; }
}

.btn { padding: 15px 40px; border-radius: 50px; text-decoration: none; font-weight: bold; transition: 0.4s; display: inline-block; cursor: pointer; border: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--accent); color: var(--dark); transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0, 210, 255, 0.35); }
.btn-primary:active { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(0, 210, 255, 0.25); }
footer { background-color:#5E2B97; color: #fff; padding: 40px; text-align: center; }
[dir="ltr"] .btn { font-family: 'Montserrat'; }