/* ═══════════════════════════════════════════════════════════════
   PUBLICATION ARCHIVE — Card Grid
   Author: Ramak Rao
   ═══════════════════════════════════════════════════════════════ */

/* ── Grid ──────────────────────────────────────────────────────── */
.pa-wrap {
    width: 100%;
    padding: 20px 0;
}

.pa-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ── Card ──────────────────────────────────────────────────────── */
.pa-card {
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.pa-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* ── Card image ────────────────────────────────────────────────── */
.pa-card-link {
    display: block;
    padding: 15px 15px 0;
    text-decoration: none;
}

.pa-card-image-wrap {
    width: 100%;
    aspect-ratio: 3 / 4;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pa-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.pa-card:hover .pa-card-image {
    transform: scale(1.03);
}

/* ── Card body ─────────────────────────────────────────────────── */
.pa-card-body {
    padding: 12px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.pa-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin: 0 0 14px;
    line-height: 1.35;
}

.pa-card-title a {
    color: inherit;
    text-decoration: none;
}

.pa-card-title a:hover {
    color: #0073e6;
}

/* ── Action row ────────────────────────────────────────────────── */
.pa-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    gap: 8px;
}

.pa-buy-link {
    color: #0073e6;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s;
}

.pa-buy-link:hover {
    color: #005bb5;
    text-decoration: underline;
}

.pa-pdf-link {
    color: #0073e6;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: color 0.2s;
}

.pa-pdf-link:hover {
    color: #005bb5;
}

.pa-pdf-link svg {
    flex-shrink: 0;
    border: 1.5px solid #0073e6;
    border-radius: 5px;
    padding: 2px;
    background-color: #f0f7ff;
    display: block;
}

/* ── Loader / spinner ──────────────────────────────────────────── */
.pa-loader {
    text-align: center;
    padding: 30px 0 10px;
}

.pa-spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #0073e6;
    border-radius: 50%;
    animation: pa-spin 0.7s linear infinite;
}

@keyframes pa-spin {
    to { transform: rotate(360deg); }
}

.pa-sentinel {
    height: 1px;
    visibility: hidden;
}

/* ── Responsive ────────────────────────────────────────────────── */

/* Tablet: 2 columns */
@media (max-width: 900px) {
    .pa-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

/* Mobile: 1 column */
@media (max-width: 520px) {
    .pa-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pa-card-title {
        font-size: 15px;
    }
}
