/* Homepage presentation. Block data and sidebar settings remain WordPress-owned. */
.pnbyw-home-editor-content {
    --pnbyw-card-border: #e6e8ed;
    --pnbyw-card-shadow: 0 4px 18px rgb(24 35 52 / 5%);
    --pnbyw-muted: #616b78;
    --pnbyw-ink: #253247;
}
.pnbyw-home-editor-content .wp-block-columns { gap: 24px; align-items: flex-start; }
.pnbyw-home-editor-content .wp-block-column,
.pnbyw-home-section .wp-block-group { min-width: 0; }
.pnbyw-home-section { margin-bottom: 32px; }
.pnbyw-home-editor-content img { max-width: 100%; height: auto; }
.pnbyw-home-editor-content :focus-visible { outline: 3px solid #9a2109; outline-offset: 4px; }

/* Quiet surfaces and consistent section headings. */
.pnbyw-home-editor-content :is(.wp-block-pnbyw-berita-kategori, .wp-block-pnbyw-rss-feed, .wp-block-pnbyw-video-profil) {
    box-sizing: border-box;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--pnbyw-card-border);
    border-radius: 14px;
    box-shadow: var(--pnbyw-card-shadow);
    overflow: hidden;
}
/* News cards also work when an announcement has no image. */
.pnbyw-home-editor-content .wp-block-pnbyw-berita-kategori { margin-bottom: 28px; }
.pnbyw-home-editor-content .pnbyw-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding: 20px;
    margin: 0;
}
.pnbyw-home-editor-content .pnbyw-news-grid > li { margin: 0; display: flex; }
.pnbyw-home-editor-content .pnbyw-news-grid article {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--pnbyw-card-border);
    border-radius: 10px;
    overflow: hidden;
}
.pnbyw-home-editor-content .pnbyw-news-grid a {
    display: flex;
    flex: 1;
    flex-direction: column;
    color: var(--pnbyw-ink);
    text-decoration: none;
}
.pnbyw-home-editor-content .pnbyw-news-grid a:hover { color: #9a2109; }
.pnbyw-home-editor-content .pnbyw-news-grid a:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.pnbyw-home-editor-content .pnbyw-news-grid img { aspect-ratio: 16 / 10; width: 100%; object-fit: contain; background: #f3f4f6; border-radius: 0; }
.pnbyw-home-editor-content .pnbyw-news-grid h3 {
    margin: 0;
    flex: 1;
    padding: 15px 14px 10px;
    color: inherit;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 650;
    text-transform: none;
}
.pnbyw-home-editor-content .pnbyw-news-grid time {
    padding: 0 14px 15px;
    color: var(--pnbyw-muted);
    font-size: 12px;
    line-height: 1.5;
}
.pnbyw-home-editor-content .wp-block-pnbyw-berita-kategori .pnbyw-news-card__media { display: flex; flex: 0 0 230px; align-items: center; justify-content: center; height: 230px; aspect-ratio: auto; padding: 10px; box-sizing: border-box; background: #f6f7f9; }
.pnbyw-home-editor-content .wp-block-pnbyw-berita-kategori .pnbyw-news-card__media img { width: auto; height: auto; max-width: 100%; max-height: 100%; aspect-ratio: auto; object-fit: contain; background: transparent; }
.pnbyw-home-editor-content .wp-block-pnbyw-berita-kategori .pnbyw-news-card__date { position: static; align-self: flex-start; display: inline-flex; margin: 0; padding: 4px 8px; border: 1px solid #f0e5e1; border-radius: 5px; background: #fff8f5; color: #9a2109; font-size: 11px; font-weight: 700; line-height: 1.3; box-shadow: none; }
.pnbyw-home-editor-content .wp-block-pnbyw-berita-kategori .pnbyw-news-card__body { gap: 10px; padding: 15px; }
.pnbyw-home-editor-content .wp-block-pnbyw-berita-kategori .pnbyw-news-card__body h3 { margin: 0; padding: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.pnbyw-home-editor-content .wp-block-pnbyw-berita-kategori .pnbyw-news-card__author { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; color: #526174; font-size: 12px; }
.pnbyw-home-editor-content .wp-block-pnbyw-berita-kategori .pnbyw-news-card__author-label { color: #9a2109; font-weight: 700; }
.pnbyw-home-editor-content .wp-block-pnbyw-berita-kategori .pnbyw-news-card__excerpt { text-align: left; }
.pnbyw-home-editor-content .wp-block-pnbyw-berita-kategori .pnbyw-news-card__readmore { display: inline-flex; flex: 0 0 auto; flex-direction: row; align-self: flex-start; align-items: center; justify-content: center; gap: 7px; width: auto; min-height: 36px; margin-top: auto; padding: 7px 12px; border-radius: 7px; background: #fff3ef; color: #9a2109; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.pnbyw-home-editor-content .wp-block-pnbyw-berita-kategori .pnbyw-news-card__readmore:hover { background: #9a2109; color: #fff; }
.pnbyw-home-editor-content .pnbyw-news-more {
    display: block;
    margin: 0;
    padding: 14px 20px;
    border-top: 1px solid var(--pnbyw-card-border);
    background: #fafbfc;
    color: #85200d;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.pnbyw-home-editor-content .pnbyw-news-more:hover { text-decoration: underline; text-underline-offset: 3px; }

.pnbyw-home-editor-content .wp-block-columns.pnbyw-rss-columns { margin-bottom: 32px; }

/* RSS block surfaces are cards; component CSS owns each heading style. */
.pnbyw-home-editor-content .wp-block-pnbyw-rss-feed { margin: 0 0 24px; border: 1px solid #e0e6ed; border-radius: 15px; background: #fff; box-shadow: 0 5px 16px rgba(15,23,42,.06); overflow: hidden; }
.pnbyw-home-editor-content .wp-block-pnbyw-rss-feed > ul { margin: 0; padding: 0; list-style: none; }
.pnbyw-home-editor-content .wp-block-pnbyw-rss-feed li { position: relative; min-height: 73px; margin: 0; padding: 11px 16px 7px 35px; }
.pnbyw-home-editor-content .wp-block-pnbyw-rss-feed li::before { content: ''; position: absolute; top: 18px; left: 18px; width: 4px; height: 4px; background: #b32409; transform: rotate(45deg); }
.pnbyw-home-editor-content .wp-block-pnbyw-rss-feed li + li { border-top: 1px dashed #e2e7ee; }
.pnbyw-home-editor-content .wp-block-pnbyw-rss-feed li > a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 36px; color: #a52208; font-size: 13px; font-weight: 700; line-height: 18px; text-decoration: none; overflow-wrap: anywhere; }
.pnbyw-home-editor-content .wp-block-pnbyw-rss-feed li > a:hover { color: #c32b0b; text-decoration: underline; text-underline-offset: 3px; }
.pnbyw-home-editor-content .wp-block-pnbyw-rss-feed time { display: block; margin-top: 3px; color: #536b89; font-size: 12px; font-weight: 400; line-height: 15px; }
.pnbyw-home-editor-content .wp-block-pnbyw-rss-feed > p { margin: 0; padding: 20px; color: #536b89; font-size: 13px; }

/* Subgrid aligns each pair, even when feed counts and titles differ. */
@supports (grid-template-rows: subgrid) {
    @media (min-width: 782px) {
        .pnbyw-home-editor-content .wp-block-columns.pnbyw-rss-columns {
            display: grid;
            grid-template-columns: repeat(var(--pnbyw-rss-columns, 2), minmax(0, 1fr));
            grid-template-rows: repeat(var(--pnbyw-rss-rows, 1), auto);
            align-items: stretch;
        }
        .pnbyw-home-editor-content .pnbyw-rss-columns > .wp-block-column {
            display: grid;
            grid-template-rows: subgrid;
            grid-row: 1 / span var(--pnbyw-rss-rows, 1);
            gap: 24px;
            margin: 0;
        }
        .pnbyw-home-editor-content .pnbyw-rss-columns > .wp-block-column > .wp-block-pnbyw-rss-feed {
            margin: 0;
            align-self: stretch;
        }
    }
}

.pnbyw-home-editor-content .pnbyw-block-video-grid { padding: 20px; gap: 20px; }
.pnbyw-home-editor-content .pnbyw-block-video-grid figure { border: 1px solid var(--pnbyw-card-border); border-radius: 10px; overflow: hidden; background: #fafbfc; }
.pnbyw-home-editor-content .pnbyw-block-video-grid figcaption { padding: 13px 15px; color: var(--pnbyw-ink); font-size: 14px; }
.pnbyw-home-editor-content .pnbyw-js-widget { border-radius: 14px; border: 1px solid var(--pnbyw-card-border); box-shadow: var(--pnbyw-card-shadow); overflow: hidden; }

@media (max-width: 781px) {
    .pnbyw-home-editor-content .wp-block-columns { flex-wrap: wrap !important; gap: 24px; }
    .pnbyw-home-editor-content .wp-block-column { flex-basis: 100% !important; }
    .pnbyw-home-editor-content .pnbyw-news-grid { gap: 14px; padding: 16px; }
    .pnbyw-home-editor-content :is(.wp-block-pnbyw-berita-kategori, .wp-block-pnbyw-rss-feed) > h2 { font-size: 15px; }
    .pnbyw-home-editor-content .pnbyw-block-video-grid { padding: 16px; gap: 16px; }
}
@media (max-width: 600px) {
    .pnbyw-home-editor-content .pnbyw-news-grid { grid-template-columns: minmax(0, 1fr); }
    .pnbyw-home-editor-content .wp-block-pnbyw-berita-kategori .pnbyw-news-card__media { height: 210px; flex-basis: 210px; }
}
@media (prefers-reduced-motion: no-preference) {
    .pnbyw-home-editor-content .pnbyw-news-grid article { transition: box-shadow .18s ease, border-color .18s ease; }
    .pnbyw-home-editor-content .pnbyw-news-grid article:hover { border-color: #d6bbb3; box-shadow: 0 6px 16px rgb(24 35 52 / 7%); }
}

.pnbyw-home-editor-content .wp-block-pnbyw-berita-kategori { border-radius: 15px; }
