.article-container {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 500px;
    max-width: 1600px;
    margin: 100px auto;
    gap: 20px;
}
#show-after-load {
    width: 30%;
    visibility: hidden;
}
.article-sidebar, .sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #fff;
    margin-top: 30px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.13);
    border-radius: 12px;
    border: inset 2px rgba(218, 165, 32, 0.24);
}

.article-sidebar h2 {
    margin-bottom: 15px;
}

.sidebar h2 {
    margin-bottom: 15px;
}

.article-sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.article-sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.article-sidebar a {
    padding: 5px;
    border-bottom: 1px rgba(192, 192, 192, 0.53) solid;
    text-decoration: none;
    color: #444;
    transition: color 0.3s;
    font-size: 1rem;
}

.sidebar ul li a {
    margin-top: 15px;
    padding: 5px;
    border-bottom: 1px rgba(192, 192, 192, 0.53) solid;
    text-decoration: none;
    color: #444;
    transition: color 0.3s;
    font-size: 1.2rem;
}

.article-sidebar a:hover {
    color: #009688;
}

.sidebar ul li a:hover {
    color: #009688;
}

.article-grid {
    width: 75%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.article-card {
    background: #ffffff;
    height: fit-content;
    min-height: 463px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgb(0 0 0 / 10%);
    cursor: pointer;
    transition: transform 0.3s ease;
    padding-bottom: 20px;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-card img {
    width: 100%;
    object-fit: cover;
    height: auto;
    aspect-ratio: 363/239;
}

.article-card h3 {
    font-size: 18px;
    margin: 15px;
    color: #333;
}

.article-card p {
    font-size: 14px;
    color: #666;
    margin: 0 15px 10px;
}

.article-card a {
    display: inline-block;
    color: #c6a22d;;
    text-decoration: none;
    font-weight: bold;
}

#side-wrapper {
    display: block;
    min-width: 205px;
    height: auto;
}

.article_container {
    max-width: 1400px;
    margin: 200px auto;
    padding: 2rem;
}

.article-header {
    text-align: center;
    margin-bottom: 2rem;
}

.article-header h1 {
    font-size: 2.5rem;
    color: #333;
}

.short-desc {
    font-size: 1.5rem;
    color: #666;
    margin-top: 1rem;
}

.main-image {
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 1.5rem;
    cursor: unset;
}

.article-parts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article-part-card {
    padding: 1.5rem;
    border-radius: 12px;
}

.part-title {
    font-size: 1.5rem;
    color: #444;
    margin-bottom: 1rem;
}

.part-image {
    float: left;
    aspect-ratio: 1/1;
    width: 400px;
    border-radius: 10px;
    margin-bottom: 1rem;
    margin-right: 40px;
}

.part-desc {
    font-size: 1.5rem;
    color: #555;
    white-space: pre-line;
}

#article-popular {
    font-size: 1.5rem;
    margin: 70px;
}

/*==========================================================*/
@media (max-width: 1020px) {
    .article-card {
        height: fit-content;
    }

    .drawer-body li a {
        color: black;
    }

    .drawer-body ul {
        list-style: none;
    }

    .article-grid {
        width: 90%;
    }

    .drawer-body li {
        color: black;
        text-decoration: none;
        padding: 9px 0;
        border-bottom: 1px solid rgba(117, 117, 117, 0.42) !important;
        font-size: 20px;
    }

    .mobile-top-bar button {
        color: white;
    }

    .article-container {
        margin-top: 40px;
        gap: 0;
        padding: 0;
        justify-content: center;
        width: 100%;
    }

    .drawer {
        transform: translateY(100%);
        transition: transform 0.3s ease;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        z-index: 1001;
    }

    .drawer.active {
        transform: translateY(0);
    }

    .overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    .overlay.active {
        display: block;
    }

    .mobile-top-bar {
        display: flex;
        justify-content: space-around;
        background-color: var(--dark-blue);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
    }

    .support-btn {
        bottom: 70px;
    }

    .mobile-top-bar button {
        display: flex;
        gap: 5px;
        align-items: center;
        font-size: 18px;
        background: none;
        padding: 8px 30px;
    }

    .mobile-top-bar img {
        width: 35px;
    }

    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        pointer-events: none;
        transition: 0.3s;
        z-index: 998;
    }

    .overlay.active {
        opacity: 1;
        pointer-events: all;
    }

    .drawer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: -100%;
        background: #fff;
        transition: bottom 0.3s ease;
        z-index: 9999;
        padding: 0 20px;
        max-height: 100%;
        overflow-y: auto;
    }

    .drawer.active {
        bottom: 0;
        box-shadow: 0 0 0 500px rgba(0, 0, 0, 0.63);
    }

    .drawer-full {
        height: 100%;
    }

    .drawer-half {
        height: 60%;
    }

    .sort-btn {
        font-size: 25px;
    }

    .sub-filter-panel {
        display: none;
        z-index: 1001;
        background: #fff;
        animation: slideIn 0.3s ease forwards;
    }

    @keyframes slideIn {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    .overlay {
        display: none;
        background: rgba(0, 0, 0, 0.3);
        position: fixed;
        inset: 0;
        z-index: 999;
    }

    .overlay.active {
        display: block;
    }

    #backBtn {
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        display: none; /* مخفی به صورت پیش‌فرض */
        user-select: none;
    }

    #backBtn img {
        width: 24px;
        height: 24px;
        display: block;
    }

    .drawer-body {
        flex-grow: 1;
        overflow-y: auto;
        padding: 12px 16px;
        position: relative;
    }

    #filter-main {
        display: block;
    }

    #filter-detail {
        display: none;
        height: 100%;
        flex-direction: column;
        transform: translateX(30px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        will-change: opacity, transform;
        opacity: 0;
    }

    #filter-detail.active {
        opacity: 1;
        transform: translateX(0);
        display: block;
    }


    .filter-content {
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        will-change: opacity, transform;
        display: none;
    }

    .filter-content.active {
        opacity: 1;
        transform: translateX(0);
        display: block;
    }

    .drawer-footer {
        display: flex;
        gap: 12px;
        padding: 12px 16px;
        border-top: 1px solid #ddd;
    }

    .drawer-footer button {
        flex: 1;
        font-size: 16px;
        padding: 12px 0;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        user-select: none;
        transition: background-color 0.3s ease;
    }

    .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid #eee;
        margin-bottom: 15px;
        gap: 5px;
    }

    .drawer-header p {
        padding: 5px;
        font-size: 25px;
    }

    .close-btn {
        padding: 5px;
        font-size: 25px;
    }

    .drawer-body {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .drawer-body label {
        display: block;
        margin-bottom: 10px;
    }

    .apply-btn {
        background-color: #FFD03A;
        border: none;
        padding: 8px 16px;
        border-radius: 6px;
        font-weight: bold;
    }

    .close-btn {
        background: none;
        border: none;
        font-size: 30px;
        cursor: pointer;
        padding: 5px;
        margin-left: 5px;
    }

    .article_container {
        max-width: 100%;
        padding: 10px;
        margin: 40px auto;
    }

    .article-header {
        margin-bottom: 10px;
    }

    .article-header h1, .part-title {
        font-size: 23px;
    }

    .short-desc {
        font-size: 20px;
    }

    .part-image {
        float: unset;
        margin-right: 0;
        width: 350px;
    }

    section {
        padding: 10px;
    }

    .article-parts {
        width: 100%;
    }

    .article-part-card {
        padding: 0;

    }
}