

/* ───────────── الهيدر الرئيسي ───────────── */
header {
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    color: var(--cr-header);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* ───────────── اللوغو ───────────── */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    color: var(--cr-header);
    order: 0;
}

.logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    vertical-align: middle;
}

.brand-name {
    font-weight: 600;
}

/* ───────────── الأزرار ───────────── */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    order: 2;
}

/* زر تسجيل الدخول */
.sign-in {
    padding: 8px 12px;
    border: 2px solid var(--cr-header);
    border-radius: 30px;
    background: transparent;
    color: var(--cr-header);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sign-in:hover {
    background: var(--cr-header);
    color: var(--bg-header);
    transform: translateY(-2px);
}

/* زر القائمة على الأجهزة الصغيرة */
.mobile-menu-btn {
    display: none; /* مخفي افتراضياً */
    background: none;
    border: none;
    color: var(--cr-header);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    margin-right: 5px;
}

.mobile-menu-btn iconify-icon {
    margin-top: 5px;
}

/* ───────────── القائمة الرئيسية ───────────── */
nav {
    display: flex;
    align-items: center;
    gap: 20px;
    order: 1;
}

#nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease;
}

#nav-menu li a {
    color: var(--cr-header);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

#nav-menu li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    right: 0;
    background-color: var(--cr-header);
    transition: var(--transition);
}

#nav-menu li a:hover:after {
    width: 100%;
}

/* ───────────── Media Queries ───────────── */

/* الشاشات الكبيرة (ديسكتوب) - 1025px فما فوق */
@media (min-width: 1025px) {
    .header-container {
        justify-content: space-between;
    }

    .logo {
        order: 0;
    }

    nav {
        order: 2;
        display: flex !important;
        position: static;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
    }



    #nav-menu {
       
      
        left: 0;
        right: 0;
         display: flex !important;
        position: static;
        flex-direction: row;
       padding: 0;
        box-shadow: none;
    }
  
    .header-actions {
        order: 1;
        gap: 10px;
    }

    .mobile-menu-btn {
        display: none !important;
    }

    .sign-in {
        padding: 8px 12px;
        font-size: 0.95rem;
    }
}

/* الشاشات المتوسطة والصغيرة (تابلت وموبايل) - 1024px فما دون */
@media (max-width: 1024px) {
    .header-container {
        justify-content: space-between;
        position: relative;
    }

    .logo {
        order: 0;
    }

    nav {
        order: 3;
        width: 100%;
        position: static;
    }

    #nav-menu {
        display: none;
        position: fixed;
        top: 100%;
      
        left: 0;
        right: 0;
        background: var(--bg-header);
        flex-direction: column;
        padding: 20px;
      margin: 0;
      width:100%;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        gap: 15px;
        z-index: 999;
    }

    #nav-menu.active {
        display: flex !important;
    }

    .header-actions {
        order: 1;
        gap: 8px;
    }

    .mobile-menu-btn {
        display: block !important;
        order: 2;
    }

    .sign-in {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
}

/* تحسينات إضافية للموبايل الصغير */
@media (max-width: 480px) {
    header {
        padding: 12px 15px;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .logo img {
        width: 40px;
        height: 40px;
    }
    
    .mobile-menu-btn {
        font-size: 1.3rem;
    }
    
    .sign-in {
        padding: 5px 8px;
        font-size: 0.85rem;
    }
}


/* ───────────── الفوتر ───────────── */
footer {
    background: var(--bg-footer);
    color: var(--cr-footer-t1);
    padding: 60px 0 30px;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: white;
}

.footer-about p {
    color: var(--cr-footer-t2);
    margin-bottom: 20px;
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
      color: var(--cr-footer-social);
    background: var(--bg-footer-social);

    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
     background: var(--cr-footer-social);
    color: var(--bg-footer-social);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    color: var(--cr-footer-copy);
    border-top: 1px solid var(--cr-footer-divider);
    font-size: 0.9rem;
}