/* =============================================================================
   Epaper Archive & Single Templates — Farmers Weekly Child Theme
   ============================================================================= */

/* ── Archive header ─────────────────────────────────────────────────────────── */
.epaper-archive-header {
    margin: 0 0 32px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e02b20; /* FW red */
}

.epaper-archive-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.2;
}

.epaper-archive-description {
    font-size: 15px;
    color: #555;
    margin: 0;
    max-width: 680px;
    line-height: 1.6;
}

/* ── Card grid ──────────────────────────────────────────────────────────────── */
.epaper-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .epaper-archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
    .epaper-archive-grid { grid-template-columns: 1fr; }
}

/* ── Individual card ────────────────────────────────────────────────────────── */
.epaper-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.epaper-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* Thumbnail */
.epaper-card-thumb-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #1a1a1a;
    aspect-ratio: 3 / 4;
}

.epaper-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.epaper-card:hover .epaper-card-thumb {
    transform: scale(1.03);
    opacity: 0.85;
}

/* Placeholder when no featured image */
.epaper-card-thumb-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.epaper-card-thumb-placeholder svg {
    width: 60%;
    height: auto;
    opacity: 0.6;
}

/* Overlay with CTA */
.epaper-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(224, 43, 32, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.epaper-card:hover .epaper-card-overlay {
    opacity: 1;
}

.epaper-card-read-btn {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 2px solid #fff;
    padding: 8px 20px;
    border-radius: 2px;
}

/* Card body */
.epaper-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.epaper-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
}

.epaper-card-issue {
    color: #e02b20;
    font-weight: 700;
}

.epaper-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.epaper-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.15s ease;
}

.epaper-card-title a:hover {
    color: #e02b20;
}

.epaper-card-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card action buttons */
.epaper-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    flex-wrap: wrap;
}

.epaper-card-btn {
    display: inline-block;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.epaper-card-btn--primary {
    background: #e02b20;
    color: #fff;
}

.epaper-card-btn--primary:hover {
    background: #b8211a;
    color: #fff;
}

.epaper-card-btn--secondary {
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #ddd;
}

.epaper-card-btn--secondary:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.epaper-archive-pagination {
    text-align: center;
    margin: 20px 0 40px;
}

.epaper-archive-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    border-radius: 2px;
    transition: background 0.15s ease;
}

.epaper-archive-pagination .page-numbers.current,
.epaper-archive-pagination .page-numbers:hover {
    background: #e02b20;
    border-color: #e02b20;
    color: #fff;
}

.epaper-no-posts {
    padding: 40px;
    text-align: center;
    color: #888;
    font-size: 15px;
}

/* ── Single epaper page ─────────────────────────────────────────────────────── */
.epaper-single-article .epaper-post-content {
    /* Remove default article padding around the flipbook */
    padding: 0;
}

.epaper-single-article .epaper-flipbook-wrap {
    margin: 0 0 32px;
}

.epaper-meta-issue {
    font-size: 12px;
    font-weight: 700;
    color: #e02b20;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 8px;
}

.epaper-extra-content {
    margin-top: 32px;
}

/* ── No posts ───────────────────────────────────────────────────────────────── */
.epaper-no-posts {
    padding: 48px 20px;
    text-align: center;
    color: #888;
}
