/* إعدادات عامة */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* تصميم الهيدر */
header {
    background: linear-gradient(135deg, #1e3a8a, #2f855a);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
   /* direction: ltr; /* الاتجاه الافتراضي للغة الإنجليزية */
}

header .logo {
    max-height: 70px;
    width: auto;
}

header .menu-toggle {
    display: none; /* إخفاء زر القائمة افتراضيًا */
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    /*margin-left: auto; /* دفع زر القائمة إلى الجانب الأيمن */
}

/* تصميم القائمة */
header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* عرض القائمة بشكل أفقي */
    gap: 15px;
}

header nav ul li {
    margin: 0;
}

header nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    padding: 5px 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header nav ul li a:hover {
    background-color: white;
    color: #1e3a8a;
    border-radius: 5px;
}

header nav ul li a.active {
    background-color: #2f855a;
    color: white;
    border-radius: 5px;
}

/* تصميم القائمة المنسدلة */
header .dropdown-menu {
    display: none; /* إخفاء القائمة افتراضيًا */
    position: absolute;
    top: 100%;
    right: 0;
    background: linear-gradient(45deg, #1e3a8a, #2f855a);
    width: 100%;
    padding: 10px 0;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

header .dropdown-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

header .dropdown-menu ul li a {
    color: white;
    text-decoration: none;
    padding: 10px;
    width: 90%;
    text-align: center;
    transition: background-color 0.3s ease;
}

/* تنسيق الرابط النشط في القائمة المنسدلة */
header .dropdown-menu ul li a.active {
    color: white;
    background-color: #2f855a;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header .dropdown-menu ul li a:hover {
    background-color: #1e3a8a;
    border-radius: 5px;
    color: white;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header .dropdown-menu.active {
    display: block; /* عرض القائمة عند التفعيل */
}

.lang-switch {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    
}

.lang-switch.en {
    background-color: green;
    
    color: white;
}

.lang-switch.ar {
    background-color: #1d10a9;
    color: white;
}

/* تأثير hover لزر اللغة */
.lang-switch.ar:hover {
    background-color: #3252bb; /* لون مختلف عند الوقوف عليه */
    transition: background-color 0.50s ease-out;
}

.lang-switch.en:hover {
    background-color: #45a049; /* لون مختلف عند الوقوف عليه */
    transition: background-color 0.50s ease-out;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    justify-items: center;
}

/* Category Card Styling */
.category-card {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 250px;
    cursor: pointer;
}

/* Category Image Styling */
.category-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Card Content */
.category-card h3 {
    font-size: 1.2rem;
    color: #333;
    margin: 10px 0;
    padding: 0 10px;
}

/* Hover Effect */
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    background: #e7f5ff; /* Highlight color on hover */
}



.product-image {
    width: 50%;
    height: 10%;
    object-fit: cover;
    border-radius: 10px; /* زوايا مستديرة */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* ظل خفيف */
}

.product-card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.product-card p {
    margin: 5px 0;
    font-size: 1rem;
    color: #333;
}

.price {
    font-weight: bold;
    color: #2f855a;
    margin: 10px 0;
}

/* Buy Button Styling */
.buy-btn {
    background-color: #1e3a8a;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.buy-btn:hover {
    background-color: #2f855a;
}

.back-button {
    background-color: #4CAF50; /* Green */
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 10px 2px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #45a049;
}

/* تصميم متجاوب للشاشات الصغيرة */
@media (max-width: 768px) {
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 25px 20px;
    }

    header .logo {  
        position: absolute; /* لجعل الشعار في المنتصف */
        left: 50%;
        transform: translateX(-50%); /* توسيط الشعار بشكل مثالي */
        max-height: 70; /* حجم مناسب للشعار */
        width: auto; /* الحفاظ على النسبة الأصلية للشعار */
        
    }

    header .menu-toggle {
        display: block; /* إظهار زر القائمة */
        position: absolute;
        top: 50%; /* تمركز عموديًا */
        transform: translateY(-50%); /* تصحيح الموضع العمودي */
    }

    /* وضع زر القائمة على اليمين افتراضيًا */
    header[lang="en"] .menu-toggle {
        left: 10px;
    }

    /* وضع زر القائمة على اليسار إذا كانت اللغة العربية */
    header[lang="ar"] .menu-toggle {
        right: 10px;
    }

    nav ul.desktop-menu {
        display: none; /* إخفاء القائمة الأفقية */
    }

    header .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        background: linear-gradient(45deg, #1e3a8a, #2f855a);
        color: black;
        width: 100%;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    header .dropdown-menu.active {
        display: block;
    }

    header .dropdown-menu ul {
        list-style: none;
        margin: 0;
        padding: 0;
        text-align: center;
    }

    header .dropdown-menu ul li {
        padding: 10px 0;
    }
    

}

@media (min-width: 769px) {
    header .menu-toggle {
        display: none; /* إخفاء زر القائمة في الشاشات الكبيرة */
    }

    header nav ul.desktop-menu {
        display: flex; /* عرض القائمة بشكل أفقي للشاشات الكبيرة */
    }

    header .dropdown-menu {
        display: none; /* إخفاء القائمة المنسدلة في الشاشات الكبيرة */
    }
}

/* تصميم القسم الرئيسي */
main {
    padding: 20px;
    text-align: center;
}

main h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

main p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* تنسيق قسم البطل (Hero Section) */
.hero {
    position: relative;
    width: auto;
    height: auto; /* يجعل القسم يملأ ارتفاع الشاشة بالكامل */
    background: url('hero-image.webp') no-repeat center center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5); /* خلفية نصف شفافة */
    border-radius: 10px; /* زوايا مستديرة */
}

.hero p {
    font-size: 1.5rem;
    max-width: 600px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5); /* خلفية نصف شفافة */
    border-radius: 10px; /* زوايا مستديرة */
}

/* تصميم الفوتر */
footer {
    text-align: center;
    padding: 10px;
    background-color: #1e3a8a;
    color: rgb(255, 255, 255);
}
