/* ═══════════════════════════════════════
   DETAIL ARTIKEL (Spotlight)
   Dibangun DI ATAS portofolio.css — pola sama
   (porto-badge, porto-main-title, cat-group).
   File ini hanya berisi tambahan khusus
   detail artikel: hero, konten, share, related.
═══════════════════════════════════════ */

/* ═══ Fallback cover (artikel tanpa gambar) — sama dengan index ═══ */
.art-fallback {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
    color: #fff;
    font-family: 'Sora', sans-serif;
    background:
        radial-gradient(80% 120% at 15% 10%, rgba(255,255,255,.14), transparent 55%),
        radial-gradient(90% 140% at 90% 90%, rgba(6,182,212,.45), transparent 60%),
        linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #06b6d4 100%);
    overflow: hidden;
}

.art-fallback::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.fallback-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.28);
    font-size: 1.5rem;
    backdrop-filter: blur(4px);
}

.fallback-title {
    position: relative;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-shadow: 0 2px 12px rgba(11,31,58,.25);
}

.fallback-tag {
    position: relative;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.25);
}

/* meta pada sub judul */
.detail-meta-sep {
    color: #b6c2cd;
    margin: 0 4px;
}

.detail-excerpt {
    margin-top: 14px;
    font-style: italic;
    color: #5f7590;
}

/* ── HERO ── */
.detail-hero {
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto 36px;
    max-width: 860px;
    box-shadow: 0 18px 48px rgba(11, 31, 58, 0.12);
}

.detail-hero img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 460px;
}

/* ── KONTEN ── */
.detail-content {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(37, 99, 235, 0.09);
    box-shadow: 0 4px 24px rgba(11, 31, 58, 0.07);
    padding: clamp(24px, 4vw, 48px);
    color: #2b3a4d;
    font-size: 1.04rem;
    line-height: 1.9;
    max-width: 860px;
    margin: 0 auto;
}

.detail-content p { margin: 0 0 20px; }

.detail-content h2,
.detail-content h3,
.detail-content h4 {
    color: #0b1f3a;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.3;
    margin: 34px 0 14px;
}

.detail-content h2 { font-size: 1.5rem; }
.detail-content h3 { font-size: 1.25rem; }
.detail-content h4 { font-size: 1.1rem; }

.detail-content a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.detail-content img {
    max-width: 100%;
    border-radius: 14px;
    margin: 20px 0;
    box-shadow: 0 14px 40px rgba(11, 31, 58, 0.1);
}

.detail-content ul,
.detail-content ol {
    margin: 0 0 22px;
    padding-left: 24px;
}

.detail-content li { margin-bottom: 8px; }

.detail-content blockquote {
    border-left: 4px solid #2563eb;
    background: #f4f8ff;
    padding: 18px 22px;
    border-radius: 0 14px 14px 0;
    margin: 24px 0;
    color: #33424f;
    font-style: italic;
    font-size: 1.02rem;
}

.detail-content blockquote p { margin: 0; }

.detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.95rem;
}

.detail-content th,
.detail-content td {
    border: 1px solid #e6edf5;
    padding: 10px 14px;
    text-align: left;
}

.detail-content th {
    background: #f2f7ff;
    color: #2563eb;
    font-weight: 700;
}

.detail-content code {
    background: #eef3fa;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.9em;
    color: #1d4ed8;
}

.detail-content pre {
    background: #0f1c2c;
    color: #e6edf5;
    padding: 18px 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 22px 0;
    font-size: 0.92rem;
    line-height: 1.6;
}

.detail-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* ── FOOTER: share + back ── */
.detail-footer {
    max-width: 860px;
    margin: 36px auto 0;
    padding: 24px 0 0;
    border-top: 1px solid rgba(37, 99, 235, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.detail-share {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-label {
    font-size: 0.86rem;
    color: #7a8fa6;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
}

.share-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    background: #fff;
    color: #2563eb;
    font-size: 1.05rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform .14s ease, background .16s ease, box-shadow .16s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.2);
    border-color: transparent;
}

.share-copy-wrap {
    position: relative;
    display: inline-flex;
}

.share-copied {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #065f46;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    letter-spacing: 0.3px;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(6, 95, 70, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 5;
}

.share-copied::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #065f46;
}

.share-copied.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}

.detail-back:hover { text-decoration: underline; }

/* ── RELATED ── */
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media(max-width:860px) {
    .related-grid { grid-template-columns: 1fr; }
    .detail-footer { flex-direction: column; align-items: flex-start; }
}

.related-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.09);
    box-shadow: 0 4px 24px rgba(11, 31, 58, 0.07);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.related-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 42px rgba(11, 31, 58, 0.12);
    border-color: rgba(37, 99, 235, 0.18);
}

.related-media {
    height: 140px;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.related-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
}

.related-card:hover .related-media img { transform: scale(1.06); }

.related-fallback {
    height: 100%;
    min-height: 140px;
}

.related-fallback .fallback-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 1.1rem;
}

.related-fallback .fallback-title {
    font-size: 0.82rem;
    -webkit-line-clamp: 2;
}

.related-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-body time {
    font-size: 0.76rem;
    color: #8fa3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.related-body h3 {
    margin: 0;
    font-family: 'Sora', sans-serif;
    font-size: 0.96rem;
    font-weight: 700;
    color: #0b1f3a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2563eb;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.84rem;
    margin-top: 2px;
    transition: gap .2s ease;
}

.related-card:hover .related-link { gap: 10px; }
