﻿
.blog {
    padding: 40px 20px;
    background-color: #f7f9fc;
    text-align: center;
}

.blog h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.blog-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    justify-content: center;
}

.post {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 270px; /* ارتفاع ثابت دلخواه، می‌تونی تغییرش بدی */
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s ease;
}
    .post:hover {
        transform: translateY(-4px);
    }

.post-img-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.post-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.post-excerpt {
    flex-grow: 1;
    min-height: 3em; /* همون دو خط که هست */
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* محدود به 2 خط */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}


.read-more {
    margin-top: auto;
}

    .read-more:hover {
        text-decoration: underline;
    }

/* Responsive */
@media (max-width: 992px) {
    .blog-posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .blog-posts {
        grid-template-columns: 1fr;
    }
}

/*////////////////////showLearning*/

body {
    font-family: 'Vazirmatn', sans-serif;
    background: #f4faff;
    color: #333;
    line-height: 1.8;
}

h2, h3 {
    color: #3498db;
    margin-bottom: 20px;
}

.learning-container {
    max-width: 1000px;
    margin: 40px auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 30px;
}

.learning-header img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 20px;
}

.learning-shortdesc {
    margin-bottom: 30px;
    font-size: 17px;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
}

    .gallery img {
        width: 100%;
        max-width: 120px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        transition: transform 0.3s ease;
    }

        .gallery img:hover {
            transform: scale(1.05);
        }

.tabs {
    margin-top: 30px;
}

    .tabs ul {
        display: flex;
        list-style: none;
        padding: 0;
        margin: 0 0 20px;
        border-bottom: 2px solid #dbefff;
    }

        .tabs ul li {
            margin-left: 10px;
        }

            .tabs ul li a {
                padding: 10px 20px;
                display: inline-block;
                background: #eaf6ff;
                border-radius: 10px 10px 0 0;
                text-decoration: none;
                color: #2c3e50;
            }

            .tabs ul li.active a {
                background: #3498db;
                color: white;
            }

.tab-content {
    background: #fff;
    border: 1px solid #dbefff;
    border-radius: 0 0 10px 10px;
    padding: 20px;
}

.tags-layer, .author-layer {
    background: #eaf6ff;
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
}

    .tags-layer a {
        display: inline-block;
        background: #d1ecf1;
        color: #0c5460;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 13px;
        margin: 3px;
        text-decoration: none;
    }

        .tags-layer a:hover {
            background: #b3e0e9;
        }
