﻿

body {
    /*background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);*/
    min-height: 100vh;
}

.page-header {
    border-radius:5px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    padding: 20px 0 5px;
    margin-bottom: -40px;
    box-shadow: 0 5px 10px rgba(20, 23, 108, 0.3);
}

    .page-header h1 {
        color: white;
        font-weight: 700;
        font-size: 2.5rem;
        margin-bottom: 10px;
    }

    .page-header p {
        color: rgba(255, 255, 255, 0.9);
        font-size: 1.1rem;
    }

.search-filter-section {
    background: white;
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}
.main_card {
    text-align: right;
    /*text-align: justify;*/
    text-decoration: none !important;
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.2s ease;
}


.inner-loader {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* فعال شدن */
.main_card.loading .inner-loader {
    opacity: 1;
    visibility: visible;
}

/* Spinner طلایی–آبی */
.inner-loader::after {
    content: "";
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--accent-color);
    border-right-color: var(--primary-color);
    animation: spin 0.9s linear infinite;
    box-shadow: 0 0 10px var(--accent-light-color);
}

/* انیمیشن چرخش */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.row g-3 .col-4 {
    padding-right: 4px !important;
    padding-left: 4px !important;
}
.go_filtration {
    margin: auto;
    display: inline-block;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--accent-light-color);
    color: var(--title-color) !important;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.6s ease;
}
    .go_filtration:hover {
        transform: translateY(-5px);
        box-shadow: 0 2px 4px rgba(20, 23, 108, 0.15);
    }
    .go_filtration img, .be_solver img {
        margin: auto;
        width: 2.5rem;
        height: 2.5rem;
        padding: 5px;
    }


.be_solver {
    margin: auto;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--accent-light-color);
    color: var(--title-color) !important;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.6s ease;
}

    .be_solver:hover {
        transform: translateY(-3px);
        box-shadow: 0 2px 4px rgba(20, 23, 108, 0.15);
    }

.dots-loader {
    display: flex;
    justify-content: center;
    align-items: center;
}

    .dots-loader span {
        width: 10px;
        height: 10px;
        margin: 3px;
        background: #007bff;
        border-radius: 50%;
        animation: bounce 1s infinite ease-in-out;
    }

        .dots-loader span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .dots-loader span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}


.service-card {
    text-decoration: none;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.5s ease;
    border: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 12px;
}

    .service-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 5px 16px rgba(20, 23, 108, 0.15);
    }

.service-card-img {
    /*position: relative;
    overflow: hidden;
    height: 200px;*/
    background-color: var(--gray-100);
    border-radius: 4px;
    flex: 0 0 120px;
    /*height: 175px;*/
    /*margin-right: 4px;*/
    overflow: hidden;
    position: relative;
    width: 100px;
    padding: 8px;
    border-radius: 6px;
    margin: auto;

}

    .service-card-img img {
        width: 100%;
        height: 100px;
        object-fit: cover;
        transition: transform 0.6s ease;
        border-radius: 6px;
        margin-bottom: 8px;
    }

.service-card:hover .service-card-img img {
    transform: scale(1.1);
}

.service-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.service-card-body {
    padding: 10px 10px 5px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
    position: relative;
}
.service-title-box{
    height: 45px;
}
.service-title {
    color: var(--title-color);
    font-weight: 700;
    font-size: 0.9rem;
    /* margin-bottom: 15px; */
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4em;
    max-height: calc(1.4em * 2);
}

.service-meta {
    height: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 1px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 0.85rem;
}

    .meta-item i {
        color: dimgrey;
    }

.service-price {
    background: var(--accent-light-color);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.65rem;
    margin-bottom: 10px;
    width: fit-content;
}

.service-footer {
    padding: 10px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.btn-view-details {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-view-details:hover {
        background: #1a1d7e;
        transform: scale(1.05);
        color: white;
    }

.filter-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    font-weight: 600;
}

    .filter-btn:hover {
        background: #e69500;
        color: white;
    }

.pagination {
    margin-top: 40px;
}

.page-link {
    color: var(--primary-color);
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin: 0 5px;
    font-weight: 600;
}

    .page-link:hover {
        background: var(--secondary-color);
        color: var(--primary-color);
        border-color: var(--secondary-color);
    }

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

@media (max-width: 740px){
    .service-title {
        font-size: 1.2rem;
    }
    .service-card-img {
        height: 110px;
        width: 110px;
    }
    .service-price {
        font-size: 0.85rem;
    }
    .go_filtration {
        margin: auto;
        display: grid;
        height: 100%;
        font-size: 0.75rem;
    }
}