/* Template artikel — SMK Pancasila 4 Baturetno */
:root {
    --article-font: "Inter", system-ui, -apple-system, sans-serif;
    --article-display: "Plus Jakarta Sans", system-ui, sans-serif;
    --article-accent: #2563eb;
    --article-accent-hover: #1d4ed8;
    --article-accent-soft: #eff6ff;
    --article-text: #0f172a;
    --article-text-secondary: #475569;
    --article-muted: #94a3b8;
    --article-border: #e2e8f0;
    --article-bg: #ffffff;
    --article-radius: 12px;
    --article-max: 800px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.article-page {
    margin: 0;
    font-family: var(--article-font);
    color: var(--article-text);
    background: #f8fafc;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.article-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--article-max);
    margin: 0 auto;
    padding: 1rem 1.25rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-topbar__back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--article-accent);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: var(--article-accent-soft);
    transition: background 0.15s, color 0.15s;
}

.article-topbar__back:hover {
    background: #dbeafe;
    color: var(--article-accent-hover);
}

.article-topbar__breadcrumb {
    font-size: 0.75rem;
    color: var(--article-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.article-topbar__breadcrumb a {
    color: var(--article-accent);
    text-decoration: none;
    font-weight: 500;
}

.article-topbar__breadcrumb a:hover {
    text-decoration: underline;
}

.article-topbar__sep {
    color: var(--article-border);
}

.article-wrap {
    max-width: var(--article-max);
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.article-container {
    background: var(--article-bg);
    border-radius: var(--article-radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 2.5rem 2.5rem 2rem;
    border: 1px solid var(--article-border);
}

.article-hero {
    margin-bottom: 1.75rem;
}

.article-hero__badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--article-accent);
    background: var(--article-accent-soft);
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    margin-bottom: 0.85rem;
}

.article-hero__title {
    font-family: var(--article-display);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 1rem;
    letter-spacing: -0.025em;
    color: var(--article-text);
}

.article-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    font-size: 0.8125rem;
    color: var(--article-text-secondary);
    align-items: center;
}

.article-hero__author {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 500;
}

.article-hero__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--article-accent-soft);
    color: var(--article-accent);
    font-size: 0.7rem;
}

.article-hero__date,
.article-hero__readtime {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--article-muted);
}

.article-hero__readtime {
    font-size: 0.75rem;
}

.article-cover {
    margin: 0 0 2rem;
    border-radius: var(--article-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    background: #e2e8f0;
    position: relative;
}

.article-cover img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.article-body {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--article-text-secondary);
}

.article-body h2 {
    font-family: var(--article-display);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    line-height: 1.3;
    color: var(--article-text);
    letter-spacing: -0.01em;
}

.article-body h3 {
    font-family: var(--article-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
    color: var(--article-text);
}

.article-body h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.25rem 0 0.5rem;
    color: var(--article-text);
}

.article-body p {
    margin: 0 0 1.1rem;
    font-family: var(--article-font) !important;
    font-size: 1rem !important;
    color: var(--article-text-secondary) !important;
    line-height: 1.75 !important;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.25rem;
    padding-left: 1.35rem;
}

.article-body li {
    margin-bottom: 0.4rem;
    font-family: var(--article-font) !important;
    color: var(--article-text-secondary) !important;
}

.article-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--article-accent);
    background: var(--article-accent-soft);
    border-radius: 0 var(--article-radius) var(--article-radius) 0;
    color: #334155;
    font-style: italic;
    font-size: 1.025rem;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.article-body a {
    color: var(--article-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

.article-body a:hover {
    color: var(--article-accent-hover);
}

.article-body code,
.article-body pre {
    font-family: "JetBrains Mono", "Fira Code", monospace;
    font-size: 0.875em;
    background: #f1f5f9;
    border: 1px solid var(--article-border);
    border-radius: 6px;
}

.article-body code {
    padding: 0.15rem 0.4rem;
}

.article-body pre {
    padding: 1rem;
    overflow-x: auto;
    line-height: 1.5;
    margin: 1rem 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.article-body th,
.article-body td {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--article-border);
    text-align: left;
}

.article-body th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--article-text);
}

.article-body td {
    color: var(--article-text-secondary);
}

.article-share {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--article-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-share__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--article-muted);
}

.article-share__actions {
    display: flex;
    gap: 0.4rem;
}

.article-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    border: 1px solid var(--article-border);
    background: var(--article-bg);
    color: var(--article-text-secondary);
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.article-share__btn:hover {
    border-color: var(--article-accent);
    color: var(--article-accent);
    background: var(--article-accent-soft);
    transform: translateY(-1px);
}

.article-share__btn:active {
    transform: translateY(0);
}

.article-gallery {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--article-border);
}

.article-gallery__title {
    font-family: var(--article-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--article-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-gallery__title::before {
    content: '\f03e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.9rem;
    color: var(--article-accent);
}

.article-gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
}

.article-gallery__item {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e2e8f0;
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.article-gallery__item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}

.article-gallery__item::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    font-size: 1.25rem;
    color: #fff;
    background: rgba(15, 23, 42, 0.55);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.article-gallery__item:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.article-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Daftar button */
.article-daftar {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    border-radius: var(--article-radius);
    text-align: center;
}

.article-daftar__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #16a34a;
    color: #fff;
    font-family: var(--article-font);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(22,163,74,0.3);
    transition: all 0.25s ease;
}

.article-daftar__btn:hover {
    background: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22,163,74,0.35);
}

/* Lightbox */
.article-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15,23,42,0.88);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.article-lightbox.active { display: flex; }

.article-lightbox__img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.4);
    animation: lightboxIn 0.3s ease;
}

@keyframes lightboxIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.article-lightbox__close {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    opacity: 0.7;
    line-height: 1;
    transition: opacity 0.2s;
    border: none;
    background: none;
}

.article-lightbox__close:hover { opacity: 1; }

@media (max-width: 600px) {
    .article-lightbox { padding: 16px; }
    .article-lightbox__close { top: 16px; right: 16px; font-size: 28px; }
}

@media (max-width: 900px) {
    .article-container {
        padding: 1.5rem 1.25rem;
        border-radius: 10px;
    }

    .article-body p {
        font-size: 0.9375rem !important;
        line-height: 1.7 !important;
    }
}

@media (max-width: 640px) {
    .article-topbar {
        padding: 0.75rem 1rem 0;
    }

    .article-wrap {
        padding: 1.25rem 0.75rem 2rem;
    }

    .article-container {
        padding: 1.25rem 1rem;
        border-radius: 8px;
    }

    .article-hero__title {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
    }

    .article-hero__meta {
        font-size: 0.75rem;
        gap: 0.5rem 0.75rem;
    }

    .article-body {
        font-size: 0.9375rem;
        line-height: 1.65;
    }

    .article-body p {
        font-size: 0.9375rem !important;
        line-height: 1.65 !important;
    }

    .article-body h2 {
        font-size: 1.15rem;
    }

    .article-body h3 {
        font-size: 1rem;
    }

    .article-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .article-share {
        gap: 0.75rem;
    }

    .article-share__btn {
        width: 2rem;
        height: 2rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .article-container {
        padding: 1rem 0.75rem;
    }

    .article-gallery__grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem;
    }
}
