/* =========================================================
   پنجره نتایج جستجو
   ========================================================= */

.search-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;

    background: rgba(0, 0, 0, 0.75);

    padding: 40px 20px;
    overflow-y: auto;

    box-sizing: border-box;
}

.search-modal.active {
    display: block;
}


/* =========================================================
   کادر اصلی نتایج
   ========================================================= */

.search-modal-content {
    position: relative;

    width: 95%;
    max-width: 1200px;

    margin: 20px auto;
    padding: 40px 20px;

    background-color: #d1d1d1;

    border-radius: 8px;

    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);

    box-sizing: border-box;
}


/* =========================================================
   عنوان پنجره
   ========================================================= */

.search-modal-title {
    margin: 0 0 30px;

    text-align: center;

    color: #fff;

    font-family: 'yekanb';
    font-size: 24px;
}


/* =========================================================
   دکمه بستن
   ========================================================= */

.search-modal-close {
    position: absolute;

    top: 12px;
    left: 18px;

    width: 35px;
    height: 35px;

    border: none;

    background: transparent;

    color: #fff;

    font-size: 28px;

    cursor: pointer;
}


/* =========================================================
   کانتینر کارت‌های نتایج
   ========================================================= */

.search-results-container {
    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 20px;
}


/* =========================================================
   کارت نتیجه جستجو
   هماهنگ با کارت‌های اصلی
   ========================================================= */

.search-result-card {
    flex: 0 0 calc(25% - 20px);
    max-width: calc(25% - 20px);

    background-color: #2c2c2c;

    border-radius: 8px;

    overflow: hidden;

    cursor: pointer;

    transition: all 0.4s ease-in-out;

    display: flex;
    flex-direction: column;

    position: relative;

    color: #ffffff;

    text-align: center;
}


/* =========================================================
   کادر عکس
   ========================================================= */

.search-result-cover-container {
    width: 100%;

    height: 0;

    padding-top: 140%;

    position: relative;

    overflow: hidden;

    display: flex;

    justify-content: center;
    align-items: center;

    background-color: #333;
}


/* =========================================================
   عکس
   ========================================================= */

.search-result-cover {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition: transform 0.4s ease-in-out;
}


/* =========================================================
   لایه اطلاعات روی عکس
   ========================================================= */

.search-result-info {
    padding-top: 40px;
    padding-left: 10px;
    padding-right: 10px;

    background-color: rgba(0, 0, 0, 0.7);

    position: absolute;

    bottom: 0;
    left: 0;

    width: 100%;

    height: 0;

    overflow: hidden;

    transition: height 0.4s ease-in-out;

    display: flex;

    flex-direction: column;

    justify-content: flex-start;

    align-items: center;

    box-sizing: border-box;
}


/* =========================================================
   عنوان اول
   نام انگلیسی
   ========================================================= */

.search-result-title {
    font-family: Times, serif;

    font-size: 1.1em;

    font-weight: normal;

    color: #fff;

    margin-top: -30px;

    margin-bottom: 4px;

    line-height: 1.3;

    white-space: normal;
}


/* =========================================================
   عنوان دوم
   نام فارسی
   ========================================================= */

.search-result-title2 {
    font-family: 'cinema', Times, serif;

    font-size: 1.7em;

    font-weight: normal;

    color: #fff;

    margin-top: 0;

    margin-bottom: 8px;

    line-height: 1.3;

    white-space: normal;
}


/* =========================================================
   جزئیات
   ========================================================= */

.search-result-details {
    width: 100%;
}


.search-result-details p {
    font-family: 'yekanm';

    font-size: 0.9em;

    margin-top: 0;

    margin-bottom: 0;

    line-height: 1.2;

    text-align: right;
}


.search-result-details p strong {
    font-family: 'yekank';

    font-size: 0.9em;

    color: #ffffff;

    display: inline-block;

    margin-left: 5px;

    font-weight: bolder;
}


/* =========================================================
   Hover کارت
   ========================================================= */

.search-result-card:hover {
    transform: translateY(-5px);

    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}


.search-result-card:hover .search-result-info {
    height: 80%;
}


.search-result-card:hover .search-result-cover {
    transform: scale(1.05);
}


/* =========================================================
   دستگاه‌هایی که Hover واقعی دارند
   ========================================================= */

@media (hover: hover) {

    .search-result-card:hover .search-result-info {
        height: 80%;
    }

}


/* =========================================================
   تبلت
   ========================================================= */

@media (max-width: 768px) {

    .search-result-card {
        flex: 1 1 45%;
        max-width: 45%;
    }

    .search-result-cover-container {
        padding-top: 140%;
    }

    .search-result-card:hover .search-result-info {
        height: 80%;
    }

    .search-result-card:hover .search-result-cover {
        transform: scale(1);
    }

    .search-result-card:hover {
        transform: translateY(0);

        box-shadow: none;
    }

}


/* =========================================================
   موبایل
   ========================================================= */

@media (max-width: 480px) {

    .search-result-card {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .search-result-cover-container {
        padding-top: 140%;
    }

    .search-result-card:hover .search-result-info {
        height: 80%;
    }

}


/* =========================================================
   دستگاه‌های لمسی
   ========================================================= */

@media (hover: none) {

    .search-result-card:focus-within .search-result-info {
        height: 100%;
    }

}