/**
 * Dynamic page content styles layered on top of the design system
 * (public/page_theme/css/site.css). Also used by the admin preview iframe.
 */

/* Badge for dynamic pages */
.badge-halaman {
    background: var(--pp-green);
}

/* Content area */
.dp-content {
    font-size: 1.02rem;
    line-height: 1.85;
    color: var(--pp-ink);
    overflow-wrap: anywhere;
}

.dp-content > :first-child {
    margin-top: 0;
}

.dp-content > :last-child {
    margin-bottom: 0;
}

.dp-content h1,
.dp-content h2,
.dp-content h3,
.dp-content h4,
.dp-content h5,
.dp-content h6 {
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    color: var(--pp-green-dark);
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin: 1.7em 0 0.6em;
}

.dp-content h1 { font-size: 1.8em; }
.dp-content h2 { font-size: 1.5em; }
.dp-content h3 { font-size: 1.28em; }
.dp-content h4 { font-size: 1.12em; }

.dp-content p {
    margin: 0 0 1.1em;
}

.dp-content a {
    color: var(--pp-green);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dp-content ul,
.dp-content ol {
    margin: 0 0 1.15em;
    padding-left: 1.6em;
}

.dp-content li {
    margin: 0.35em 0;
}

.dp-content blockquote {
    border-left: 4px solid var(--pp-gold);
    background: var(--pp-green-soft);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-family: 'Bricolage Grotesque', system-ui, sans-serif;
    font-style: normal;
    color: var(--pp-ink);
}

.dp-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.6rem;
}

.dp-content figure {
    margin: 1.6em 0;
}

.dp-content figcaption {
    margin-top: 0.5rem;
    color: var(--pp-muted);
    font-size: 0.85rem;
    text-align: center;
}

.dp-content hr {
    margin: 2em 0;
    border: 0;
    border-top: 1px solid #dde4e0;
}

.dp-content pre {
    margin: 1.4em 0;
    padding: 1.1rem 1.25rem;
    overflow: auto;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.dp-content code {
    padding: 0.15em 0.4em;
    border-radius: 0.3rem;
    background: var(--pp-green-soft);
    color: var(--pp-green-dark);
    font-size: 0.9em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dp-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
}

.dp-content table {
    display: block;
    width: 100%;
    margin: 1.4em 0;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.dp-content th,
.dp-content td {
    padding: 0.65rem 0.85rem;
    border: 1px solid #dde4e0;
    text-align: left;
    vertical-align: top;
}

.dp-content th {
    background: var(--pp-green-soft);
    color: var(--pp-green-dark);
    font-weight: 700;
}

.dp-content iframe {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 0.6rem;
}

.dp-content video,
.dp-content audio {
    max-width: 100%;
}

.dp-content details {
    margin: 1.2em 0;
    padding: 0.75rem 1rem;
    border: 1px solid #dde4e0;
    border-radius: 0.5rem;
}

.dp-content summary {
    cursor: pointer;
    font-weight: 600;
}

/* Post additions layered on the design system */
.chip.active {
    background: var(--pp-green);
    color: #fff;
}

.article-cover {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    border-radius: 0.6rem;
}

.news-card .card-img-top {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 0.6rem 0.6rem 0 0;
}

.dp-content .post-embed {
    margin: 1.6em 0;
}

/* Editor preview iframe */
.pg-preview-body {
    margin: 0;
    padding: 24px;
    background: var(--pp-bg);
}

.pg-preview-body .article {
    max-width: 860px;
    margin: 0 auto;
}

@media (max-width: 575.98px) {
    .pg-preview-body {
        padding: 12px;
    }

    .article {
        padding: 1rem;
    }
}

