﻿/* فایل CSS تمیز و کامل */

body {
    font-family: sans-serif;
}

/* فرم و جستجو */
header {
    padding: 1rem;
    background: #f2f2f2;
}

#searchContainer {
    padding: 1rem;
    background: #e9ecef;
}

form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
}

    form input,
    form select {
        padding: 0.5rem;
    }

    form .button-row,
    form button {
        grid-column: 1 / -1;
    }

/* کانتینر فایل‌ها */
#filesContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

/* کارت فایل - حالت پیش‌فرض دسکتاپ */
.file-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

    /* لینک داخل کارت - همیشه فلکس */
    .file-card a {
        display: flex;
        flex-direction: column;
        text-decoration: none;
        color: white;
        width: 100%;
    }

/* تصویر و شمارنده */
.image-wrapper {
    position: relative;
    display: block;
}

.file-thumbnail {
    width: 100%;
    display: block;
    object-fit: cover;
    border-radius: 0;
    height: 200px;
}
.small-icon {
    width: 200px;
    display: block;
    margin: 0 auto;
}

/*.file-thumbnail {
    width: 300px;*/ /* یا 32px اگر خیلی کوچیک می‌خوای */
    /*height: auto;
    opacity: 0.9;
    display: block;
    object-fit: cover;
    border-radius: 0;
}*/


.image-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* بخش جزئیات */
.file-details {
    color:white;
    padding: 0.75rem;
}

/* دکمه‌های اکشن */
.file-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
    margin: 0.5rem 0;
    padding: 0 0.75rem;
}

/* هدر */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: rtl;
}

/* اسلایدر (در صورت استفاده) */
.swiper-container {
    position: relative;
    width: 100%;
    height: 300px;
}

.swiper-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.swiper-pagination {
    bottom: 10px !important;
}

#pagination {
    display: flex;
    justify-content: center; /* وسط چین افقی */
    align-items: center; /* وسط چین عمودی در صورت نیاز */
    gap: 0.25rem; /* فاصله بین دکمه‌ها */
    margin-top: 1rem; /* فاصله از محتوای بالا */
}


/*@media (max-width: 600px) {*/
    /* کارت‌ها بزرگ‌تر و بدون حاشیه زیاد */

    /*#filesContainer {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
        grid-template-columns: 1fr;*/ /* فقط یک ستون کامل بگیره */
        /*gap: 0.5rem;*/ /* کمی فاصله بین کارت‌ها */
    /*}

    .file-card {
        width: 100%;
        margin: 0 auto;
        border-radius: 6px;
    }
    .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }*/

    /* فرم جستجو دو ستونه */
    /*form {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

        form .button-row,
        form button {
            grid-column: 1 / -1;
        }

    #searchContainer {
        padding: 0.5rem;
    }*/
    /*/////////////////*/

    /*.file-card {
        flex-direction: row;
        align-items: flex-start;
        flex-wrap: wrap;*/ /* این خط اضافه */
    /*}

        .file-card a {
            flex-direction: row;
            flex: 1 1 100%;*/ /* این باعث می‌شود لینک همیشه یک سطر را بگیرد */
        /*}

    .file-thumbnail {
        width: 90px;
        height: 90px;
        margin: 0.5rem;
        border-radius: 4px;
        flex-shrink: 0;
    }

    .file-details {
        padding: 0.5rem;
        flex: 1;
    }

    .file-actions {
        flex-direction: row;*/ /* ردیفی بماند */
        /*justify-content: start;
        gap: 0.25rem;
        margin: 0.25rem 0;
        padding: 0 0.5rem;
        flex: 1 1 100%;*/ /* دکمه‌ها هم یک سطر کامل بگیرند */
    /*}
}*/

.file-actions > * {
    flex: 1 1 0;
    text-align: center;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.phone {
    color: blue;
    font-weight: 500;
    cursor: pointer; /* نشانگر دست */
}

.phone:hover {
        text-decoration: underline;
    }



/* =========================
   File Card - Glassy Theme
========================= */


.file-card {
    background: rgba(20, 30, 55, 0.85); /* سورمه‌ای شیشه‌ای */
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    /*backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);*/
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    /*color: #e5e7eb;*/ /* رنگ متن پیش‌فرض */
    /*color: #e5e7eb;*/ /* رنگ متن پیش‌فرض */
}

    /* تمام متن‌های داخل کارت */
   /* .file-card * {
        color: white;
    }*/

    .file-card,
    .file-card p,
    .file-card span,
    .file-card h5,
    .file-card a {
        color: white;
    }

.file-details h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.file-details a {
    color: white;
   /* font-weight: 600;
    margin-bottom: 0.25rem;*/
}

.file-card .btn-soft {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

    .file-card .btn-soft:hover {
        background-color: rgba(255, 255, 255, 0.18);
        border-color: rgba(255, 255, 255, 0.4);
        color: white;
    }