/*
Theme Name: super barq
*/

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #F5F5F5; 
    color: #333333; 
}

.site-header {
    background: #1E2A38; 
    color: #fff;
    padding: 10px 0;
    height: <?php echo get_theme_mod('super_barq_header_height', '70px'); ?>; /* دمج ارتفاع الهيدر من الإعدادات */
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo a {
    color: #fff;
    text-decoration: none;
    font-size: 24px;
}

.main-navigation {
    display: flex;
}

.nav-menu {
    list-style: none;
    display: flex;
}

.nav-menu li {
    position: relative;
    margin-left: 20px;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    padding: 10px;
}

.nav-menu a:hover {
    color: #4A90E2; 
}

/* تعديلات على القائمة الرئيسية */
.menu-toggle { 
    display: none;
}

.menu-icon { 
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-icon span {
    background: #fff;
    height: 3px;
    width: 25px;
    margin: 4px 0;
}

/* إخفاء القائمة الفرعية بشكل افتراضي */
.sub-menu {
    display: none;
    position: absolute;
    background: #444;
    padding: 10px;
    list-style: none;
}

/* إظهار القائمة الفرعية عند التحويم أو التركيز */
.menu-item-has-children:hover .sub-menu,
.menu-item-has-children:focus-within .sub-menu {
    display: block;
}

/* تنسيق السهم */
.nav-menu .menu-item-has-children > a::after {
    content: "🔽";
    margin-left: 5px;
    font-size: 12px; 
    color: #fff; 
}

/* إظهار السهم عند التحويم */
.nav-menu .menu-item-has-children:hover > a::after {
    color: #FF6F00; 
}

/* تنسيق القائمة الفرعية */
.sub-menu li {
    margin: 5px 0;
}

.sub-menu a {
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    display: block;
}

.sub-menu a:hover {
    color: #FF6F00; 
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 10px; /* لجعل الصورة بزوايا مستديرة */
}

.entry-header {
    text-align: center;
}

.entry-title a {
    font-size: 1.5rem;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-title a:hover {
    color: #0073aa; /* لون يتناسق مع التصميم */
}

.entry-content {
    font-size: 1rem;
    color: #666;
    margin-top: 10px;
    text-align: justify;
}


article {
    background-color: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.post-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}


.pagination {
    text-align: center;
    margin: 20px 0;
}

.pagination a {
    color: #333;
    text-decoration: none;
    margin: 0 5px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.pagination .current {
    background-color: #333;
    color: #fff;
    border: 1px solid #333;
}



@media (max-width: 768px) {
    .main-navigation {
        display: none; /* إخفاء القائمة الرئيسية بشكل افتراضي */
        flex-direction: column;
        position: absolute;
        top: 60px; 
        left: 0;
        width: 100%;
        background: #1E2A38; 
    }

    .nav-menu {
        flex-direction: column; 
    }

    .nav-menu li {
        margin: 10px 0; 
    }

    .menu-toggle:checked + .menu-icon + .main-navigation { 
        display: flex; 
    }

    .menu-icon {
        display: flex; 
    }

    /* تنسيق القائمة الفرعية الثانية على الموبايل */
    .sub-menu .sub-menu {
        left: 100%; 
        top: 0;
        margin-left: 10px; 
    }

    .sub-menu {
        padding: 15px; 
        /* إخفاء القائمة الفرعية بشكل افتراضي باستخدام clip-path */
        clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%); 
        transition: clip-path 0.3s ease-in-out; 
    }

    .menu-item-has-children:hover > .sub-menu, 
    .menu-item-has-children:focus-within > .sub-menu { 
        /* إظهار القائمة الفرعية باستخدام clip-path */
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); 
    }

    /* إضافة أيقونة/سهم للقوائم الفرعية */
    .menu-item-has-children > a::after {
        content: "▶"; 
        margin-left: 5px;
    }

    /* إخفاء القائمة الرئيسية عند النقر في مكان فارغ */
    .site-content:not(:focus-within) .menu-toggle:checked ~ .main-navigation {
        display: none;
    }
}