@import "main.css";

.articles-hero {
    width: 100%;
    height: 730px;
    display: flex;
    background-image: url("../images/a74f290d-519c-453e-837c-210bcf13d94b.png");
    background-size: cover;
    background-position: center;
    align-items: center;
}

.articles-hero .hero-text {
    width: 36%;
    height: 47%;
    margin-right: 120px;
    display: flex;
    flex-direction: column;
}

.articles-hero .hero-text h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.articles-hero .hero-text  p {
    font-size: 1.2rem;
    text-align: justify;
    line-height: 2;
}

.articles-hero .hero-text  button {
    width: 40%;
    margin-top: 20px;
    font-size: 1.1rem;
    padding: 15px 10px;
    background-color: var(--btn-primary-bg);
    border-radius: 12px;
    color: var(--btn-primary-text);
    cursor: pointer;
}

.articles-hero .hero-image {
    display: none;
}

.articles-box {
    width: 96%;
    margin: 30px auto ;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.articles-box .article-sidebar {
    width: 30%;
    display: flex;
    flex-direction: column;
}

.articles-box .article-sidebar .special-articles-widget,
.articles-box .article-sidebar .new-articles-widget {
    width: 98%;
    height: 550px;
    display: flex;
    flex-direction: column;
    text-align: center;
    margin-bottom: 20px;
    align-items: center;
    background-color: var(--bg-box);
    border: 2px solid var(--border-default);
    border-radius: 18px;
}

.articles-box .article-sidebar .special-articles-widget .title,
.articles-box .article-sidebar .new-articles-widget .title {
    font-size: 1.5rem;
    color: #4a3728;
    margin-bottom: 15px;
    margin-top: 15px;
}

.articles-box .article-sidebar .special-articles-widget .divider,
.articles-box .article-sidebar .new-articles-widget .divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

.articles-box .article-sidebar .special-articles-widget .divider::before,
.articles-box .article-sidebar .new-articles-widget .divider::before {
    content: "";
    position: absolute;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-active), transparent);
    z-index: 1;
}

.articles-box .article-sidebar .special-articles-widget .divider .rhombus,
.articles-box .article-sidebar .new-articles-widget .divider .rhombus {
    width: 10px;
    height: 10px;
    background-color: var(--color-primary-700);
    transform: rotate(45deg);
    margin: 0 5px;
    z-index: 2;
    border: 2px solid #fff9f2;
}

.articles-box .article-sidebar .special-articles-widget .divider .rhombus.center,
.articles-box .article-sidebar .new-articles-widget .divider .rhombus.center {
    width: 12px;
    height: 12px;
}

.articles-box .article-sidebar .special-articles-widget .articles-list,
.articles-box .article-sidebar .new-articles-widget .articles-list {
    width: 96%;
    height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    margin-top: 10px;
    direction: ltr;
}

.articles-box .article-sidebar .special-articles-widget .articles-list .mini-articles,
.articles-box .article-sidebar .new-articles-widget .articles-list .mini-articles {
    margin: 10px;
    width: 94%;
    display: flex;
    align-items: center;
    direction: rtl;
    padding: 10px;
    border-bottom: 1px solid var(--border-default);
}

.articles-box .article-sidebar .special-articles-widget .articles-list .mini-articles img,
.articles-box .article-sidebar .new-articles-widget .articles-list .mini-articles img {
    width: 170px;
    height: 100px;
    border-radius: 18px;
}

.articles-box .article-sidebar .special-articles-widget .articles-list .mini-articles .article-info,
.articles-box .article-sidebar .new-articles-widget .articles-list .mini-articles .article-info {
    display: flex;
    flex-wrap: wrap;
    width: 80%;
    line-height: 1.5;
    justify-content: space-around;
}

.articles-box .article-sidebar .special-articles-widget .articles-list .mini-articles .article-info h4,
.articles-box .article-sidebar .new-articles-widget .articles-list .mini-articles .article-info h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    margin-right: 10px;
    text-align: right;
}

.articles-box .article-sidebar .special-articles-widget .articles-list .mini-articles .article-info p,
.articles-box .article-sidebar .new-articles-widget .articles-list .mini-articles .article-info p {
    font-size: 0.8rem;
}

.articles-box .article-sidebar .special-articles-widget .articles-list .mini-articles .article-info button,
.articles-box .article-sidebar .new-articles-widget .articles-list .mini-articles .article-info button {
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.articles-box .article-sidebar .special-articles-widget .articles-list .mini-articles .article-info button img,
.articles-box .article-sidebar .new-articles-widget .articles-list .mini-articles .article-info button img {
    width: 15px;
    height: 15px;
    transform: rotate(90deg);
}

.articles-box .article-sidebar  .popular-categories-widget {
    width: 98%;
    height: fit-content;
    display: flex;
    flex-direction: column;
    text-align: center;
    margin-bottom: 20px;
    align-items: center;
    background-color: var(--bg-box);
    border: 2px solid var(--border-default);
    border-radius: 18px;
}

.articles-box .article-sidebar  .popular-categories-widget  .title {
    font-size: 1.5rem;
    color: #4a3728;
    margin-bottom: 15px;
    margin-top: 15px;
}

.articles-box .article-sidebar  .popular-categories-widget .divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

.articles-box .article-sidebar  .popular-categories-widget .divider::before {
    content: "";
    position: absolute;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-active), transparent);
    z-index: 1;
}

