/* ✅ ساختار کلی صفحه جستجو */
.search-exercises-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1300px;
    margin: auto;
    padding: 25px;
    gap: 25px;
    align-items: flex-start;
    overflow-x: hidden; /* جلوگیری از اسکرول افقی */
}

/* ✅ بهینه‌سازی سایدبار برای موبایل */
.search-sidebar {
    flex: 1;
    text-align: center;
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease-in-out;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: auto; /* جلوگیری از بزرگ شدن بیش از حد */
}

.search-sidebar h2 {
    font-size: 22px;
    text-align: center;
    color: #000000;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffe500;
}

/* ✅ فیلد جستجو */
#search-query {
    width: 100%;
    height: 50px;
    margin-bottom: 15px;
    border: 1px solid #1f1f1f;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #999999; /* پیش‌فرض کمرنگ */
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* ✅ تغییر رنگ هنگام تایپ */
#search-query:focus,
#search-query:not(:placeholder-shown) {
    color: #000000;
}

#search-query::placeholder {
    color: #999999;
}

.search-sidebar select {
    width: 100%;
    height: 40px;
    margin-bottom: 15px;
    border: 1px solid #888;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    color: #000000;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

/* ✅ دکمه جستجو */
.search-sidebar button {
    width: 100%;
    padding: 12px;
    border: none;
    background: #ffe500;
    color: #000000;
    font-size: 17px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.search-sidebar button:hover {
    background: #000000;
    color: #ffe500;
    transform: scale(1.05);
}

/* ✅ دکمه ریست */
#reset-btn {
    background: #fafafa;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: red;
    margin-top: 10px;
    text-align: center;
    display: block;
    font-weight: bold;
}

#reset-btn:hover {
    color: darkred;
}

/* ✅ کانتینر بخش نتایج */
.search-results-container {
    flex: 3;
    min-height: 550px;
    width: 100%;
    min-width: 320px; /* جلوگیری از کوچک شدن بیش از حد */
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
}

/* ✅ لیست نتایج جستجو */
.pelank-gym-exercise-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ✅ کارت‌های حرکات ورزشی */
.pelank-gym-exercise-item {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pelank-gym-exercise-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* ✅ تصویر + عنوان تمرین */
.exercise-top-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ✅ تصویر */
.exercise-thumbnail {
    flex: 0 0 100px;
}

.exercise-thumbnail img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

/* ✅ عنوان تمرین */
.archive-exercise-title {
    flex-grow: 1;
}

.archive-exercise-title h2 {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.archive-exercise-title h2 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.archive-exercise-title h2 a:hover {
    color: #ffe500;
}

/* ✅ متادیتا و دکمه مشاهده تمرین */
.exercise-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

/* ✅ اطلاعات تمرین */
.exercise-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #666;
}
/* ✅ رنگ اختصاصی برای هر آیکون */
.exercise-meta .fa-burn { color: #FF5722; } /* سختی */
.exercise-meta .fa-check-square { color: #0ddf1b; } /* عضله */
.exercise-meta .fa-dumbbell { color: #3e11df; } /* تجهیزات */
/* ✅ دکمه مشاهده تمرین */
.exercise-button {
    flex: 0 0 auto;
}

.pelank-gym-view-button {
    display: inline-block;
    background: #ffe500;
    color: #222;
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease, color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pelank-gym-view-button:hover {
    background: #222;
    color: #ffe500;
}

/* ✅ ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .exercise-top-row {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
    }

    .exercise-meta {
        display: flex;
        flex-direction: column; /* ✅ نمایش هر ویژگی در یک خط جداگانه */
        align-items: flex-start; /* ✅ تنظیم به راست‌چین */
        text-align: right;
        width: 100%;
    }

    .exercise-meta p {
        display: flex; /* ✅ نمایش برچسب و مقدار در یک خط */
        justify-content: flex-start; /* ✅ برچسب به سمت راست */
        align-items: center;
        gap: 5px; /* فاصله بین برچسب و مقدار */
        margin-bottom: 2px; /* فاصله بین خطوط */
    }

    .exercise-meta p strong {
        font-weight: bold; /* ✅ فقط برچسب را بولد می‌کند */
        color: #222; /* رنگ قوی‌تر برای تأکید */
    }

    .exercise-bottom-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .pelank-gym-view-button {
        width: 100%;
        text-align: center;
    }
}


/* ✅ استایل متن زیر سایدبار */
.sidebar-footer {
    text-align: center;
    font-size: 14px;
    color: #777;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-weight: bold;
}

.sidebar-footer .pelank-brand {
    color: #ffe500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.sidebar-footer .pelank-brand:hover {
    color: #000000;
}
/* ✅ صفحه‌بندی */
.pelank-gym-pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination-button {
    display: inline-block;
    background: #f1f1f1;
    border: 1px solid #ccc;
    padding: 8px 12px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pagination-button:hover {
    background: #ffe500;
    color: #222;
}

/* ✅ ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .search-exercises-container {
        flex-direction: column;
        width: 100%;
        padding: 10px; /* کاهش حاشیه کلی */
    }

    .search-sidebar {
        width: 100%;
        max-width: 100%;
        padding: 15px; /* کاهش فضای داخلی برای جلوگیری از بیرون زدن */
        margin: 0 auto;
        box-sizing: border-box;
    }

    .search-results-container {
        width: 100%;
        min-width: auto;
        margin-top: 0;
    }
    .search-result {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .search-result img {
        margin-left: 0;
        margin-bottom: 10px;
    }

    .search-result-info {
        text-align: center;
    }
}

/* ✅ جلوگیری از اسکرول افقی */
body {
    overflow-x: hidden;
}
