/* ===========================
   ARTIKEL — Neubrutalist
   =========================== */

/* ── Category color palette ── */
.cat-badge { display: inline-block; padding: 4px 12px; border-radius: 100px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; border: 2px solid var(--black); }
.cat-tips-belajar   { background: #bae6fd; color: #0c4a6e; }
.cat-materi-utbk    { background: #bbf7d0; color: #14532d; }
.cat-panduan-ptn    { background: #e9d5ff; color: #4c1d95; }
.cat-info-snbt      { background: #fed7aa; color: #7c2d12; }
.cat-motivasi       { background: #fde68a; color: #78350f; }
.cat-default        { background: var(--yellow); color: var(--black); }

/* ── Breadcrumb ── */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 28px;
}
.breadcrumb a { color: var(--blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: #bbb; }

/* ── Page header (list) ── */
.artikel-page-header {
    padding: 48px 0 32px;
    border-bottom: var(--border);
    margin-bottom: 40px;
}
.artikel-page-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 10px;
}
.artikel-page-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 560px;
}

/* ── Category filter ── */
.kategori-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
}
.kategori-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: var(--border-thin);
    border-radius: 100px;
    font-family: var(--font, 'Inter', sans-serif);
    font-size: 0.875rem;
    font-weight: 700;
    background: var(--white);
    color: var(--black);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.12s ease;
    box-shadow: var(--shadow-sm);
}
.kategori-btn:hover,
.kategori-btn.active {
    background: var(--black);
    color: var(--white);
    transform: translate(2px, 2px);
    box-shadow: none;
}
.kategori-btn .cnt {
    font-size: 0.75rem;
    opacity: 0.65;
}

/* ── Article grid ── */
.artikel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 48px;
}
@media (max-width: 900px) { .artikel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .artikel-grid { grid-template-columns: 1fr; } }

/* ── Article card ── */
.artikel-card {
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.15s ease;
    text-decoration: none;
    color: inherit;
}
.artikel-card:hover {
    transform: translate(3px, 3px);
    box-shadow: var(--shadow-hover);
}
.artikel-card-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-bottom: var(--border-thin);
}
.artikel-card-cover-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: var(--border-thin);
    font-size: 2.5rem;
}
.artikel-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}
.artikel-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.artikel-card-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--black);
}
.artikel-card-excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.artikel-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
    padding-top: 10px;
    border-top: 2px solid #f0f0f0;
}
.artikel-card-date { display: flex; align-items: center; gap: 4px; }
.artikel-card-readtime { display: flex; align-items: center; gap: 4px; }

/* Featured card spans 2 columns on desktop */
.artikel-card.featured {
    grid-column: span 2;
    flex-direction: row;
}
.artikel-card.featured .artikel-card-cover,
.artikel-card.featured .artikel-card-cover-placeholder {
    width: 45%;
    aspect-ratio: auto;
    flex-shrink: 0;
    border-bottom: none;
    border-right: var(--border-thin);
    min-height: 240px;
}
@media (max-width: 900px) {
    .artikel-card.featured {
        grid-column: span 1;
        flex-direction: column;
    }
    .artikel-card.featured .artikel-card-cover,
    .artikel-card.featured .artikel-card-cover-placeholder {
        width: 100%;
        aspect-ratio: 16/9;
        border-right: none;
        border-bottom: var(--border-thin);
        min-height: unset;
    }
}
.artikel-card.featured .artikel-card-title {
    font-size: 1.2rem;
    -webkit-line-clamp: 3;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    margin-bottom: 60px;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border: var(--border-thin);
    border-radius: var(--radius);
    font-family: var(--font, 'Inter', sans-serif);
    font-size: 0.9rem;
    font-weight: 700;
    background: var(--white);
    color: var(--black);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.12s ease;
}
.page-btn:hover { transform: translate(2px, 2px); box-shadow: none; }
.page-btn.active { background: var(--black); color: var(--white); box-shadow: none; }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ── Empty state ── */
.artikel-empty {
    text-align: center;
    padding: 64px 24px;
    border: var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
    margin-bottom: 48px;
}
.artikel-empty-icon { font-size: 3rem; margin-bottom: 16px; }
.artikel-empty h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; }
.artikel-empty p { color: #666; font-size: 0.9rem; }

/* ═══════════════════════════════════
   ARTIKEL DETAIL PAGE
   ═══════════════════════════════════ */

.artikel-detail-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* ── Article header ── */
.artikel-hero { margin-bottom: 32px; }
.artikel-hero .cat-badge { margin-bottom: 16px; }
.artikel-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 20px;
}
.artikel-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    padding: 16px 0;
    border-top: var(--border-thin);
    border-bottom: var(--border-thin);
}
.artikel-meta-item { display: flex; align-items: center; gap: 5px; }

