/* PA Berita, Artikel & Pengumuman - Frontend Styles (#056e4f & #ff9900) */
.pa-pub-app {
    --pb-p: var(--pa-primary, #056e4f);
    --pb-pd: var(--pa-primary-dark, #034d37);
    --pb-pl: var(--pa-primary-light, #e7f4f0);
    --pb-s: var(--pa-secondary, #ff9900);
    --pb-sd: var(--pa-secondary-dark, #d47f00);
    --pb-surface: var(--pa-surface, #ffffff);
    --pb-bg: var(--pa-bg, #f6f8f7);
    --pb-text: var(--pa-text, #1b2420);
    --pb-muted: var(--pa-muted, #52615b);
    --pb-border: var(--pa-border, #d7e2dd);
    margin: 1rem 0 2rem;
    color: var(--pb-text);
}

.pa-pub-header {
    background: linear-gradient(135deg, var(--pb-p) 0%, var(--pb-pd) 100%);
    color: #ffffff;
    border-bottom: 4px solid var(--pb-s);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.1rem;
}
.pa-pub-badge {
    display: inline-block;
    background: var(--pb-s);
    color: #111a16;
    font-weight: 800;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.16rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.4rem;
}
.pa-pub-title { margin: 0 0 0.2rem; font-size: 1.38rem; color: #ffee00; line-height: 1.25; }
.pa-pub-sub { margin: 0; font-size: 0.86rem; color: #e7f4f0; }

.pa-pub-home-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 3px solid var(--pb-p);
    padding-bottom: 0.55rem;
    margin-bottom: 1.15rem;
}
.pa-pub-home-head h2 { margin: 0; font-size: 1.3rem; color: var(--pb-p); }

.pa-pub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.48rem 0.95rem;
    border-radius: 7px;
    border: none;
    font-weight: 700;
    font-size: 0.83rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.2s ease;
}
.pa-pub-btn:hover { transform: translateY(-1px); text-decoration: none; }
.pa-pub-btn-primary { background: var(--pb-p); color: #ffffff; }
.pa-pub-btn-primary:hover { background: var(--pb-pd); color: #ffffff; }
.pa-pub-btn-secondary { background: var(--pb-s); color: #111a16; }
.pa-pub-btn-secondary:hover { background: #ffad33; color: #111a16; }
.pa-pub-btn-outline { background: transparent; color: var(--pb-p); border: 1.5px solid var(--pb-p); }
.pa-pub-btn-outline:hover { background: var(--pb-p); color: #ffffff; }
.pa-pub-btn-light { background: rgba(255,255,255,0.16); color: #ffffff; border: 1px solid rgba(255,255,255,0.4); }
.pa-pub-btn-light:hover { background: #ffffff; color: var(--pb-pd); }
.pa-pub-btn-sm { padding: 0.32rem 0.7rem; font-size: 0.78rem; }

/* Spotlight Card */
.pa-pub-spotlight {
    display: grid;
    grid-template-columns: 1.05fr 1.25fr;
    background: var(--pb-surface);
    border: 1px solid var(--pb-border);
    border-left: 6px solid var(--pb-s);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.15rem;
    box-shadow: 0 6px 20px rgba(5,110,79,0.09);
}
.pa-pub-spot-media {
    min-height: 240px;
    background: linear-gradient(135deg, var(--pb-p) 0%, var(--pb-pd) 100%);
    position: relative;
    overflow: hidden;
}
.pa-pub-spot-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pa-pub-spot-placeholder {
    width: 100%; height: 100%; min-height: 240px;
    display: flex; align-items: center; justify-content: center;
    color: #ffee00; font-weight: 800; font-size: 1.1rem; text-align: center; padding: 1.25rem;
}
.pa-pub-spot-body { padding: 1.35rem 1.5rem; display: flex; flex-direction: column; gap: 0.55rem; }
.pa-pub-spot-body h3 { margin: 0; font-size: 1.25rem; line-height: 1.3; color: var(--pb-text); }
.pa-pub-spot-body p { margin: 0; font-size: 0.9rem; color: var(--pb-muted); }

/* Controls & Dynamic Category Tabs */
.pa-pub-controls {
    background: var(--pb-surface);
    border: 1px solid var(--pb-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.15rem;
}
.pa-pub-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.75rem; }
.pa-pub-tab {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: var(--pb-bg); border: 1.5px solid var(--pb-border); color: var(--pb-text);
    border-radius: 999px; padding: 0.35rem 0.88rem; font-size: 0.83rem; font-weight: 700; cursor: pointer;
}
.pa-pub-tab.is-active, .pa-pub-tab:hover { background: var(--pb-p); border-color: var(--pb-p); color: #ffffff; }
.pa-pub-tab-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

.pa-pub-filters { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; }
.pa-pub-input {
    padding: 0.45rem 0.75rem; border: 1.5px solid var(--pb-border); border-radius: 7px;
    font-size: 0.86rem; background: var(--pb-surface); color: var(--pb-text);
}
.pa-pub-input[type="search"] { flex: 1 1 230px; }
.pa-pub-view-switch { display: inline-flex; gap: 0.3rem; margin-left: auto; }
.pa-pub-mini-btn {
    background: var(--pb-bg); border: 1px solid var(--pb-border); color: var(--pb-text);
    border-radius: 6px; padding: 0.38rem 0.72rem; font-size: 0.8rem; font-weight: 700; cursor: pointer;
}
.pa-pub-mini-btn.is-active, .pa-pub-mini-btn:hover { background: var(--pb-s); border-color: var(--pb-s); color: #111a16; }

/* Symmetrical 3-Column Grid */
.pa-pub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}
.pa-pub-card {
    background: var(--pb-surface);
    border: 1px solid var(--pb-border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 3px 12px rgba(5,110,79,0.06);
    transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.pa-pub-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(5,110,79,0.12); }
.pa-pub-thumb {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--pb-p) 0%, var(--pb-pd) 100%);
    position: relative;
    overflow: hidden;
}
.pa-pub-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pa-pub-thumb-ph {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: #ffee00; font-weight: 800; font-size: 0.92rem; text-align: center; padding: 0.75rem;
}
.pa-pub-card-body { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.48rem; flex: 1; }
.pa-pub-meta { font-size: 0.77rem; color: var(--pb-muted); display: flex; flex-wrap: wrap; gap: 0.35rem 0.65rem; }
.pa-pub-card-title { margin: 0; font-size: 1rem; line-height: 1.35; color: var(--pb-text); }
.pa-pub-card-title a { color: inherit; text-decoration: none; }
.pa-pub-card-title a:hover { color: var(--pb-p); }
.pa-pub-excerpt { margin: 0; font-size: 0.85rem; color: var(--pb-muted); line-height: 1.5; }
.pa-pub-card-foot { margin-top: auto; padding-top: 0.55rem; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }

/* List View */
.pa-pub-list { display: flex; flex-direction: column; gap: 0.75rem; }
.pa-pub-list-row {
    background: var(--pb-surface);
    border: 1px solid var(--pb-border);
    border-left: 5px solid var(--pb-p);
    border-radius: 10px;
    padding: 0.95rem 1.15rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    box-shadow: 0 2px 10px rgba(5,110,79,0.05);
}
.pa-pub-list-main { flex: 1 1 420px; min-width: 0; }
.pa-pub-list-main h4 { margin: 0.25rem 0; font-size: 1.02rem; }
.pa-pub-list-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Category & Status Chips */
.pa-pub-chip {
    display: inline-block;
    padding: 0.14rem 0.58rem;
    border-radius: 999px;
    font-size: 0.71rem;
    font-weight: 800;
    color: #ffffff;
    background: var(--pb-p);
}
.pa-pub-chip-pin { background: #ff9900; color: #111a16; }
.pa-pub-chip-pdf { background: #e7f4f0; color: #034d37; border: 1px solid rgba(5,110,79,0.22); }

/* Pagination */
.pa-pub-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.35rem;
}
.pa-pub-page-btn {
    min-width: 36px; height: 36px; padding: 0 0.7rem;
    border: 1.5px solid var(--pb-border); border-radius: 7px;
    background: var(--pb-surface); color: var(--pb-text); font-weight: 700; cursor: pointer;
}
.pa-pub-page-btn.is-active, .pa-pub-page-btn:hover { background: var(--pb-p); border-color: var(--pb-p); color: #ffffff; }

/* Modal Reader */
.pa-pub-modal-bg {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.68);
    z-index: 9999; align-items: center; justify-content: center; padding: 1rem;
}
.pa-pub-modal-bg.is-open { display: flex; }
.pa-pub-modal {
    background: var(--pb-surface); border: 2px solid var(--pb-p); border-radius: 12px;
    width: 100%; max-width: 860px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.pa-pub-modal-head {
    background: var(--pb-p); color: #ffffff; padding: 0.85rem 1.2rem;
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.65rem;
}
.pa-pub-modal-head h3 { margin: 0; font-size: 1.05rem; color: #ffee00; }
.pa-pub-modal-head small { color: #e7f4f0; font-size: 0.78rem; }
.pa-pub-modal-body { padding: 1.3rem 1.5rem; overflow-y: auto; line-height: 1.7; font-size: 0.94rem; }
.pa-pub-modal-cover { width: 100%; max-height: 340px; object-fit: cover; border-radius: 8px; margin-bottom: 1rem; }
.pa-pub-pdf-box {
    margin-top: 1.25rem; border: 1.5px solid var(--pb-p); border-radius: 9px; overflow: hidden; background: var(--pb-bg);
}
.pa-pub-pdf-bar {
    background: var(--pb-pl); padding: 0.55rem 0.9rem; display: flex; flex-wrap: wrap;
    justify-content: space-between; align-items: center; gap: 0.5rem; font-size: 0.84rem; font-weight: 700; color: var(--pb-pd);
}
.pa-pub-pdf-frame { width: 100%; height: 480px; border: 0; display: block; background: #fff; }

/* Mode Sorotan (1 Berita Besar Kiri + 3 Berita Ringkas Kanan) */
.pa-pub-sorotan {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 1.15rem;
    align-items: stretch;
}
.pa-pub-sorotan-main {
    background: var(--pb-surface);
    border: 1px solid var(--pb-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(5,110,79,0.06);
}
.pa-pub-sorotan-main-media {
    display: block;
    height: 280px;
    overflow: hidden;
    background: var(--pb-pl);
}
.pa-pub-sorotan-main-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.pa-pub-sorotan-main:hover .pa-pub-sorotan-main-media img {
    transform: scale(1.03);
}
.pa-pub-sorotan-main-body {
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}
.pa-pub-sorotan-main-title {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.35;
}
.pa-pub-sorotan-main-title a,
.pa-pub-sorotan-item-title a {
    color: var(--pb-text);
    text-decoration: none;
}
.pa-pub-sorotan-main-title a:hover,
.pa-pub-sorotan-item-title a:hover {
    color: var(--pb-p);
    text-decoration: underline;
}
.pa-pub-sorotan-excerpt {
    margin: 0;
    font-size: 0.87rem;
    color: var(--pb-muted);
    line-height: 1.5;
}
.pa-pub-sorotan-date {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pb-sd);
}
.pa-pub-sorotan-more {
    margin-top: auto;
    padding-top: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--pb-p);
    text-decoration: none;
    display: inline-block;
}
.pa-pub-sorotan-more:hover {
    color: var(--pb-s);
    text-decoration: underline;
}
.pa-pub-sorotan-side {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    justify-content: space-between;
}
.pa-pub-sorotan-item {
    background: var(--pb-surface);
    border: 1px solid var(--pb-border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    flex: 1;
    box-shadow: 0 3px 10px rgba(5,110,79,0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.pa-pub-sorotan-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(5,110,79,0.1);
}
.pa-pub-sorotan-item-media {
    width: 124px;
    min-height: 104px;
    flex-shrink: 0;
    background: var(--pb-pl);
    overflow: hidden;
    display: block;
}
.pa-pub-sorotan-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pa-pub-sorotan-item-body {
    padding: 0.75rem 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}
.pa-pub-sorotan-item-title {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* High Contrast WCAG */
body.pa-high-contrast .pa-pub-header,
body.pa-high-contrast .pa-pub-modal-head {
    background: #000000 !important; color: #ffff00 !important; border-bottom: 2px solid #ffff00 !important;
}
body.pa-high-contrast .pa-pub-card,
body.pa-high-contrast .pa-pub-list-row,
body.pa-high-contrast .pa-pub-spotlight,
body.pa-high-contrast .pa-pub-controls {
    background: #000000 !important; color: #ffffff !important; border-color: #ffff00 !important;
}

@media (max-width: 960px) {
    .pa-pub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pa-pub-spotlight { grid-template-columns: 1fr; }
    .pa-pub-sorotan { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .pa-pub-grid { grid-template-columns: 1fr; }
    .pa-pub-sorotan-main-media { height: 210px; }
    .pa-pub-sorotan-item-media { width: 96px; min-height: 92px; }
}
