/* ========================================= */
/* --- المتغيرات اللونية الأساسية --- */
/* ========================================= */
:root {
    --primary-color: #300e47; 
    --bg-color: #ffffff;
}

/* ========================================= */
/* --- الإعدادات العامة (Reset) --- */
/* ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #FAF4FF;
    color: var(--primary-color);
    overflow-x: hidden;
}

.app-container {
    width: 100%; 
    min-height: 100vh;
    background-color: var(--bg-color);
    position: relative;
    overflow-x: hidden;
}

/* ========================================= */
/* --- قسم الصورة العلوية (Hero Section) --- */
/* ========================================= */
/* ========================================= */
/* --- قسم الصورة العلوية (Hero Section) --- */
/* ========================================= */
.hero-section {
    width: 100%;
    /* نضع الارتفاع هنا بالـ px لكي يحجز مساحة في الصفحة ويدفع ما تحته للأسفل */
    height: 195px; 
    position: relative;
}

@media(max-width:767px)
{
    .hero-section {
    width: 100%;
    height: 81px; 
    position: relative;
}
}

.hero-bg-image {
    width: 100%;
    /* الصورة تأخذ 100% من ارتفاع الحاوية الأب (الـ 359px) */
    height:  679%; 
    background-image: url('heroImage.png'); /* أو Rectangle 34626015.png حسب اسم صورتك */
    background-size: cover;
    background-position: center;
    /* القطع المائل الذي تستخدمينه */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 120px), 0 100%);
}

/* ========================================= */
/* --- قسم الشعار والمعلومات --- */
/* ========================================= */
.profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0 20px;
}

.logo-wrapper {
    /* سحب اللوجو للأعلى بمقدار عمق القطع ليتداخل معه بشكل مثالي */
    margin-top: 974px; 
    z-index: 10;
    background-color: var(--bg-color);
    /* border-radius: 50%; */
    padding: 5px; 
    /* border: 2px solid var(--primary-color); */
    display: flex;
    justify-content: center;
    align-items: center;
    /* box-shadow: 0 10px 25px rgba(0,0,0,0.1);  */
}

.brand-logo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.brand-name {
    margin-top: 20px;
    font-size: 36px; 
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.social-icons {
    display: flex;
    gap: 20px; 
    margin-top: 15px;
    margin-bottom: 40px; 
    list-style: none;
}

.social-icons a {
    color: var(--primary-color);
    font-size: 22px; 
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f8f8; 
}

.social-icons a:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    transform: translateY(-5px); 
}

/* ========================================= */
/* --- إعدادات قسم القائمة (المنيو) --- */
/* ========================================= */
.menu-section {
    padding: 10px 40px; 
    width: 100%; 
    max-width: 1400px;
    margin: 0 auto 10px auto; 
}

/* --- تصميم العناوين والسهم (القائمة المنسدلة) --- */
.section-header {
    display: flex;
    justify-content: space-between; /* لترك مسافة بين العنوان والسهم */
    align-items: center;
    cursor: pointer; /* شكل الماوس كإصبع للنقر */
    padding: 10px 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0; /* خط خفيف تحت العنوان */
    user-select: none; /* لمنع تظليل النص عند النقر */
    transition: background-color 0.3s;
}

.section-header:hover {
    background-color: #fafafa;
}

.section-title {
    font-size: 32px;
    font-weight: 900;
    color: #000000;
    margin-bottom: 0; /* إلغاء المارجن القديم */
}

/* أيقونة السهم */
.toggle-icon {
    font-size: 24px;
    color: var(--primary-color);
    transition: transform 0.3s ease; /* حركة دوران السهم */
}

/* عند فتح القائمة، يلف السهم للأعلى */
.section-header.active .toggle-icon {
    transform: rotate(180deg);
}

/* ========================================= */
/* --- شبكة الكروت (Grid) --- */
/* ========================================= */
.menu-grid {
    /* هنا السر: الكروت مخفية افتراضياً */
    display: none; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 25px;
    /* حركة ظهور ناعمة للأسفل */
    animation: fadeIn 0.4s ease-out;
}

/* كلاس يتم إضافته بالجافاسكربت لإظهار الكروت */
.menu-grid.show {
    display: grid;
}

/* حركة الظهور (Fade In) */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================= */
/* --- تصميم الكارد (Card Design) --- */
/* ========================================= */
.menu-card {
    display: flex;
    align-items: stretch;
    gap: 15px;
    background-color: transparent;
    transition: all 0.3s ease;
    padding: 15px;
    border-radius: 20px;
}

.menu-card:hover {
    background-color: #f8f4fb;
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(48, 14, 71, 0.15);
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--primary-color); 
    margin-bottom: 6px;
}

.card-desc {
    font-size: 13px;
    color: #666666;
    line-height: 1.5;
    margin-bottom: 12px;
    font-weight: 600;
    flex-grow: 1; 
}

.card-meta {
    display: flex;
    gap: 8px;
    width: 100%;
}

.meta-pill {
    flex: 1;
    background-color: #f1e9f6; 
    border-radius: 20px;
    padding: 4px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: ltr; 
}

.meta-label {
    color: var(--primary-color);
    font-weight: 900;
    font-size: 12px;
}

.meta-value {
    color: #000000;
    font-weight: 900;
    font-size: 12px;
    direction: rtl; 
}

.card-image-box {
    width: 100px;
    min-width: 100px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 120%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
}

.card-image-box img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transform: scale(1.1); 
    margin-bottom: 10px;
}

/* ========================================= */
/* --- تصميم الفوتر (تذييل الصفحة) --- */
/* ========================================= */
.app-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 60px 20px 80px; 
    width: 100%;
}

.footer-text {
    font-size: 16px;
    font-weight: 700;
    color: #888888; 
    margin-top: 5px; 
}

.footer-brand {
    font-size: 36px;
    font-weight: 900;
    color: var(--primary-color); 
    line-height: 1;
}

/* ========================================= */
/* --- التجاوب مع الشاشات (Responsive Grid) --- */
/* ========================================= */

@media (max-width: 1200px) {
    /* تم التعديل لكي يظهر 3 أعمدة بدلاً من 4 عند إضافة كلاس show */
    .menu-grid.show { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .menu-grid.show { grid-template-columns: repeat(2, 1fr); }
    .menu-section { padding: 10px 20px; }
}

@media (max-width: 768px) {
    .hero-bg-image {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 70px), 0 100%);
    }

    @media (max-width: 768px) {
    .logo-wrapper {
        margin-top: 421px;
        padding: 3px;
    }
}

    .brand-logo { width: 130px; height: 130px; }
    .brand-name { font-size: 28px; }
    .social-icons { gap: 15px; }

    .social-icons a {
        font-size: 18px;
        width: 35px;
        height: 35px;
        background-color: transparent; 
    }

    .social-icons a:hover {
        background-color: transparent;
        color: var(--primary-color);
        opacity: 0.7;
        transform: translateY(-3px);
    }
    
    .section-title {
        font-size: 26px; /* تصغير عنوان القسم في الموبايل */
    }

    .app-footer { padding: 40px 20px 60px; }
    .footer-text { font-size: 14px; }
    .footer-brand { font-size: 28px; }
}

@media (max-width: 600px) {
    .menu-grid.show { grid-template-columns: 1fr; }
}