/* Compact, aligned homepage composition inspired by the reference layout. */
.home #pnbyw-main.pnbyw-content-area.pnbyw-home-standard {
  align-items:start!important;
  box-sizing:border-box!important;
}

.home #pnbyw-content.pnbyw-home-main,
.home #pnbyw-main > .pnbyw-sidebar {
  align-self:start!important;
  min-width:0!important;
}

.home .pnbyw-entry-body,
.home .pnbyw-home-blocks {
  min-width:0;
}

/* Simple homepage surface: clear cards, light background and short rhythm. */
.home #pnbyw-main {
  background:#f4f6f8;
}

.home .pnbyw-entry-body > .wp-block-columns {
  align-items:flex-start!important;
  gap:16px!important;
  margin:0 0 16px!important;
}

.home .pnbyw-entry-body > .wp-block-columns > .wp-block-column {
  min-width:0;
  margin:0!important;
}

.home .pnbyw-entry-body > .wp-block-columns > .wp-block-column > :is(
  .wp-block-pnbyw-berita-kategori,
  .wp-block-pnbyw-rss-feed,
  .pnbyw-notice-list
) {
  margin:0!important;
  padding:16px!important;
  border:1px solid #e7eaee!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 5px 16px rgba(15,23,42,.045)!important;
}

.home .pnbyw-entry-body > :is(
  .wp-block-pnbyw-berita-kategori,
  .wp-block-pnbyw-rss-feed,
  .pnbyw-notice-list,
  .wp-block-pnbyw-jadwal-sidang
) {
  padding:16px!important;
  border:1px solid #e7eaee!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 5px 16px rgba(15,23,42,.045)!important;
}

.home .pnbyw-entry-body > [class*="wp-block-pnbyw-"]:not(.wp-block-pnbyw-slider),
.home .pnbyw-notice-list {
  margin-bottom:18px!important;
}

/* Maklumat uses the lightweight mobile pattern at every viewport. The
   document image is fetched by the lightbox only after the row is clicked. */
.home .pnbyw-home-maklumat--compact {
  contain-intrinsic-size:180px!important;
  margin-bottom:18px!important;
}

.home .pnbyw-home-maklumat--compact .pnbyw-home-maklumat-grid {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:stretch;
  gap:16px!important;
}

.home .pnbyw-home-maklumat--compact .pnbyw-home-maklumat-card {
  overflow:visible!important;
  border:0!important;
  border-radius:12px!important;
  background:transparent!important;
  box-shadow:none!important;
}

.home .pnbyw-home-maklumat--compact .pnbyw-home-maklumat-link {
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  min-height:54px!important;
  padding:11px 12px 11px 15px!important;
  border:1px solid #e2e7ec!important;
  border-left:4px solid #9a2109!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 3px 12px rgba(15,23,42,.055)!important;
  box-sizing:border-box!important;
}

.home .pnbyw-home-maklumat--compact .pnbyw-home-maklumat-link::after {
  display:none!important;
}

.home .pnbyw-home-maklumat--compact .pnbyw-home-maklumat-action {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  min-width:50px;
  min-height:28px;
  padding:4px 9px;
  border-radius:999px;
  background:#fff3ee;
  color:#9a2109;
  font-size:11px;
  font-weight:800;
  box-sizing:border-box;
}

.home .pnbyw-home-maklumat--compact .pnbyw-home-maklumat-mobile-label {
  display:block!important;
  color:#7f1b08!important;
  font-size:13px!important;
  font-weight:800!important;
  line-height:1.35!important;
}

.home .pnbyw-home-maklumat--compact .pnbyw-home-maklumat-image {
  display:none!important;
}

.home .wp-block-pnbyw-berita-kategori .pnbyw-news-grid {
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
}

.home .wp-block-pnbyw-berita-kategori .pnbyw-news-card__media {
  flex-basis:clamp(140px,12vw,176px)!important;
  height:clamp(140px,12vw,176px)!important;
  padding:8px!important;
}

.home .wp-block-pnbyw-berita-kategori .pnbyw-news-card__body {
  gap:7px!important;
  padding:12px!important;
}

.home .pnbyw-news-card__body h3,
.home .pnbyw-news-card__excerpt {
  display:-webkit-box;
  overflow:hidden;
  -webkit-box-orient:vertical;
}