/* ── Cover image ── */
.artikel-cover-wrap {
    margin: 28px 0;
    border: var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.artikel-cover-wrap img {
    width: 100%;
    display: block;
    max-height: 440px;
    object-fit: cover;
}
.artikel-cover-placeholder {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

/* ── Article body typography ── */
.artikel-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 40px;
}
.artikel-body h2 {
    font-size: 1.5rem;
    font-weight: 900;
    margin: 40px 0 14px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--black);
    line-height: 1.3;
}
.artikel-body h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 28px 0 10px;
    line-height: 1.35;
}
.artikel-body h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 20px 0 8px;
}
.artikel-body p { margin-bottom: 18px; }
.artikel-body p:last-child { margin-bottom: 0; }
.artikel-body ul,
.artikel-body ol {
    margin: 0 0 18px 0;
    padding-left: 28px;
}
.artikel-body li { margin-bottom: 8px; line-height: 1.7; }
.artikel-body strong { font-weight: 800; }
.artikel-body em { font-style: italic; }
.artikel-body a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.artikel-body a:hover { opacity: 0.8; }
.artikel-body blockquote {
    margin: 28px 0;
    padding: 20px 24px;
    background: var(--cream);
    border-left: 5px solid var(--black);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    font-size: 1.05rem;
}
.artikel-body blockquote p { margin: 0; }
.artikel-body img {
    max-width: 100%;
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin: 20px 0;
}
.artikel-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.9rem;
    border: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.artikel-body th {
    background: var(--black);
    color: var(--white);
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
}
.artikel-body td {
    padding: 10px 16px;
    border-bottom: 2px solid #e5e5e5;
}
.artikel-body tr:last-child td { border-bottom: none; }
.artikel-body tr:nth-child(even) td { background: #fafafa; }
.artikel-body code {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}
.artikel-body pre {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: var(--radius);
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 0.9rem;
}
.artikel-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

/* ── Tags ── */
.artikel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: var(--border);
}
.artikel-tag {
    display: inline-block;
    padding: 5px 14px;
    border: var(--border-thin);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--white);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.12s ease;
}
.artikel-tag:hover { background: var(--black); color: var(--white); }

/* ── CTA banner ── */
.artikel-cta {
    background: var(--yellow);
    border: var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px 32px;
    margin-bottom: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.artikel-cta-text strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 900;
    margin-bottom: 4px;
}
.artikel-cta-text p {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}
.artikel-cta .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Related articles ── */
.related-articles { margin-bottom: 60px; }
.related-articles h2 {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: var(--border);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 700px) { .related-grid { grid-template-columns: 1fr; } }

/* ── Back to list ── */
.back-to-list {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--blue);
    text-decoration: none;
    margin-bottom: 24px;
}
.back-to-list:hover { text-decoration: underline; }

/* ── Category cover gradients ── */
.cover-tips    { background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 100%); }
.cover-materi  { background: linear-gradient(135deg, #bbf7d0 0%, #6ee7b7 100%); }
.cover-panduan { background: linear-gradient(135deg, #e9d5ff 0%, #c4b5fd 100%); }
.cover-info    { background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%); }
.cover-motivasi{ background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%); }
.cover-default { background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); }
