/*
Theme Name: MD Framework
Theme URI: https://ad-m.co/
Author: Deprma
Author URI: https://ad-m.co/
Description: Modular multilingual WordPress framework theme with RTL/LTR, WooCommerce, Tutor LMS and Elementor-friendly layouts.
Version: 1.0.0-rc23
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: md-framework
Domain Path: /languages
License: GNU General Public License v2 or later
*/

/** تعديل الصفحات الفردية للمقالات المخصصة **/
.md-content.md-core-content {
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    border-radius: 24px;
    padding: 10px;
}

/* التنسيق محصور تماماً وفقط داخل شبكة معرض الصور لهذا القسم */
.md-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* صندوق الصورة ضمن هذا القسم فقط */
.md-gallery-grid a {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 14px;
    overflow: hidden;
    background: #fbfcfe;
    border: 1px solid #d2d6dc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease-in-out;
    aspect-ratio: 16 / 9;
    text-decoration: none;
}

/* الصورة داخل هذا القسم فقط - تظهر بالكامل دون قص */
.md-gallery-grid a img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    padding: 8px;
    transition: transform 0.4s ease;
    height: auto !important;
}

/* تأثير المرور بالفأرة محصور في هذا القسم فقط */
.md-gallery-grid a:hover {
    transform: translateY(-4px);
    border-color: var(--md-primary, #0056b3);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.md-gallery-grid a:hover img {
    transform: scale(1.03);
}

/** نهاية تعديل الصفحات الفردية للمقالات المخصصة **/


/** تعديل الشادو خلف الشرائح الكود المختصر الذي يجلب الوسائط**/

article.md-core-card {
    /* إزالة الظل القديم أو القاسي */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    
    /* إضافة انسيابية وحواف دائرية مريحة للعين */
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04); /* حدود خفيفة جداً لزيادة الوضوح */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* تأثير جمالي عند تمرير الماوس فوق الشريحة */
article.md-core-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
}

/** نهاية تعديل الشادو خلف الشرائح الكود المختصر الذي يجلب الوسائط**/






/* =========================================================
   MD Framework — Search Results
   Reuses the existing framework cards and WooCommerce cards.
   ========================================================= */

.md-search-results-main .md-search-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 30px;
    padding: 0;
}

.md-search-results-main .md-search-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    padding: 8px 15px;
    border: 1px solid var(--md-border);
    border-radius: 999px;
    background: #fff;
    color: var(--md-heading);
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.4;
    cursor: pointer;
    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.md-search-results-main .md-search-filter-btn:hover {
    border-color: var(--md-primary);
    color: var(--md-primary);
    transform: translateY(-1px);
}

.md-search-results-main .md-search-filter-btn > span {
    display: inline-grid;
    place-items: center;
    min-width: 23px;
    height: 23px;
    padding-inline: 5px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
}

.md-search-results-main .md-search-filter-btn.is-active {
    border-color: var(--md-primary);
    background: var(--md-primary);
    color: #fff;
}

.md-search-results-main .md-search-filter-btn.is-active > span {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.md-search-results-main .md-search-section {
    min-width: 0;
    margin-block-end: 42px;
}

.md-search-results-main .md-search-section[hidden] {
    display: none !important;
}

.md-search-results-main .md-search-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 20px;
    padding-block-end: 14px;
    border-block-end: 1px solid var(--md-border);
}

.md-search-results-main .md-search-section-head h2 {
    margin: 0;
    color: var(--md-heading);
    font-size: clamp(19px, 2.3vw, 26px);
    line-height: 1.35;
}

.md-search-results-main .md-search-section-head > span {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding-inline: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--md-primary) 9%, #fff);
    color: var(--md-primary);
    font-size: 12px;
    font-weight: 800;
}

.md-search-results-main .md-search-section-grid {
    width: 100%;
    min-width: 0;
}

.md-search-results-main .md-search-section-grid .md-blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.md-search-results-main .md-search-section-grid .md-blog-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.md-search-results-main .md-search-section-grid .md-read-more {
    margin-top: auto;
}

/* WooCommerce product cards use the same layout as the shop archive. */
.md-search-results-main .md-search-products ul.products {
    margin: 0 !important;
}

.md-search-results-main .md-search-products ul.products li.product {
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (max-width: 640px) {

    .md-search-results-main .md-search-filter {
        gap: 7px;
        margin-block-end: 24px;
    }

    .md-search-results-main .md-search-filter-btn {
        gap: 6px;
        min-height: 38px;
        padding: 7px 11px;
        font-size: 12px;
    }

    .md-search-results-main .md-search-section {
        margin-block-end: 32px;
    }

    .md-search-results-main .md-search-section-head {
        margin-block-end: 15px;
    }

}