.home .pnbyw-news-card__body h3 { -webkit-line-clamp:2; }
.home .pnbyw-news-card__excerpt { -webkit-line-clamp:2; }

.home .pnbyw-notice-list__items { gap:8px; }
.home .pnbyw-notice-card { min-height:70px; }
.home .pnbyw-notice-card__content { gap:5px; padding:10px 14px; }
.home .pnbyw-notice-list__header { margin-bottom:14px; }
.home .pnbyw-notice-list__footer { padding-top:10px; }

.home #pnbyw-main .pnbyw-sidebar-inner {
  display:flex!important;
  flex-direction:column!important;
  gap:14px!important;
  align-items:stretch!important;
}

.home #pnbyw-main .pnbyw-sidebar-inner > * {
  width:100%!important;
  min-width:0!important;
  min-height:104px;
  margin:0!important;
}

/* Give compact utility widgets enough breathing room without forcing tall
   content widgets (surveys, statistics, links) to an artificial height. */
.home #pnbyw-main .pnbyw-sidebar-inner > * > :is(
  .pnbyw-alih-bahasa-widget,
  .pnbyw-pencarian-widget,
  .pnbyw-jam-widget,
  .pnbyw-widget
) {
  min-height:104px;
}

.home #pnbyw-main .pnbyw-alih-bahasa-widget {
  min-height:104px!important;
  overflow:visible!important;
}

.home #pnbyw-main .pnbyw-alih-bahasa-body {
  display:flex;
  align-items:center;
  min-height:64px;
}

@media (min-width:1101px) {
  .home #pnbyw-main.pnbyw-content-area.pnbyw-home-standard {
    grid-template-columns:minmax(0,1fr) clamp(286px,22vw,320px)!important;
    gap:24px!important;
    width:min(100%,1440px)!important;
    max-width:1440px!important;
    margin-inline:auto!important;
    padding:20px 24px 28px!important;
  }

  .home #pnbyw-main > .pnbyw-sidebar {
    width:100%!important;
    min-width:0!important;
    max-width:320px!important;
  }
}

@media (min-width:981px) and (max-width:1100px) {
  .home #pnbyw-main.pnbyw-content-area.pnbyw-home-standard {
    grid-template-columns:minmax(0,1fr) 250px!important;
    gap:20px!important;
  }
}

@media (max-width:980px) {
  .home #pnbyw-main.pnbyw-content-area.pnbyw-home-standard {
    grid-template-columns:minmax(0,1fr)!important;
  }

  .home #pnbyw-main > .pnbyw-sidebar {
    grid-column:1!important;
    width:100%!important;
    max-width:none!important;
  }

  .home #pnbyw-main .pnbyw-sidebar-inner {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .home .pnbyw-entry-body > .wp-block-columns {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
  }
}

@media (max-width:680px) {
  .home .wp-block-pnbyw-berita-kategori .pnbyw-news-grid,
  .home #pnbyw-main .pnbyw-sidebar-inner {
    grid-template-columns:minmax(0,1fr)!important;
  }

  .home .wp-block-pnbyw-berita-kategori .pnbyw-news-card__media {
    flex-basis:176px!important;
    height:176px!important;
  }


  .home .pnbyw-entry-body > .wp-block-columns > .wp-block-column > :is(
    .wp-block-pnbyw-berita-kategori,
    .wp-block-pnbyw-rss-feed,
    .pnbyw-notice-list
  ),
  .home .pnbyw-entry-body > :is(
    .wp-block-pnbyw-berita-kategori,
    .wp-block-pnbyw-rss-feed,
    .pnbyw-notice-list,
    .wp-block-pnbyw-jadwal-sidang
  ) {
    padding:13px!important;
    border-radius:12px!important;
  }
}

/* Equal-height maklumat cards; keep long labels readable on narrow screens. */
.home .pnbyw-home-maklumat--compact .pnbyw-home-maklumat-card {
  display:flex;
  min-width:0;
}
.home .pnbyw-home-maklumat--compact .pnbyw-home-maklumat-link {
  width:100%;
  height:100%;
}
@media(min-width:721px) {
  .home .pnbyw-home-maklumat--compact .pnbyw-home-maklumat-link {
    min-height:68px!important;
  }
}
@media(max-width:720px) {
  .home .pnbyw-home-maklumat--compact .pnbyw-home-maklumat-grid {
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
  }
}
