/* ============================================
   ویرایشگر صفحات آرشیو - افسون وب
   Version: 1.0.0
   Author: داود امامی - تیم افسون وب
   ============================================ */

.afsoon-archive {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background-color: #f8fafc;
    min-height: 100vh;
    direction: rtl;
}

.afsoon-container {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.afsoon-layout {
    display: flex;
    gap: 30px;
    padding: 30px;
}

.afsoon-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.afsoon-sidebar-right .afsoon-sidebar {
    order: 1;
}

.afsoon-sidebar-right .afsoon-main {
    order: 2;
}

.afsoon-sidebar-left .afsoon-sidebar {
    order: 2;
}

.afsoon-sidebar-left .afsoon-main {
    order: 1;
}

.afsoon-main {
    flex: 1;
}

/* Widgets */
.afsoon-widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.afsoon-widget-title {
    color: #1e3a8a;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1e3a8a;
}

/* Search */
.afsoon-widget form {
    display: flex;
    gap: 10px;
}

.afsoon-widget input[type="search"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    font-family: inherit;
}

.afsoon-widget input[type="search"]:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Buttons */
.afsoon-btn-primary {
    display: inline-block;
    background-color: #1e3a8a;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.afsoon-btn-primary:hover {
    background-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

/* Latest Posts */
.afsoon-latest-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.afsoon-latest-posts li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.afsoon-latest-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.afsoon-latest-posts a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #334155;
    transition: color 0.3s;
}

.afsoon-latest-posts a:hover {
    color: #1e3a8a;
}

.afsoon-latest-posts img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.afsoon-latest-title {
    display: block;
}

.afsoon-latest-date {
    font-size: 12px;
    color: #94a3b8;
    display: block;
    margin-top: 4px;
}

/* Archive Dates */
.afsoon-archive-dates {
    list-style: none;
    padding: 0;
    margin: 0;
}

.afsoon-archive-dates li {
    margin-bottom: 8px;
}

.afsoon-archive-dates a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 6px;
    text-decoration: none;
    color: #334155;
    font-size: 14px;
    transition: all 0.3s;
}

.afsoon-archive-dates a:hover {
    background: #eff6ff;
    color: #1e3a8a;
}

.afsoon-archive-dates .afsoon-count {
    background: #1e3a8a;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
}

/* Categories */
.afsoon-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.afsoon-categories li {
    margin-bottom: 8px;
}

.afsoon-categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 6px;
    text-decoration: none;
    color: #334155;
    font-size: 14px;
    transition: all 0.3s;
}

.afsoon-categories a:hover {
    background: #eff6ff;
    color: #1e3a8a;
}

.afsoon-categories .children {
    list-style: none;
    padding-right: 20px;
    margin-top: 8px;
}

.afsoon-categories .children a {
    background: transparent;
    font-size: 13px;
}

/* Posts Grid */
.afsoon-posts-grid {
    display: grid;
    gap: 25px;
}

.afsoon-cols-1 { grid-template-columns: 1fr; }
.afsoon-cols-2 { grid-template-columns: repeat(2, 1fr); }
.afsoon-cols-3 { grid-template-columns: repeat(3, 1fr); }
.afsoon-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Cards */
.afsoon-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.afsoon-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.afsoon-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.afsoon-card-image {
    height: 200px;
    overflow: hidden;
}

.afsoon-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.afsoon-card:hover .afsoon-card-image img {
    transform: scale(1.05);
}

.afsoon-card-content {
    padding: 20px;
}

.afsoon-post-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    line-height: 1.4;
    transition: color 0.3s;
}

.afsoon-card:hover .afsoon-post-title {
    color: #1e3a8a;
}

.afsoon-post-meta {
    display: flex;
    gap: 15px;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 10px;
}

.afsoon-post-excerpt {
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Pagination */
.afsoon-pagination {
    margin-top: 30px;
    text-align: center;
}

.afsoon-pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 3px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    transition: all 0.3s;
}

.afsoon-pagination .page-numbers.current {
    background: #1e3a8a;
    color: #ffffff;
    border-color: #1e3a8a;
}

.afsoon-pagination .page-numbers:hover {
    background: #eff6ff;
    color: #1e3a8a;
}

/* No Posts */
.afsoon-no-posts {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.afsoon-no-posts h3 {
    color: #1e3a8a;
    font-size: 24px;
    margin-bottom: 10px;
}

.afsoon-no-posts p {
    color: #64748b;
}

/* Responsive */
@media (max-width: 1024px) {
    .afsoon-layout {
        flex-direction: column;
    }

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

    .afsoon-main {
        order: 1 !important;
    }

    .afsoon-cols-3,
    .afsoon-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .afsoon-layout {
        padding: 15px;
    }

    .afsoon-cols-2,
    .afsoon-cols-3,
    .afsoon-cols-4 {
        grid-template-columns: 1fr;
    }

    .afsoon-card-image {
        height: 180px;
    }
}

/* Category glass header */
.afsoon-category-glass-header {
    margin: 0 30px;
    padding: 28px 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.afsoon-category-glass-title {
    margin: 0;
}

/* Latest Products - same compact layout as Latest Posts */
.afsoon-products-widget {
    overflow: hidden;
}
.afsoon-products-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.afsoon-products-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}
.afsoon-products-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.afsoon-products-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #334155;
    transition: color 0.3s;
}
.afsoon-products-list a:hover {
    color: #1e3a8a;
}
.afsoon-products-list img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 60px;
}
.afsoon-product-title {
    display: block;
    color: #334155;
}
.afsoon-products-list a:hover .afsoon-product-title {
    color: #1e3a8a;
}

@media (max-width: 768px) {
    .afsoon-category-glass-header {
        margin: 0 15px;
        padding: 22px 16px;
    }
}

/* Sidebar more buttons */
.afsoon-sidebar-more-wrap {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.afsoon-sidebar-more-button {
    display: block;
    box-sizing: border-box;
    padding: 10px 14px;
    text-align: center;
    border-radius: 7px;
    background: #1e3a8a;
    text-decoration: none;
    line-height: 1.5;
    transition: opacity .2s ease, transform .2s ease;
}
.afsoon-sidebar-more-button:hover {
    opacity: .9;
    transform: translateY(-1px);
}