.articles-box .article-sidebar  .popular-categories-widget .divider .rhombus {
    width: 10px;
    height: 10px;
    background-color: var(--color-primary-700);
    transform: rotate(45deg);
    margin: 0 5px;
    z-index: 2;
    border: 2px solid #fff9f2;
}

.articles-box .article-sidebar  .popular-categories-widget .divider .rhombus.center {
    width: 12px;
    height: 12px;
}

.articles-box .article-sidebar  .popular-categories-widget .categories {
    width: 96%;
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
    justify-content: center;
}

.articles-box .article-sidebar .popular-categories-widget .categories .category-btn {
    font-size: 1.1rem;
    background-color: var(--btn-primary-text);
    margin: 10px;
    padding: 10px;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
}


.articles-box .article-archive {
    width: 70%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
}

.articles-box .article-archive .articles-filter {
    display: flex;
    width: 100%;
    justify-content: space-between;
    margin-bottom: 15px;

}
.articles-box .article-archive .articles-filter .filter-btns {
    width: 60%;
    margin: auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.articles-box .article-archive .articles-filter .filter-btns .filter-btn {
    font-size: 1rem;
    background-color: var(--btn-secondary-bg);
    padding:  10px 15px;
    border: 1px solid var(--border-active);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
}

.articles-box .article-archive .articles-filter .filter-btns .filter-btn:hover {
    background-color: var(--btn-secondary-hover-bg);
    border: 1px solid var(--btn-secondary-hover-border);

}

.articles-box .article-archive .articles-filter .search-articles {
    border: 2px solid var(--border-active);
    width: 35%;
    height: 60px;
    border-collapse: collapse;
    border-radius: 12px;
    background-color: var(--input-bg);
    display: flex;
    align-items: center;
}

.articles-box .article-archive .articles-filter .search-articles input {
    font-size: 1.2rem;
    width: 80%;
    height: 100%;
    border-radius: 0 12px 12px 0;
    padding: 15px;
}

.articles-box .article-archive .articles-filter .search-articles button {
    width: 20%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 2px solid var(--border-active);
    border-radius: 12px 0 0 12px ;
    cursor: pointer;
    padding: 20px;
    background-color: #EED5BF;
}

.articles-box .article-archive .articles-filter .search-articles button:hover {

}

.articles-box .article-archive .articles {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-around;
}

.articles-box .article-archive .articles .articles-card {
    width: 32%;
    border: 2px solid var(--border-active);
    margin: 10px 0px;
    border-radius: 12px;
    background: var(--bg-box);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.articles-box .article-archive .articles .articles-card img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.articles-box .article-archive .articles .articles-card .article-card-info  h3 {
    font-size: 1.1rem;
    margin: 10px 15px 5px ;
    color: var(--text-primary);
}

.articles-box .article-archive .articles .articles-card .article-card-info  p {
    font-size: 1rem;
    line-height: 1.6;
    width: 94%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 2px auto;
    padding: 5px;
    text-align: justify;
}

.articles-box .article-archive .articles .articles-card .article-card-info  .article-card-category {
    width: 98%;
    display: flex;
    justify-content: start;
    align-items: center;
    margin: 6px;
    flex-wrap: wrap;
}

.articles-box .article-archive .articles .articles-card .article-card-info  .article-card-category span {
    font-size: 0.9rem;
    border: 2px solid var(--border-default);
    margin: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    background-color: var(--color-primary-200);
}

.articles-box .article-archive .articles .articles-card .article-card-info  .article-card-details {
    width: 96%;
    margin: 10px auto;
    display: flex;
    justify-content: start;
    align-items: center;
}

.articles-box .article-archive .articles .articles-card .article-card-info  .article-card-details .time p {
    font-size: 0.8rem;
    margin-right: 6px;
}

.articles-box .article-archive .articles .articles-card .article-card-info  .article-card-details .date {
    display: flex;
    width: 140px;
    margin-left: 26px;
    align-items: center;
}

.articles-box .article-archive .articles .articles-card .article-card-info  .article-card-details .date p {
    font-size: 0.9rem;
    direction: ltr;
}

.articles-box .article-archive .articles .articles-card .article-card-info  .article-card-details .date img {
    width: 20px;
    height: 20px;
}

.articles-box .article-archive .articles .articles-card .article-card-info  .article-card-details button {
    cursor: pointer;
    font-size: 0.9rem;
    padding: 9px;
    margin: 6px;
    background-color: #EED5BF;
    border-radius: 6px;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.articles-box .article-archive .articles .articles-card  .article-card-info .article-card-details button img {
    width: 15px;
    height: 15px;
    transform: rotate(90deg);
}
/* ===================================================== */
/* Responsive: 300px to 600px */
/* Focus: sidebar widgets + mobile archive fixes */
/* ===================================================== */


/* ---------- 300px تا 349px ---------- */
@media only screen and (min-width: 300px) and (max-width: 349px) {

    .articles-hero {
        background-image: none;
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 40px 15px 20px;
        height: auto;
        align-items: center;
        background-color: var(--color-primary-200);
    }

    .articles-hero .hero-text {
        width: 96%;
        margin: 0;
        align-items: center;
        text-align: center;
    }

    .articles-hero .hero-text h1 {
        font-size: 1.15rem;
        margin: 0 0 15px 0;
    }

    .articles-hero .hero-text p {
        font-size: 0.8rem;
        text-align: center;
        line-height: 1.9;
        margin: 8px 0;
    }

    .articles-hero .hero-text button {
        width: 92%;
        margin: 10px 0 0 0;
        font-size: 0.9rem;
        padding: 12px 8px;
    }

    .articles-hero .hero-image {
        display: flex;
        width: 92%;
        margin: 15px auto 0;
    }

    .articles-hero .hero-image img {
        width: 100%;
        border-radius: 12px;
    }

    .articles-box {
        width: 100%;
        flex-direction: column-reverse;
    }

    .articles-box .article-archive {
        width: 100%;
    }

    .articles-box .article-archive .articles-filter {
        flex-direction: column-reverse;
        width: 100%;
    }

    .articles-box .article-archive .articles-filter .filter-btns {
        width: 100%;
        margin: 15px auto;
        overflow-x: auto;
        justify-content: center;
        gap: 6px;
        padding: 0 8px;
    }

    .articles-box .article-archive .articles-filter .filter-btns .filter-btn {
        font-size: 0.6rem;
        padding: 6px 8px;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .articles-box .article-archive .articles-filter .search-articles {
        width: 94%;
        height: 50px;
        border-radius: 25px;
        margin: auto;
        border: none;
        box-shadow: 0 3px 10px var(--shadow-card);
    }

    .articles-box .article-archive .articles-filter .search-articles input {
        font-size: 0.8rem;
        padding: 10px;
    }

    .articles-box .article-archive .articles-filter .search-articles button {
        background-color: inherit;
        border: none;
        border-radius: 25px 0 0 25px;
        width: 20%;
        padding: 10px;
    }
    .articles-box .article-archive .articles-filter .search-articles button img {
        width: 22px;
    }

    .articles-box .article-archive .articles {
        width: 100%;
    }

    .articles-box .article-archive .articles .articles-card {
        width: 94%;
        padding: 10px;
        flex-direction: row;
        align-items: stretch;
        gap: 10px;
        margin: 10px auto;
    }

    .articles-box .article-archive .articles .articles-card img {
        width: 36%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 8px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info {
        width: 64%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info h3 {
        margin: 0 0 4px 0;
        font-size: 0.72rem;
        line-height: 1.5;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info p {
        width: 100%;
        font-size: 0.62rem;
        margin: 0;
        padding: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-align: justify;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-category {
        margin: 5px 0;
        gap: 4px;
        justify-content: space-around;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-category span {
        font-size: 0.55rem;
        padding: 3px 5px;
        margin: 0;

    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details {
        width: 100%;
        margin-top: 6px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .time p {
        font-size: 0.58rem;
        margin: 0;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date {
        width: auto;
        margin-left: 0;
        gap: 3px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date p {
        font-size: 0.58rem;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date img {
        width: 12px;
        height: 12px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details button {
        font-size: 0.7rem;
        padding: 8px 14px;
        margin: 0 auto;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details button img {
        width: 9px;
        height: 9px;
    }

    .articles-box {
        flex-direction: column !important;
    }

    .article-sidebar {
        width: 100% !important;
        order: 2;
    }

    .special-articles-widget,
    .new-articles-widget {
        width: 92% !important;
        height: auto !important;
        padding: 15px 0 18px 0 !important;
        margin: 15px auto;
    }

    .special-articles-widget .title,
    .new-articles-widget .title,
    .popular-categories-widget .title {
        font-size: 1.1rem !important;
    }

    .special-articles-widget .articles-list,
    .new-articles-widget .articles-list {
        width: 96%;
        height: auto !important;
        max-height: 320px;
        overflow-y: auto;
        margin-top: 8px;
    }

    .special-articles-widget .mini-articles,
    .new-articles-widget .mini-articles {
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        background: #fff;
        border-radius: 15px;
        border: 1px solid var(--border-default) !important;
        padding: 8px !important;
        box-sizing: border-box;
        margin: 8px auto !important;
        width: 96%;
    }

    .special-articles-widget .mini-articles img,
    .new-articles-widget .mini-articles img {
        width: 100% !important;
        height: 85px !important;
        object-fit: cover;
        border-radius: 10px !important;
        margin-bottom: 8px !important;
    }

    .special-articles-widget .mini-articles .article-info,
    .new-articles-widget .mini-articles .article-info {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 !important;
    }

    .special-articles-widget .mini-articles .article-info h4,
    .new-articles-widget .mini-articles .article-info h4 {
        font-size: 0.68rem !important;
        margin: 0 0 8px 0 !important;
        text-align: center !important;
        line-height: 1.5;
        height: 36px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .special-articles-widget .mini-articles .article-info p,
    .new-articles-widget .mini-articles .article-info p {
        font-size: 0.6rem !important;
        margin-bottom: 8px !important;
    }

    .special-articles-widget .mini-articles .article-info button,
    .new-articles-widget .mini-articles .article-info button {
        width: 100%;
        justify-content: center;
        background-color: #EED5BF;
        border-radius: 8px;
        padding: 6px 0 !important;
        border: none;
        font-size: 0.62rem !important;
        margin-top: auto;
    }

    .special-articles-widget .mini-articles .article-info button img,
    .new-articles-widget .mini-articles .article-info button img {
        width: 9px !important;
        height: 9px !important;
        margin-right: 5px;
        margin-bottom: 0 !important;
    }

    .popular-categories-widget {
        width: 92% !important;
        margin: 15px auto !important;
    }

    .popular-categories-widget .categories {
        width: 100%;
        padding: 0 8px 10px;
    }

    .popular-categories-widget .categories .category-btn {
        font-size: 0.75rem;
        margin: 6px;
        padding: 8px 10px;
    }

    .articles-box .article-sidebar .popular-categories-widget {
        display: none;
    }

}


/* ---------- 350px تا 499px ---------- */
@media only screen and (min-width: 350px) and (max-width: 499px) {
    .articles-box .article-sidebar .popular-categories-widget {
        display: none;
    }
    .articles-hero {
        background-image: none;
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 50px 20px 20px 20px;
        height: auto;
        align-items: center;
    }

    .articles-hero .hero-text {
        width: 94%;
        display: flex;
        flex-direction: column;
        margin: 0;
        align-items: center;
        text-align: center;
    }

    .articles-hero .hero-text h1 {
        font-size: 1.3rem;
        margin: 0 0 20px 0;
        padding: 0;
    }

    .articles-hero .hero-text p {
        font-size: 0.9rem;
        text-align: center;
        margin: 10px 0;
        padding: 0;
        line-height: 1.9;
    }

    .articles-hero .hero-text button {
        width: 90%;
        margin: 0;
        font-size: 1rem;
        padding: 13px 10px;
    }

    .articles-hero .hero-image {
        display: flex;
        width: 90%;
        border-radius: 12px;
        margin: 15px auto;
    }

    .articles-hero .hero-image img {
        width: 100%;
        border-radius: 12px;
    }

    .articles-box {
        width: 100%;
        flex-direction: column-reverse;
    }

    .articles-box .article-archive {
        width: 100%;
    }

    .articles-box .article-archive .articles-filter {
        flex-direction: column-reverse;
    }

    .articles-box .article-archive .articles-filter .filter-btns {
        width: 100%;
        margin: 15px auto;
        overflow-x: auto;
        justify-content: center;
        gap: 8px;
        padding: 0 10px;
    }

    .articles-box .article-archive .articles-filter .filter-btns .filter-btn {
        font-size: 0.7rem;
        padding: 6px 8px;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .articles-box .article-archive .articles-filter .search-articles {
        width: 96%;
        border-radius: 30px;
        margin: auto;
        border: none;
        box-shadow: 0 3px 10px var(--shadow-card);
        height: 54px;
    }

    .articles-box .article-archive .articles-filter .search-articles input {
        font-size: 0.9rem;
    }

    .articles-box .article-archive .articles-filter .search-articles button {
        background-color: inherit;
        border: none;
        border-radius: 30px 0 0 30px;
        width: 20%;
    }

    .articles-box .article-archive .articles-filter .search-articles button img {
        width: 26px;
    }

    .articles-box .article-archive .articles .articles-card {
        width: 94%;
        padding: 10px;
        flex-direction: row;
        align-items: stretch;
        gap: 12px;
        margin: 10px auto;
    }

    .articles-box .article-archive .articles .articles-card img {
        width: 38%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 8px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info {
        width: 62%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info h3 {
        margin: 0 0 5px 0;
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info p {
        width: 100%;
        font-size: 0.7rem;
        margin: 0;
        padding: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-align: justify;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-category {
        margin: 5px 0;
        gap: 4px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-category span {
        font-size: 0.6rem;
        padding: 3px 6px;
        margin: 0;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details {
        width: 100%;
        margin-top: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 5px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .time p {
        font-size: 0.6rem;
        margin: 0;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date {
        width: auto;
        margin-left: 0;
        gap: 4px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date p {
        font-size: 0.65rem;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date img {
        width: 14px;
        height: 14px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details button {
        font-size: 0.7rem;
        padding: 6px 10px;
        margin: 0;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details button img {
        width: 10px;
        height: 10px;
    }

    .articles-box {
        flex-direction: column !important;
    }

    .article-sidebar {
        width: 100% !important;
        order: 2;
    }

    .special-articles-widget,
    .new-articles-widget {
        width: 88% !important;
        height: auto !important;
        padding: 15px 0 24px 0 !important;
        position: relative;
        margin: 15px auto;
    }

    .special-articles-widget .title,
    .new-articles-widget .title,
    .popular-categories-widget .title {
        font-size: 1.2rem !important;
    }

    .special-articles-widget .articles-list,
    .new-articles-widget .articles-list {
        width: 96%;
        height: auto !important;
        max-height: 340px;
        overflow-y: auto;
        margin-top: 8px;
    }

    .special-articles-widget .mini-articles,
    .new-articles-widget .mini-articles {
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        background: #fff;
        border-radius: 15px;
        border: 1px solid var(--border-default) !important;
        padding: 10px !important;
        box-sizing: border-box;
        margin: 8px auto !important;
        width: 95%;
    }

    .special-articles-widget .mini-articles img,
    .new-articles-widget .mini-articles img {
        width: 100% !important;
        height: 90px !important;
        object-fit: cover;
        border-radius: 10px !important;
        margin-bottom: 10px !important;
    }

    .special-articles-widget .mini-articles .article-info,
    .new-articles-widget .mini-articles .article-info {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 !important;
    }

    .special-articles-widget .mini-articles .article-info h4,
    .new-articles-widget .mini-articles .article-info h4 {
        font-size: 0.75rem !important;
        margin: 0 0 10px 0 !important;
        text-align: center !important;
        height: 40px;
        overflow: hidden;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .special-articles-widget .mini-articles .article-info p,
    .new-articles-widget .mini-articles .article-info p {
        font-size: 0.65rem !important;
        color: #888;
        margin-bottom: 8px !important;
    }

    .special-articles-widget .mini-articles .article-info button,
    .new-articles-widget .mini-articles .article-info button {
        width: 100%;
        justify-content: center;
        background-color: #EED5BF;
        border-radius: 8px;
        padding: 6px 0 !important;
        border: none;
        font-size: 0.7rem !important;
        margin-top: auto;
    }

    .special-articles-widget .mini-articles .article-info button img,
    .new-articles-widget .mini-articles .article-info button img {
        width: 10px !important;
        height: 10px !important;
        margin-right: 5px;
        margin-bottom: 0 !important;
    }

    .popular-categories-widget {
        width: 88% !important;
        margin: 15px auto !important;
    }

    .popular-categories-widget .categories .category-btn {
        font-size: 0.8rem;
        margin: 6px;
        padding: 8px 10px;
    }
}


/* ---------- 500px تا 600px ---------- */
@media only screen and (min-width: 500px) and (max-width: 600px) {
    .articles-box .article-sidebar .popular-categories-widget {
        display: none;
    }
    .articles-hero {
        background-image: none;
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 55px 20px 20px;
        height: auto;
        align-items: center;
    }

    .articles-hero .hero-text {
        width: 92%;
        margin: 0;
        align-items: center;
        text-align: center;
    }

    .articles-hero .hero-text h1 {
        font-size: 1.45rem;
        margin-bottom: 18px;
    }

    .articles-hero .hero-text p {
        font-size: 0.95rem;
        text-align: center;
        line-height: 2;
    }

    .articles-hero .hero-text button {
        width: 75%;
        margin-top: 12px;
        font-size: 1rem;
    }

    .articles-hero .hero-image {
        display: flex;
        width: 82%;
        margin: 18px auto 0;
    }

    .articles-hero .hero-image img {
        width: 100%;
        border-radius: 14px;
    }

    .articles-box {
        width: 100%;
        flex-direction: column-reverse;
    }

    .articles-box .article-archive {
        width: 100%;
    }

    .articles-box .article-archive .articles-filter {
        flex-direction: column-reverse;
        align-items: center;
    }

    .articles-box .article-archive .articles-filter .filter-btns {
        width: 96%;
        margin: 15px 0;
        overflow-x: auto;
        justify-content: start;
        gap: 8px;
        padding: 0 10px;
    }

    .articles-box .article-archive .articles-filter .filter-btns .filter-btn {
        font-size: 0.82rem;
        padding: 8px 12px;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .articles-box .article-archive .articles-filter .search-articles {
        width: 94%;
        height: 56px;
        border-radius: 30px;
        margin: auto;
        border: none;
        box-shadow: 0 3px 10px var(--shadow-card);
    }

    .articles-box .article-archive .articles-filter .search-articles input {
        font-size: 0.95rem;
    }

    .articles-box .article-archive .articles-filter .search-articles button {
        background-color: inherit;
        border: none;
        border-radius: 30px 0 0 30px;
        width: 18%;
    }

    .articles-box .article-archive .articles .articles-card {
        width: 94%;
        padding: 10px;
        flex-direction: row;
        align-items: stretch;
        gap: 12px;
        margin: 10px auto;
    }

    .articles-box .article-archive .articles .articles-card img {
        width: 34%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 8px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info {
        width: 66%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info h3 {
        margin: 0 0 5px 0;
        font-size: 0.92rem;
        line-height: 1.5;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info p {
        width: 100%;
        font-size: 0.8rem;
        margin: 0;
        padding: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-align: justify;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-category {
        margin: 6px 0;
        gap: 5px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-category span {
        font-size: 0.65rem;
        padding: 4px 7px;
        margin: 0;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details {
        width: 100%;
        margin-top: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 5px;
        flex-wrap: wrap;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .time p {
        font-size: 0.65rem;
        margin: 0;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date {
        width: auto;
        margin-left: 0;
        gap: 4px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date p {
        font-size: 0.7rem;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date img {
        width: 14px;
        height: 14px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details button {
        font-size: 0.72rem;
        padding: 7px 12px;
        margin: 0;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details button img {
        width: 10px;
        height: 10px;
    }

    .articles-box {
        flex-direction: column !important;
    }

    .article-sidebar {
        width: 100% !important;
        order: 2;
    }

    .special-articles-widget,
    .new-articles-widget,
    .popular-categories-widget {
        width: 84% !important;
        margin: 15px auto !important;
    }

    .special-articles-widget,
    .new-articles-widget {
        height: auto !important;
        padding: 15px 0 24px 0 !important;
    }

    .special-articles-widget .title,
    .new-articles-widget .title,
    .popular-categories-widget .title {
        font-size: 1.25rem !important;
    }

    .special-articles-widget .articles-list,
    .new-articles-widget .articles-list {
        width: 96%;
        height: auto !important;
        max-height: 360px;
        overflow-y: auto;
        margin-top: 8px;
    }

    .special-articles-widget .mini-articles,
    .new-articles-widget .mini-articles {
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        background: #fff;
        border-radius: 15px;
        border: 1px solid var(--border-default) !important;
        padding: 10px !important;
        box-sizing: border-box;
        margin: 8px auto !important;
        width: 95%;
    }

    .special-articles-widget .mini-articles img,
    .new-articles-widget .mini-articles img {
        width: 100% !important;
        height: 100px !important;
        object-fit: cover;
        border-radius: 10px !important;
        margin-bottom: 10px !important;
    }

    .special-articles-widget .mini-articles .article-info,
    .new-articles-widget .mini-articles .article-info {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 !important;
    }

    .special-articles-widget .mini-articles .article-info h4,
    .new-articles-widget .mini-articles .article-info h4 {
        font-size: 0.8rem !important;
        margin: 0 0 10px 0 !important;
        text-align: center !important;
        height: 42px;
        overflow: hidden;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .special-articles-widget .mini-articles .article-info p,
    .new-articles-widget .mini-articles .article-info p {
        font-size: 0.68rem !important;
        color: #888;
        margin-bottom: 8px !important;
    }

    .special-articles-widget .mini-articles .article-info button,
    .new-articles-widget .mini-articles .article-info button {
        width: 100%;
        justify-content: center;
        background-color: #EED5BF;
        border-radius: 8px;
        padding: 6px 0 !important;
        border: none;
        font-size: 0.72rem !important;
        margin-top: auto;
    }

    .special-articles-widget .mini-articles .article-info button img,
    .new-articles-widget .mini-articles .article-info button img {
        width: 10px !important;
        height: 10px !important;
        margin-right: 5px;
        margin-bottom: 0 !important;
    }

    .popular-categories-widget .categories .category-btn {
        font-size: 0.85rem;
        margin: 6px;
        padding: 8px 12px;
    }
}








/* ===================================== */
/* 600px تا 700px — Large Mobile / Phablet */
/* ساختار مشابه موبایل */
/* ===================================== */

@media (min-width: 600px) and (max-width: 700px) {

    .articles-hero {
        background-image: none;
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 55px 20px 20px;
        height: auto;
        align-items: center;
    }

    .articles-hero .hero-text {
        width: 92%;
        margin: 0;
        align-items: center;
        text-align: center;
    }

    .articles-hero .hero-text h1 {
        font-size: 1.45rem;
        margin-bottom: 18px;
    }

    .articles-hero .hero-text p {
        font-size: 0.95rem;
        text-align: center;
        line-height: 2;
    }

    .articles-hero .hero-text button {
        width: 75%;
        margin-top: 12px;
        font-size: 1rem;
    }

    .articles-hero .hero-image {
        display: flex;
        width: 82%;
        margin: 18px auto 0;
    }

    .articles-hero .hero-image img {
        width: 100%;
        border-radius: 14px;
    }

    .articles-box {
        width: 100%;
        flex-direction: column-reverse;
    }

    .articles-box .article-archive {
        width: 96%;
        margin: 10px auto;
    }

    .articles-box .article-archive .articles-filter {
        flex-direction: column-reverse;
        margin: 15px  auto;
        align-items: center;
    }

    .articles-box .article-archive .articles-filter .filter-btns {
        width: 100%;
        margin: 15px auto;
        overflow-x: auto;
        justify-content: center;
        gap: 8px;
        padding: 0 10px;
    }

    .articles-box .article-archive .articles-filter .filter-btns .filter-btn {
        font-size: 1rem;
        padding: 10px 14px;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .articles-box .article-archive .articles-filter .search-articles {
        width: 96%;
        border-radius: 30px;
        margin: auto;
        border: none;
        box-shadow: 0 3px 10px var(--shadow-card);
        height: 54px;
    }

    .articles-box .article-archive .articles-filter .search-articles input {
        font-size: 0.9rem;
    }

    .articles-box .article-archive .articles-filter .search-articles button {
        background-color: inherit;
        border: none;
        border-radius: 30px 0 0 30px;
        width: 20%;
    }

    .articles-box .article-archive .articles-filter .search-articles button img {
        width: 26px;
    }

    .articles {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .articles-box .article-archive .articles .articles-card {
        width: 48%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .articles-card img {
        width: 34%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 10px;
    }

    .articles-card .article-card-info {
        width: 98%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .articles-card .article-card-info h3 {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .articles-card .article-card-info p {
        font-size: 0.8rem;
        line-height: 1.8;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .articles-card .article-card-category span {
        font-size: 0.7rem;
        padding: 4px 7px;
    }

    .articles-card .article-card-details {
        margin: auto;
        align-items: center;
    }

    .articles-card .article-card-details button {
        font-size: 0.8rem;
        padding: 6px 8px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .time p{
        margin-right: 2px;
        font-size: 0.8rem;
        margin-left: 5px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date p{
        font-size: 0.71rem;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date{
        width: 100px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details {
        width: 98%;
    }
    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date{
        margin-left: 5px;
    }

    .articles-box .article-sidebar .special-articles-widget, .articles-box .article-sidebar .new-articles-widget {
        width: 86%;
        margin: 20px auto;
    }
    .articles-box .article-sidebar .special-articles-widget .articles-list .mini-articles, .articles-box .article-sidebar .new-articles-widget .articles-list .mini-articles {
        width: 90%;
        margin: 0;
    }
    .popular-categories-widget {
        width: 92%;
        margin: 15px auto;
    }

    .articles-box .article-sidebar {
        width: 90%;
        flex-direction: column-reverse;
        margin: 10px auto;
    }


}

@media (min-width: 700px) and (max-width: 900px) {

    .articles-hero {
        background-image: none;
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 55px 20px 20px;
        height: auto;
        align-items: center;
    }

    .articles-hero .hero-text {
        width: 92%;
        margin: 0;
        align-items: center;
        text-align: center;
    }

    .articles-hero .hero-text h1 {
        font-size: 1.45rem;
        margin-bottom: 18px;
    }

    .articles-hero .hero-text p {
        font-size: 0.95rem;
        text-align: center;
        line-height: 2;
    }

    .articles-hero .hero-text button {
        width: 75%;
        margin-top: 12px;
        font-size: 1rem;
    }

    .articles-hero .hero-image {
        display: flex;
        width: 82%;
        margin: 18px auto 0;
    }

    .articles-hero .hero-image img {
        width: 100%;
        border-radius: 14px;
    }

    .articles-box {
        width: 100%;
        flex-direction: column-reverse;
    }

    .articles-box .article-archive {
        width: 96%;
        margin: 10px auto;
    }

    .articles-box .article-archive .articles-filter {
        flex-direction: column-reverse;
        margin: 15px  auto;
        align-items: center;
    }

    .articles-box .article-archive .articles-filter .filter-btns {
        width: 100%;
        margin: 15px auto;
        overflow-x: auto;
        justify-content: center;
        gap: 8px;
        padding: 0 10px;
    }

    .articles-box .article-archive .articles-filter .filter-btns .filter-btn {
        font-size: 1rem;
        padding: 10px 14px;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .articles-box .article-archive .articles-filter .search-articles {
        width: 96%;
        border-radius: 30px;
        margin: auto;
        border: none;
        box-shadow: 0 3px 10px var(--shadow-card);
        height: 54px;
    }

    .articles-box .article-archive .articles-filter .search-articles input {
        font-size: 0.9rem;
    }

    .articles-box .article-archive .articles-filter .search-articles button {
        background-color: inherit;
        border: none;
        border-radius: 30px 0 0 30px;
        width: 20%;
    }

    .articles-box .article-archive .articles-filter .search-articles button img {
        width: 26px;
    }

    .articles {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .articles-box .article-archive .articles .articles-card {
        width: 48%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .articles-card img {
        width: 34%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 10px;
    }

    .articles-card .article-card-info {
        width: 98%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .articles-card .article-card-info h3 {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .articles-card .article-card-info p {
        font-size: 0.8rem;
        line-height: 1.8;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .articles-card .article-card-category span {
        font-size: 0.7rem;
        padding: 4px 7px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details{
        margin: auto;
        align-items: center;
        justify-content: center;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details button {

        font-size: 0.9rem;
        padding: 6px 8px;
        margin-right: 45px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .time p{
        margin-right: 2px;
        font-size: 0.85rem;
        margin-left: 5px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date p{
        font-size: 0.84rem;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date{
        width: 140px;
        margin-left: 100px;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details {
        width: 98%;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details .date{
        margin-left: 5px;
    }

    .special-articles-widget,
    .new-articles-widget,
    .popular-categories-widget {
        width: 92%;
        margin: 15px auto;
    }


    .articles-box .article-sidebar {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: 90%;
        margin: 20px auto;
        justify-content: space-between;
    }

    .articles-box .article-sidebar .special-articles-widget, .articles-box .article-sidebar .new-articles-widget {
        width: 48%;
        margin: 20px auto;
    }
    .articles-box .article-sidebar .special-articles-widget .articles-list .mini-articles, .articles-box .article-sidebar .new-articles-widget .articles-list .mini-articles {
        width: 98%;
        margin: 0;
    }
    .articles-box .article-sidebar .popular-categories-widget {
        width: 84%;
        margin: 15px auto;
    }

    .articles-box .article-sidebar .special-articles-widget .articles-list .mini-articles, .articles-box .article-sidebar .new-articles-widget .articles-list .mini-articles {
        margin: 0;
    }



}


@media (min-width: 901px) and (max-width: 1150px) {
    /* 1. اصلاح هیرو - کوچک کردن فونت و فضا */
    .articles-hero {
        height: 480px; /* کمتر کردن ارتفاع */
        padding: 0 40px;
    }

    .articles-hero .hero-text {
        margin-right: 20px;
        width: 40%;
    }

    .articles-hero .hero-text h1 {
        font-size: 1.5rem; /* کوچک‌تر از دسکتاپ */
        margin-bottom: 15px;
    }

    .articles-hero .hero-text p {
        font-size: 1rem;
        line-height: 1.8;
    }

    .articles-hero .hero-text button {
        width: 100%;
        font-size: 0.9rem;
    }

    .articles-hero .hero-image {
        width: 40%;
    }

    /* 2. مدیریت فضای سایدبار و آرشیو */
    .articles-box {
        width: 96%;
        gap: 20px;
        margin-top: 30px;
    }

    .articles-box .article-archive {
        width: 60%; /* سهم آرشیو کمتر شد */
    }

    .articles-box .article-sidebar {
        width: 38%; /* سهم سایدبار بیشتر شد تا ویجت‌ها جا بشن */
        display: flex;
        flex-direction: column;
        gap: 25px;
    }

    /* 3. اصلاح کارت‌های آرشیو (دو ستونه) */
    .articles {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* دو ستونه ماندن */
        gap: 15px;
    }

    .articles-card .article-card-info h3 {
        font-size: 0.85rem; /* فونت تیتر کارت */
    }

    .articles-card .article-card-info p {
        font-size: 0.75rem; /* فونت متن کارت */
    }

    /* 4. اصلاح فیلترها و سرچ */
    .articles-filter {
        gap: 10px;
    }

    .filter-btns .filter-btn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .articles-box .article-archive .articles-filter {
        flex-direction: column-reverse;
    }

    .articles-box .article-archive .articles-filter .search-articles {
        width: 94%;
        margin: 0 auto;
    }

    .articles-box .article-archive .articles-filter .search-articles button img {
        width: 32px;
    }

    .articles-box .article-archive .articles-filter .search-articles input{
        width: 85%;
    }

    .articles-box .article-archive .articles-filter .search-articles button {
        width: 15%;
    }

    .articles-box .article-archive .articles-filter .filter-btns {
        width: 96%;
    }

    .articles-box .article-sidebar .special-articles-widget .articles-list .mini-articles, .articles-box .article-sidebar .new-articles-widget .articles-list .mini-articles {
        margin: 0 ;
    }

    .articles-box .article-archive .articles .articles-card {
        width: 48%;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-category span {
        font-size: 0.8rem;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details {
        flex-wrap: wrap;
    }

    .articles-box .article-archive .articles .articles-card .article-card-info .article-card-details button {
        width: 90%;
        margin: 5px auto;
       display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
    }

    .search-articles {
        height: 45px;
    }

    /* 5. اصلاح ویجت‌های سایدبار */
    .special-articles-widget .title,
    .new-articles-widget .title,
    .popular-categories-widget .title {
        font-size: 1.1rem;
    }

    .mini-articles h4 {
        font-size: 0.85rem;
    }

    .mini-articles p {
        font-size: 0.75rem;
    }

    /* تنظیم دکمه‌های کتگوری در سایدبار */
    .popular-categories-widget .categories-list {
        gap: 8px;
    }

    .popular-categories-widget .category-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}

@media (min-width:1100px){

    .articles-box .article-sidebar .special-articles-widget .articles-list .mini-articles, .articles-box .article-sidebar .new-articles-widget .articles-list .mini-articles {
        margin: 0;
    }

}


