﻿/* استایل عنوان بخش */
.section-title {
    color: #BE0032;
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    margin: 30px 0;
    border-bottom: 3px solid #BE0032;
    display: inline-block;
    padding-bottom: 10px;
}

/* استایل کانتینر دسته‌بندی */
.category-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 450px; /* ارتفاع مناسب */
}

/* استایل تصویر دسته‌بندی */
.category-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    filter: brightness(80%);
}

/* افکت هاور روی تصویر */
.category-container:hover .category-img {
    transform: scale(1.05); /* بزرگ‌شدن عکس هنگام هاور */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* استایل لایه متنی */
.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center; /* قرار دادن متن در مرکز عمودی */
    align-items: center; /* قرار دادن متن در مرکز افقی */
    color: white;
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4); /* پس‌زمینه‌ی نیمه شفاف */
    transition: background 0.3s ease, opacity 0.3s ease;
    opacity: 1; /* نمایش دائمی */
}

/* تغییر پس‌زمینه در هاور */
.category-container:hover .category-overlay {
    background: rgba(0, 0, 0, 0.6);
}

/* استایل عنوان */
.category-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7); /* سایه متن */
    opacity: 1; /* نمایش دائمی */
}

/* استایل توضیحات */
.category-description {
    font-size: 1.2rem;
    line-height: 1.5;
    opacity: 0; /* توضیحات به‌صورت پیش‌فرض مخفی */
    transition: opacity 0.3s ease;
}

/* نمایش توضیحات فقط در هاور */
.category-container:hover .category-description {
    opacity: 1;
}

/* استایل کاروسل تصاویر */
.carousel-item img {
    width: 100%;
    height: 450px; /* افزایش ارتفاع */
    object-fit: cover;
    border-radius: 10px;
}

/* متن دسته‌بندی در کاروسل */
.category-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 1rem;
    opacity: 1; /* نمایش دائمی متن */
}

.articles-section {
    margin-top: 30px;
}

.article-item {
    margin-bottom: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.article-img {
    width: 100%;
    height: 200px; /* ارتفاع ثابت تصاویر */
    object-fit: cover; /* برش تصاویر به اندازه مناسب */
    border-top-right-radius: 10px; /* گرد کردن فقط بالای تصویر */
    border-bottom-right-radius: 10px;
    margin-right: 0; /* حذف فاصله سمت راست */
}
.article-item > .col-md-4 {
    padding-right: 0 !important; /* حذف پدینگ ستون راست */
}

.article-title {
    font-size: 1.5rem;
    color: #BE0032;
    margin-bottom: 10px;
    font-weight: bold;
}

.article-date {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 10px;
    font-style: italic;
    direction: rtl;
}

.article-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}


.footer-text {
    background: linear-gradient(90deg, #BE0032, #8B0000); /* گرادیانت زیبا */
    color: #fff;
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* سایه نرم */
    border: 1px solid #900026; /* حاشیه ملایم */
}

.footer-text-right {
    font-size: 1.3rem;
    font-weight: bold;
    margin-right: 10px;
}

.footer-icons {
    display: flex;
    gap: 25px; /* فاصله بیشتر بین آیکون‌ها */
}


.social-icon {
    color: white; /* رنگ آیکون */
    font-size: 1.8rem; /* اندازه آیکون */
    transition: transform 0.3s ease, background-color 0.3s ease; /* انیمیشن تغییر */
    padding: 10px;
    border-radius: 50%; /* ایجاد دایره */
    background-color: transparent; /* پس‌زمینه شفاف پیش‌فرض */
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.social-icon:hover {
    color: #87ceeb; /* تغییر رنگ آیکون هنگام هاور */
    transform: scale(1.2); /* کمی بزرگ‌تر شدن آیکون */
    background-color: rgba(255, 255, 255, 0.2); /* پس‌زمینه نیمه‌شفاف هنگام هاور */
}
/* ریسپانسیو برای صفحات کوچک‌تر */
@media (max-width: 768px) {
    .article-item {
        flex-direction: column;
        align-items: center;
    }

        .article-img {
        max-width: 100%;
        border-radius: 10px 10px 0 0;
        }

    .category-container {
        height: 300px; /* کاهش ارتفاع در موبایل */
    }

    .carousel-item img {
        height: 300px; /* ارتفاع کمتر در موبایل */
    }
}
