/* Archive Page Styles */

.page-archives {
    padding: 2rem 0 3rem;
}

.page-archives-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.page-archives-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Issue Grid */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Issue Summary Card */
.issue-summary {
    border: 1px solid var(--pntu-border);
    border-radius: var(--pntu-radius);
    overflow: hidden;
    box-shadow: var(--pntu-shadow);
    transition: all 0.25s ease;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.issue-summary::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, var(--pntu-green) 0%, #1bb36b 100%);
}

.issue-summary:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 35px rgba(0, 135, 81, 0.14), 0 6px 18px rgba(0, 0, 0, 0.1);
}

.issue-summary-cover {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 3/4;
    background: #f0f0f0;
}

.issue-summary .card-body {
    padding: 1.25rem 1.1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.issue-summary .card-text {
    margin-top: auto;
}

.issue-summary-series {
    background: linear-gradient(135deg, var(--pntu-green) 0%, var(--pntu-green-dark) 100%);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.7rem;
    box-shadow: 0 8px 18px rgba(0, 135, 81, 0.18);
    line-height: 1.35;
    text-align: center;
}

.issue-summary-series a {
    color: #fff !important;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.issue-summary-date {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--pntu-green-soft) 0%, #dff5ea 100%);
    border: 1px solid var(--pntu-border);
    font-size: 0.8rem;
    color: var(--pntu-green-dark);
    font-weight: 700;
    margin: 0.4rem 0 0;
    letter-spacing: 0.02em;
    width: fit-content;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.issue-summary-date i {
    font-size: 0.72rem;
    opacity: 0.9;
}

.issue-summary-title {
    font-size: 0.9rem;
    color: #495057;
    margin-top: 0.75rem;
    font-weight: 500;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archive-issue-item {
    display: flex;
    height: 100%;
}


/* Year Separator */
.archive-year-separator {
    margin: 3rem 0 2rem;
    padding: 0.75rem 1.5rem;
    background: #008751;
    color: white;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 135, 81, 0.3);
}

.archive-year-separator:first-child {
    margin-top: 0;
}

/* Pagination */
.page-archives .pagination {
    margin-top: 3rem;
    justify-content: center;
}

/* Empty State */
.archive-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 2rem 0;
}

.archive-empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.archive-empty-state h3 {
    font-size: 1.5rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.archive-empty-state p {
    color: #868e96;
}

/* Responsive */
@media (max-width: 768px) {
    .page-archives {
        padding: 1.5rem 0 2.5rem;
    }

    .archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
    
    .page-archives-header h1 {
        font-size: 1.75rem;
    }
    
    .archive-year-separator {
        font-size: 1.25rem;
        margin: 2rem 0 1.5rem;
        padding: 0.65rem 1rem;
    }

    .issue-summary .card-body {
        padding: 1rem;
    }

    .issue-summary-series {
        padding: 0.65rem 0.55rem;
    }

    .issue-summary-series a {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .archive-grid {
        gap: 0.85rem;
    }

    .issue-summary .card-body {
        padding: 0.85rem;
    }

    .issue-summary-date {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Loading Animation */
.archive-loading {
    text-align: center;
    padding: 3rem;
}

.archive-loading::after {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #008751;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
