body {
    margin: 0;
    font-family: var(--font-titels), sans-serif;
    background-color: var(--backmain-color);
    color: hsl(282.46deg 8% 15%);
}

.blog-container,
.archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.blog-layout {
    display: flex;
    gap: 20px;
    flex-direction: row-reverse;
}

.blog-sidebar {
    width: 25%;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgb(0 0 0 / 9%);
    margin-bottom: 20px;
    border: 1px solid #ececec;
    height: max-content;
    padding: 15px;
}

.posts-list {
    width: 75%;
}

.blog-post {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgb(0 0 0 / 9%);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #ececec;
}

.post-main {
    display: flex;
    align-items: stretch;
    flex-direction: row-reverse;
    gap: 15px;
    padding: 15px;
}

.post-thumbnail {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    transition: transform 1s ease;
    transform-origin: center center;
}

.post-thumbnail img:hover {
    transform: scale(1.05);
}

.post-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-title {
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 8px;
    margin-block-start: 0em;
    margin-block-end: 0em;
}

.post-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #0073aa;
}

.post-excerpt {
    font-size: 15px;
    color: #444;
    line-height: 1.6;
    margin-bottom: 10px;
    margin-block-start: 5px;
    margin-block-end: 1em;
}

.post-meta-container {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #777;
    padding-top: 10px;
    border-top: 1px solid #eee;
    align-items: center;
}

.post-viewcomment { display: flex; }
.post-comments { display: flex; align-items: center; gap: 5px; }
.post-comments img { width: 22px; height: 22px; }
.f-comment { font-family: var(--font-titels); line-height: 1; font-size: 1rem; }

/* ====================== بخش بالای صفحه آرشیو (نویسنده، تاریخ و ...) ====================== */
.archive-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgb(0 0 0 / 9%);
    margin-bottom: 20px;
    border: 1px solid #ececec;
    padding: 15px;
    gap: 10px;
}

.archive-title-wrapper {
    width: 75%;
    display: flex;
    align-items: center;
    font-family: var(--font-titels);
    overflow: hidden;
}

.archive-title {
    display: flex;
    align-items: center;
    color: #555;
    font-weight: normal;
    font-size: 18px;
    line-height: 1;
    margin: 0;
    white-space: nowrap;
    gap: 8px;
}

.archive-icon {
    width: 24px;
    height: 24px;
    margin-left: 7px;
    flex-shrink: 0;
}

.archive-label {
    margin-left: 5px;
    color: #2196f3;
    font-family: var(--font-titels), sans-serif;
    font-weight: bold;
}

/* اسکرول برای نام‌های طولانی (مثل نام نویسنده یا تاریخ) */
.archive-title span:last-child {
     display: block;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    -ms-overflow-style: none;
    padding-left: 0px;
    font-family: var(--font-titels), sans-serif;
    font-weight: normal;
    color: #333;
}

.archive-title span:last-child::-webkit-scrollbar {
    height: 4px;
}

.archive-title span:last-child::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.archive-title span:last-child::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.menunavb { 
    width: 25%; 
}

.custom-select { 
    position: relative; 
    display: inline-block; 
    width: 100%; 
}

.custom-select select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 8px 8px 8px 32px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-family: var(--font-titels);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
}

.custom-select select:hover,
.custom-select select:focus { 
    border-color: #a5d2e7; 
}

.custom-select .select-arrow {
    position: absolute;
    top: 18%;
    left: 8px;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.custom-select select:focus + .select-arrow {
    transform: translateY(-10%) rotate(-90deg);
}






/*next-after-button*/
.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a {
    padding: 2px 14px;
    margin: 2px;
background: linear-gradient(to bottom, #03A9F4, #2196F3);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    display: inline-block;
    font-size: 15px;
    transition: background 0.3s;
    font-family: var(--font-titels);
    border: 2px solid #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.pagination a:hover {
background: linear-gradient(to bottom, #03A9F4, #2196F3);
}

.page-numbers {
    padding: 2px 14px;
    margin: 2px;
  background: #2195f3a9;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    display: inline-block;
    font-size: 15px;
    transition: background 0.3s;
    font-family: var(--font-titels);
      border: 2px solid #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}


.page-numbers:active {
    transform: translateY(1px);
     box-shadow: 0 1px 0px rgba(0, 0, 0, 0.15);
}






.no-posts {
    text-align: center;
    font-size: 18px;
    color: #999;
    padding: 40px 20px;
    background: #fff;
    border-radius: 15px;
    border: 1px solid #ececec;
}

/* ====================== ریسپانسیو ====================== */
@media (max-width: 992px) {
    .blog-layout { 
        flex-direction: column; 
    }
    .blog-sidebar { 
        width: auto; 
        order: 2; 
    }
    .posts-list { 
        width: 100%; 
        order: 1; 
    }
    .menunavb, 
    .archive-title-wrapper { 
        width: 100%; 
    }
    .archive-breadcrumb { 
        flex-direction: column; 
        align-items: stretch; 
    }
    .archive-title-wrapper { 
        margin-bottom: 15px; 
    }
}

@media (max-width: 768px) {
    .post-main { 
        flex-direction: column; 
        text-align: center; 
        gap: 15px; 
    }
    .post-thumbnail { 
        margin-bottom: 0; 
    }
}