/* --- PROFESSIONAL ARTICLE TEMPLATE (APP-LIKE FIXED) --- */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;1,400&family=Inter:wght@400;600;700;800&display=swap');

/* =====================
   GLOBAL & MOBILE FIX
===================== */

html {
    font-size: 14px; /* KUNCI: bikin web setara WebView app */
}
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* =====================
   BASE
===================== */

.article-wrapper {
    background-color: var(--bg, #f8fafc);
    padding-bottom: 72px;
}

/* =====================
   TYPOGRAPHY SYSTEM
===================== */

.article-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px; /* lebih rapat seperti app */
    color: var(--text, #1e293b);
    font-family: 'Merriweather', serif;

    /*  KUNCI UTAMA BIAR SAMA APP */
    font-size: clamp(13px, 1.1vw, 14px);
    line-height: 1.6;
    letter-spacing: -0.015em;
}

/* JUSTIFY HANYA ISI */
.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote,
.article-content .caption {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

.article-content p {
    margin-bottom: 1rem;
    font-weight: 300;
}

.article-content a {
    color: #2563EB;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* =====================
   HEADINGS (APP SCALE)
===================== */

.article-content h1,
.article-content h2,
.article-content h3 {
    font-family: 'Inter', sans-serif;
    color: #111827;
    font-weight: 800;
    line-height: 1.25;
    margin-top: 1.6rem;
    margin-bottom: 0.6rem;
    text-align: left;
}

.article-content h1 {
    font-size: clamp(22px, 5vw, 26px); /* FIX: gak kegedean */
    margin-top: 0;
    letter-spacing: -0.03em;
}

.article-content h2 {
    font-size: clamp(17px, 4vw, 20px);
}

.article-content h3 {
    font-size: clamp(15px, 3.5vw, 17px);
}

/* =====================
   LIST
===================== */

.article-content ul,
.article-content ol {
    margin: 0.8rem 0;
    padding-left: 1.2rem;
}

.article-content li {
    margin-bottom: 0.45rem;
    line-height: 1.55;
}

/* =====================
   IMAGE
===================== */

.article-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.4rem auto;
    display: block;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.article-content .caption {
    display: block;
    text-align: center;
    font-size: 12px; /* app-sized */
    color: var(--text-light, #64748b);
    font-family: 'Inter', sans-serif;
    margin: 0.4rem auto 1.4rem;
}

/* =====================
   CODE
===================== */

.article-content code {
    background: rgba(0,0,0,0.05);
    padding: 0.12rem 0.3rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85em;
}

.article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.4rem 0;
    font-size: 0.82rem;
    line-height: 1.45;
}

/* =====================
   BLOCKQUOTE
===================== */

.article-content blockquote {
    border-left: 3px solid #2563EB;
    padding-left: 1.1rem;
    color: var(--text-light, #475569);
    margin: 1.4rem 0;
    font-weight: 300;
}

/* =====================
   HEADER AREA
===================== */

.article-header-area {
    max-width: 720px;
    margin: 28px auto 20px;
    padding: 0 16px;
    font-family: 'Inter', sans-serif;
}

/* Breadcrumb */
.breadcrumbs {
    font-size: 12px;
    color: var(--text-light, #64748b);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =====================
   AUTHOR
===================== */

.author-bio {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.author-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text, #1e293b);
}

.publish-date {
    font-size: 12px;
    color: var(--text-light, #64748b);
    margin-top: 2px;
}

/* =====================
   SHARE
===================== */

.share-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.8rem;
}

.share-label {
    font-size: 13px;
    font-weight: 600;
}

.share-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* =====================
   ADS
===================== */

.ad-banner {
    width: 100%;
    height: 90px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    margin: 28px auto;
    border-radius: 10px;
    font-size: 12px;
}

.share-icon i {
    color: #000 !important;
}
/* =====================
   DARK MODE
===================== */
hr {
    border: none;
    height: 1px;
    background-color: currentColor;
    opacity: 0.15;
}
body.dark-mode .article-wrapper { background-color: #0f172a; }
body.dark-mode .article-content { color: #e2e8f0; }
body.dark-mode .article-content h1,
body.dark-mode .article-content h2,
body.dark-mode .article-content h3 { color: #f1f5f9; }
body.dark-mode .ad-banner { background: #1e293b; border-color: #334155; }
body.dark-mode .caption,
body.dark-mode .publish-date,
body.dark-mode .breadcrumbs { color: #94a3b8; }