﻿/* بخش اصلی سرویس‌ها */
.service-section {
    background: linear-gradient(180deg, #fdfdfd, #f7f9fc);
    padding: 60px 20px;
    text-align: center
}

.service-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* عنوان با border */
.section-title {
    font-size: 28px;
    font-weight: bold;
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 3px solid #0077b6; /* همون border زیر عنوان */
    color: #333;   
}

.section-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
}

/* گرید کارت‌ها */
.service-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr); /* پیش‌فرض 3 تایی */
}

    /* حالت 1 کارت → تک ستون */
    .service-grid:has(> .service-card:only-child) {
        grid-template-columns: 1fr;
    }

    /* حالت 2 کارت → دو ستون */
    .service-grid:has(> .service-card:nth-child(2):last-child) {
        grid-template-columns: repeat(2, 1fr);
    }

    /* حالت 3 کارت → سه ستون (پیش‌فرض) */

    /* حالت 4 کارت → دو ردیف 2×2 */
    .service-grid:has(> .service-card:nth-child(4):last-child) {
        grid-template-columns: repeat(2, 1fr);
    }

    /* حالت 5 کارت → ردیف اول 3 تا + ردیف دوم 2 تا */
    .service-grid:has(> .service-card:nth-child(5):last-child) {
        grid-template-columns: repeat(3, 1fr);
    }

        .service-grid:has(> .service-card:nth-child(5):last-child) > .service-card:nth-child(n+4) {
            grid-column: span 1; /* دو تا کارت آخر توی ردیف دوم */
        }

    /* حالت 6 کارت → 3+3 */
    .service-grid:has(> .service-card:nth-child(6):last-child) {
        grid-template-columns: repeat(3, 1fr);
    }


.service-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .service-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 22px rgba(0,0,0,0.12);
    }

    .service-card img {
        width: 100%;
        height: 250px;
        object-fit: cover;
        display: block;
    }

    .service-card h3 {
        font-size: 18px;
        margin: 12px;
        color: #0077b6;
    }

    .service-card p {
        font-size: 14px;
        color: #555;
        margin: 0 15px 18px;
        line-height: 1.7;
/*        text-align: justify;*/
        transition: all 0.3s ease;
        opacity: 0.9;
    }

    /* هاور کارت → متن کمی پررنگ‌تر + سایه ملایم */
    .service-card:hover p {
        color: #222;
        opacity: 1;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
        transform: scale(1.02);
    }

    /******************/
.page-title {
    font-size: 2rem;
    font-weight: bold;
    background-color: #f8f9fa;
    border-color: #004080 !important; /* سرمه‌ای */
    color: #004080; /* متن هم سرمه‌ای */
}


.slider-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 120px;
    opacity: 0;
}

    /* وقتی کلاس show اضافه شود، افکت اجرا می‌شود */
    .slider-icon.show {
        animation: fadeScale 0.6s forwards;
    }

@keyframes fadeScale {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.1);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/****************/

.textJustify{
    text-align:justify ;
}

/**************/
/* حالت اولیه: خارج از دید */
.reveal {
    opacity: 0;
    transform: translateX(-80px);
    transition: all 0.8s ease-out;
}

    /* وقتی وارد دید می‌شود */
    .reveal.visible {
        opacity: 1;
        transform: translateX(0);
        padding:10px;
        margin:20px;
    }

    /* اگر بخوای از چپ بیاد */
    /*.reveal.left {
        transform: translateX(-80px);
    }*/
