/* ===================================================
   Jbooks Archive - Halaman Majalah Grid (Premium Layout)
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&display=swap');

.jbooks-archive {
    font-family: 'Outfit', sans-serif;
    padding: 60px 20px 100px;
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
}

/* ── Archive Header ── */
.jba-header {
    text-align: center;
    margin-bottom: 60px;
}

.jba-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(233, 69, 96, 0.08);
    border: 1px solid rgba(233, 69, 96, 0.25);
    color: #e94560;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.jba-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 6vw, 54px);
    font-weight: 800;
    color: #000000 !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    margin: 0 0 16px;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.jba-header p {
    color: #62627a;
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto 16px;
    line-height: 1.6;
}

.jba-header-count {
    display: inline-block;
    background: #f1f1f6;
    color: #4e4e6a;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.25px;
}

/* ── Grid ── */
.jba-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 36px 30px;
}

/* ── Card (Magazine Styling) ── */
.jba-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 10px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.jba-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 38px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(233, 69, 96, 0.15);
    text-decoration: none;
    color: inherit;
}

/* Cover Area with Physical Book Spine Effect */
.jba-card-cover {
    position: relative;
    aspect-ratio: 3/4;
    background: #1e1e2e;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

/* Magazine spine shadow */
.jba-card-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 14px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.08) 75%, transparent 100%);
    z-index: 4;
    pointer-events: none;
}

/* Paper gloss effect */
.jba-card-cover::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 14px;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0) 35%);
    z-index: 4;
    pointer-events: none;
}

.jba-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.jba-card:hover .jba-card-cover img {
    transform: scale(1.04);
}

/* Placeholder cover */
.jba-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.35);
    background: linear-gradient(135deg, #10101b 0%, #1e1e2e 50%, #28283e 100%);
}

.jba-cover-placeholder-icon svg {
    color: var(--jb-accent, #e94560);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.jba-cover-placeholder-text {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Overlay on Hover */
.jba-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(16, 16, 27, 0.95) 0%, rgba(16, 16, 27, 0.4) 60%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    z-index: 5;
}

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

.jba-card-read-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: #e94560;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.jba-card:hover .jba-card-read-btn {
    transform: translateY(0);
}

.jba-card-read-btn svg {
    transition: transform 0.2s ease;
}

.jba-card-read-btn:hover svg {
    transform: translateX(4px);
}

/* Card Body */
.jba-card-body {
    padding: 18px 20px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.02);
}

.jba-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 14px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 46px;
    /* consistent line heights */
}

.jba-card-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    border-top: 1px solid #f4f4f7;
    padding-top: 12px;
}

.jba-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #72728c;
    font-weight: 500;
}

.jba-meta-item svg {
    opacity: 0.65;
}

.jba-meta-dot {
    width: 3px;
    height: 3px;
    background: #d1d1db;
    border-radius: 50%;
}

.jba-meta-date {
    margin-left: auto;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9090a8;
}

/* ── Empty State ── */
.jba-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
    color: #72728c;
}

.jba-empty-icon {
    margin-bottom: 20px;
    color: #b0b0c4;
}

.jba-empty-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.jba-empty-text {
    font-size: 15px;
    color: #72728c;
}

/* ── Dark Mode Adaptive ── */
@media (prefers-color-scheme: dark) {
    .jba-header h1 {
        color: #010114 !important;
    }

    .jba-header p {
        color: #9090a8;
    }

    .jba-header-count {
        background: #22223a;
        color: #a4a4c1;
    }

    .jba-card {
        background: #19192b;
        border-color: rgba(255, 255, 255, 0.04);
        box-shadow:
            0 4px 6px rgba(0, 0, 0, 0.1),
            0 10px 20px rgba(0, 0, 0, 0.15);
    }

    .jba-card:hover {
        box-shadow:
            0 20px 45px rgba(0, 0, 0, 0.3),
            0 0 0 1px rgba(233, 69, 96, 0.25);
    }

    .jba-card-body {
        background: #19192b;
        border-top-color: rgba(255, 255, 255, 0.02);
    }

    .jba-card-title {
        color: #f1f1f6;
    }

    .jba-card-meta {
        border-top-color: rgba(255, 255, 255, 0.06);
    }

    .jba-meta-item {
        color: #a4a4c1;
    }

    .jba-meta-dot {
        background: #464660;
    }

    .jba-meta-date {
        color: #72728c;
    }

    .jba-empty-title {
        color: #f1f1f6;
    }

    .jba-empty-text {
        color: #9090a8;
    }
}

/* ── Responsive Styling ── */
@media (max-width: 640px) {
    .jbooks-archive {
        padding: 40px 15px 60px;
    }

    .jba-header {
        margin-bottom: 40px;
    }

    .jba-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 15px;
    }

    .jba-card-body {
        padding: 12px 14px 14px;
    }

    .jba-card-title {
        font-size: 14px;
        height: 38px;
        margin-bottom: 8px;
    }

    .jba-card-meta {
        padding-top: 8px;
        gap: 8px;
    }

    .jba-meta-date {
        display: none;
        /* Hide date on small mobile to save space */
    }
}