/* Journals Archive Theme */

.cn-jarchive-wrapper {
   background-color: #f9f9f9; 
   padding: 50px 0;
   font-family: 'Vazirmatn', sans-serif;
   direction: rtl;
}

.cn-jarchive-container {
   max-width: 1200px;
   margin: 0 auto;
   padding: 0 20px;
}

/* Header */
.cn-jarchive-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 40px;
   border-bottom: 1px solid #eaeaea;
   padding-bottom: 25px;
}

.cn-jah-right {
   display: flex;
   align-items: center;
   gap: 20px;
}

.cn-jah-icon {
   width: 50px;
   height: 50px;
   border: 2px solid #b89762;
   border-radius: 8px;
   display: flex;
   align-items: center;
   justify-content: center;
   color: #b89762;
   font-size: 24px;
   background: #fff;
}

.cn-jah-text h1 {
   font-size: 26px;
   font-weight: 800;
   color: #0B192C;
   margin: 0 0 5px 0;
}

.cn-jah-text p {
   font-size: 14px;
   color: #777;
   margin: 0;
}

.cn-jah-btn {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   padding: 10px 20px;
   border: 1px solid #b89762;
   color: #b89762;
   border-radius: 25px;
   font-size: 14px;
   font-weight: bold;
   text-decoration: none;
   background: transparent;
   transition: all 0.3s ease;
}

.cn-jah-btn:hover {
   background: #b89762;
   color: #fff;
}

/* Grid */
.cn-jarchive-grid {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 30px;
}

/* 3D Flip Card */
.cn-journal-card {
   perspective: 1200px;
   position: relative;
   border-radius: 12px;
   aspect-ratio: 3 / 4;
}

.cn-jc-inner {
   position: absolute;
   width: 100%;
   height: 100%;
   transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
   transform-style: preserve-3d;
   border-radius: 12px;
   box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.cn-journal-card:hover .cn-jc-inner {
   transform: rotateY(-180deg);
}

.cn-jc-front, .cn-jc-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 12px; overflow: hidden; background: #fff; }
.cn-jc-front { padding: 15px; border: 1px solid #eaeaea; }

/* Front Side */
.cn-jc-front img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; border-radius: 4px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }

/* Back Side */
.cn-jc-back {
   transform: rotateY(180deg);
   display: flex;
   align-items: center;
   justify-content: center;
   text-align: center;
   padding: 20px;
   background: #fffcf5;
   border: 2px solid #e8dec8;
}

.cn-jc-back-content {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 12px;
   width: 100%;
}

.cn-jc-back-icon {
   width: 50px;
   height: 50px;
   border-radius: 50%;
   border: 2px solid #b89762;
   color: #b89762;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 24px;
   margin-bottom: 10px;
}

.cn-jc-type {
   font-size: 14px;
   color: #555;
   font-weight: bold;
}

.cn-jc-title {
   font-size: 22px;
   font-weight: 800;
   color: #0B192C;
   margin: 0;
   line-height: 1.4;
}

.cn-jc-issue {
   font-size: 15px;
   color: #444;
   margin-top: 15px;
   font-weight: bold;
}

.cn-jc-date {
   font-size: 14px;
   color: #777;
}

/* Link Wrapper */
.cn-jc-link {
   position: absolute;
   inset: 0;
   z-index: 10;
}

/* Footer Notice */
.cn-jarchive-footer {
   text-align: center;
   margin-top: 50px;
   color: #666;
   font-size: 15px;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   background: #fff;
   border: 1px solid #eaeaea;
   border-radius: 30px;
   padding: 12px 30px;
   width: max-content;
   margin-left: auto;
   margin-right: auto;
   box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.cn-jarchive-footer i {
   color: #b89762;
   font-size: 20px;
}

/* Pagination */
.cn-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}
.cn-pagination .nav-links {
    display: flex;
    gap: 10px;
}
.cn-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #eaeaea;
    color: #333;
    text-decoration: none;
    transition: 0.2s;
    font-weight: bold;
}
.cn-pagination .page-numbers.current,
.cn-pagination .page-numbers:hover {
    background: #b89762;
    color: #fff;
    border-color: #b89762;
}

/* Responsive */
@media (max-width: 992px) {
    .cn-jarchive-grid { grid-template-columns: repeat(3, 1fr); }
    .cn-jarchive-header { flex-direction: column; gap: 20px; text-align: center; }
    .cn-jah-right { flex-direction: column; text-align: center; }
}
@media (max-width: 768px) {
    .cn-jarchive-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .cn-jarchive-grid { grid-template-columns: 1fr; }
    .cn-journal-card { max-width: 300px; margin: 0 auto; }
}

/* Featured Journal */
.cn-featured-journal {
    display: flex;
    gap: 40px;
    align-items: center;
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.04);
    margin-bottom: 50px;
    border: 1px solid #eaeaea;
}

.cn-fj-cover {
    flex: 0 0 300px;
}

.cn-fj-cover .cn-journal-card {
    width: 100%;
}

.cn-fj-info {
    flex: 1;
}

.cn-fj-badge {
    display: inline-block;
    background: #b89762;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 20px;
}

.cn-fj-title {
    font-size: 32px;
    font-weight: 900;
    color: #0B192C;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.cn-fj-title a {
    color: inherit;
    text-decoration: none;
}
.cn-fj-title a:hover {
    color: #b89762;
}

.cn-fj-meta {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 15px;
    margin-bottom: 25px;
    font-weight: bold;
}

.cn-fj-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.cn-fj-meta span i {
    font-size: 18px;
    color: #b89762;
}

.cn-fj-excerpt {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
    text-align: justify;
}

.cn-fj-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0B192C;
    color: #fff;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s;
}

.cn-fj-btn:hover {
    background: #b89762;
    color: #fff;
}

@media (max-width: 992px) {
    .cn-featured-journal {
        flex-direction: column;
        padding: 30px;
        text-align: center;
    }
    .cn-fj-cover {
        flex: 0 0 auto;
        width: 100%;
        max-width: 320px;
    }
    .cn-fj-meta {
        justify-content: center;
    }
}
