﻿.blog-page {
    background-color: #0D1214;
}

.blog-container {
    width: 100%;
    max-width: 1244px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 50px;
    padding: 120px 24px 60px 24px;
}

.blog-hero-container {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 12px;
}

.blog-item {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    gap: 10px;
    text-align: center;
    padding: 12px 24px;
    height: 280px;
}

.blog-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgb(0 0 0 / .2) 0, rgb(0 0 0 / .65) 100%);
    width: 100%;
    height: 100%;
    z-index: -1;
}

.blog-item-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://www.mehrlc.ir/wp-content/uploads/2023/11/New-Project-2.jpg");
    background-size: cover;
    transition: all 0.5s;
    z-index: -2;
}

.blog-item:hover .blog-item-image {
    transform: scale(1.1);
}

.blog-item-tags-container {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.blog-item-tag {
    font-size: 12px;
    color: black;
    font-weight: 600;
    padding: 4px 8px;
    line-height: 18px;
    background-color: var(--base-color);
}

.blog-item-title {
    font-size: 17px;
    font-weight: 900;
    color: white;
    line-height: 24px;
}

.blog-detail-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 auto;
    width: 100%;
    max-width: 50%;
    color: white;
    font-size: 12px;
    line-height: 20px;
}

.blog-categories-container {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.blog-categories-title {
    font-size: 18px;
    color: white;
    font-weight: 500;
    margin: 0;
}

.blog-categories-items {
    font-size: 14px;
    color: #a0a0a0;
    border: 1px solid #a0a0a0;
    border-radius: 20px;
    padding: 4px 24px;
    transition: all 0.5s;
    cursor: pointer;
}

.blog-categories-items:hover {
    background-color: var(--base-color);
    color: black;
    border: 1px solid var(--base-color);
}

.blog-main-container {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 12px;
}

.blog-main-container .blog-item::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    width: 100%;
    height: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: -1;
    transition: all 0.5s;
}

.blog-main-container .blog-item:hover::after {
    height: 40%;
}


@media screen and (min-width: 768px) {
    .blog-hero-container {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        grid-template-rows: repeat(2, minmax(0, 1fr));
    }

    .blog-hero-container .blog-item:nth-child(1) {
        grid-column: span 4;
        grid-row: span 2;
        height: 500px;
    }

    .blog-hero-container .blog-item:nth-child(2),
    .blog-hero-container .blog-item:nth-child(3) {
        grid-column: span 2;
        height: 244px;
    }

    .blog-hero-container .blog-item-title {
        font-size: 22px;
        line-height: 30px;
    }

    .blog-main-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (min-width: 1280px) {
    .blog-main-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Blog Details Styles */

.blog-content-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.blog-main {
    width: 100%;
}

.blog-hero-section {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: end;
    height: 450px;
    padding: 24px;
    border-radius: 6px;
    font-size: 28px;
    line-height: 40px;
    color: white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.blog-details-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-block: 14px;
    font-size: 14px;
    font-weight: 500;
    color: #6790ae;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.blog-suggestion-section {
    display: flex;
    flex-direction: column;
    gap: 3%;
}

.blog-suggestion-title {
    color: white;
    font-size: 32px;
    line-height: 48px;
}

.blog-suggestion-wrapper {
    max-width: 321px;
}

.blog-faq-section {
    margin-top: 3%;
}

.blog-faq-title {
    color: white;
    font-size: 32px;
    line-height: 48px;
}

.blog-accordion-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    font-size: 18px;
}

.blog-sidebar {
    width: 100%;
}

.blog-banner-section {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.blog-banner-img {
    border-radius: 6px;
}

.blog-categories-title {
    font-size: 32px;
    line-height: 48px;
    padding-bottom: 7px;
    border-bottom: 2px solid #dddddd;
    margin-top: 28px;
    margin-bottom: 21px;
}

.blog-categories-items-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-inline: 4px;
}

.blog-categories-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.blog-categories-label {
    font-size: 14px;
    border: 1px solid #dddddd;
    border-radius: 5px;
    padding-inline: 8px;
}

.blog-categories-count {
    font-size: 18px;
}

.blog-popular-title {
    font-size: 32px;
    line-height: 48px;
    padding-bottom: 7px;
    border-bottom: 2px solid #dddddd;
    margin-top: 28px;
    margin-bottom: 21px;
}

.blog-popular-items-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.blog-popular-item {
    display: flex;
    gap: 14px;
}

.blog-popular-item-img {
    width: 64px;
    height: 64px;
}

.blog-popular-item-detail {
    font-size: 12px;
    line-height: 17px;
    margin-bottom: 0;
}

.blog-popular-item-label {
    font-size: 15px;
    line-height: 20px;
    margin-bottom: 4px;
}

.blog-tags-title {
    font-size: 32px;
    line-height: 48px;
    padding-bottom: 7px;
    border-bottom: 2px solid #dddddd;
    margin-top: 28px;
    margin-bottom: 21px;
}

.blog-tags-items-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.blog-tags-item {
    padding: 6px 12px;
    border: 1px solid #dddddd;
    border-radius: 25px;
    font-size: 12px;
    line-height: 18px;
}

@media screen and (min-width: 768px) {
    .blog-content-container {
        flex-direction: row;
    }

    .blog-sidebar {
        min-width: 310px;
        max-width: 310px;
        position: sticky;
        top: 200px;
    }

    .blog-sidebar-content {
        position: sticky;
        top: 80px;
        inset: auto;
    }

    .blog-banner-section {
        display: flex;
    }
}


@media screen and (min-width: 998px) {
    .blog-suggestion-wrapper {
        max-width: 642px;
    }
}

@media screen and (min-width: 1340px) {
    .blog-suggestion-wrapper {
        max-width: 963px;
    }
}