/* Halaman Acara publik (Home/events) — selaras dengan halaman Peraturan/Tentang Kami */

.p3kpi-events-section {
    position: relative;
    padding: 90px 0 70px;
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
    overflow: hidden;
}
.p3kpi-events-section::before,
.p3kpi-events-section::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.p3kpi-events-section::before { top: -90px; right: -90px; width: 240px; height: 240px; background: rgba(0, 89, 171, .05); animation: eventsFloat1 10s ease-in-out infinite; }
.p3kpi-events-section::after { bottom: -120px; left: -120px; width: 300px; height: 300px; background: rgba(31, 199, 223, .05); animation: eventsFloat2 12s ease-in-out infinite; }
@keyframes eventsFloat1 { 50% { transform: translate(-18px, 12px) scale(1.05); } }
@keyframes eventsFloat2 { 50% { transform: translate(18px, -15px) scale(1.04); } }

.p3kpi-events-wrap { position: relative; z-index: 1; }

/* Header */
.p3kpi-events-header { max-width: 820px; margin: 0 auto 28px; }
.p3kpi-events-badge {
    display: inline-block; padding: 8px 18px; border-radius: 999px;
    background: rgba(0, 89, 171, .08); color: #0059ab; font-size: 13px; font-weight: 700; margin-bottom: 16px;
}
.p3kpi-events-title { font-size: 2.2rem; font-weight: 700; color: #003b73; margin-bottom: 14px; }
.p3kpi-events-subtitle { color: #6d7a88; font-size: 15px; line-height: 1.9; margin-bottom: 0; }

/* Filter */
.p3kpi-events-filter {
    display: flex; justify-content: center; gap: 6px; flex-wrap: wrap;
    width: max-content; max-width: 100%; margin: 0 auto 36px; padding: 6px;
    background: #fff; border: 1px solid rgba(0, 89, 171, .1); border-radius: 999px;
    box-shadow: 0 10px 26px rgba(0, 89, 171, .06);
}
.p3kpi-events-filter a {
    padding: 9px 20px; border-radius: 999px; font-size: 14px; font-weight: 600;
    color: #4b5b6e; text-decoration: none; transition: background .15s ease, color .15s ease;
}
.p3kpi-events-filter a:hover { color: #0059ab; background: rgba(0, 89, 171, .06); }
.p3kpi-events-filter a.is-active { background: #0059ab; color: #fff; box-shadow: 0 8px 18px rgba(0, 89, 171, .25); }

/* Kartu acara */
.p3kpi-event-card {
    height: 100%; display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border-radius: 22px; border: 1px solid rgba(0, 89, 171, .08);
    box-shadow: 0 14px 36px rgba(0, 89, 171, .07);
    transition: transform .2s ease, box-shadow .2s ease;
}
.p3kpi-event-card:hover { transform: translateY(-4px); box-shadow: 0 22px 46px rgba(0, 89, 171, .12); }
.p3kpi-event-card.is-past .p3kpi-event-media img { filter: grayscale(.35); }

/* Banner tampil utuh (poster sering memuat teks di tepi); tanpa banner: bingkai 16:9 */
.p3kpi-event-media { position: relative; display: block; background: #0f2a4f; overflow: hidden; }
/* Semua banner setinggi sama (16:9); poster ditampilkan utuh (contain) di atas latar navy */
.p3kpi-event-media { aspect-ratio: 16 / 9; }
.p3kpi-event-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .35s ease; }
.p3kpi-event-card:hover .p3kpi-event-media > img { transform: scale(1.04); }
.p3kpi-event-placeholder {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(120% 120% at 20% 0%, #16396a 0%, #0f2a4f 55%, #0a1f3c 100%);
}
.p3kpi-event-placeholder img { width: 30%; opacity: .9; }

.p3kpi-event-date {
    position: absolute; left: 14px; top: 14px; min-width: 58px; padding: 6px 10px 7px;
    text-align: center; border-radius: 14px; background: #fff; color: #003b73;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18); line-height: 1.1;
}
.p3kpi-event-date strong { display: block; font-size: 22px; font-weight: 800; }
.p3kpi-event-date span { display: block; font-size: 11px; font-weight: 700; color: #0059ab; text-transform: uppercase; letter-spacing: .04em; }

.p3kpi-event-mode {
    position: absolute; right: 14px; top: 14px; display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: 999px; background: rgba(10, 31, 60, .72); color: #fff;
    font-size: 12px; font-weight: 600; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.p3kpi-event-status {
    position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
}
.p3kpi-event-status.is-open { background: #1e8e5a; }
.p3kpi-event-status.is-warning { background: #d68a00; }
.p3kpi-event-status.is-danger { background: #c0392b; }
.p3kpi-event-status.is-muted { background: rgba(60, 74, 94, .85); }
.p3kpi-event-status.is-live { background: #0059ab; }
.p3kpi-event-status.is-live i { animation: eventLive 1.4s ease-in-out infinite; }
@keyframes eventLive { 50% { opacity: .35; } }

.p3kpi-event-body { flex: 1; display: flex; flex-direction: column; padding: 20px 22px 22px; }
.p3kpi-event-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.p3kpi-event-flags .flag {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700;
}
.p3kpi-event-flags .flag-ts { background: #e8f5ee; color: #17754a; }
.p3kpi-event-flags .flag-nts { background: #fdf4e1; color: #9a6400; }
.p3kpi-event-flags .flag-public { background: rgba(0, 89, 171, .08); color: #0059ab; }

.p3kpi-event-title {
    font-size: 1.12rem; font-weight: 700; line-height: 1.4; margin: 0 0 8px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.p3kpi-event-title a { color: #0f2a4f; text-decoration: none; }
.p3kpi-event-title a:hover { color: #0059ab; }
.p3kpi-event-desc {
    color: #6d7a88; font-size: 14px; line-height: 1.7; margin: 0 0 14px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.p3kpi-event-meta { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.p3kpi-event-meta li { display: flex; gap: 10px; align-items: flex-start; color: #3c4a5e; font-size: 13.5px; line-height: 1.5; }
.p3kpi-event-meta li i { color: #0059ab; font-size: 17px; margin-top: 1px; flex-shrink: 0; }
.p3kpi-event-meta small { display: block; color: #8592a3; font-size: 12.5px; }

.p3kpi-event-quota { margin-bottom: 16px; }
.p3kpi-event-quota .quota-text { display: flex; justify-content: space-between; font-size: 12.5px; color: #6d7a88; margin-bottom: 6px; }
.p3kpi-event-quota .quota-text strong { color: #003b73; }
.p3kpi-event-quota .quota-bar { height: 6px; border-radius: 999px; background: #e9eff6; overflow: hidden; }
.p3kpi-event-quota .quota-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0059ab, #1fc7df); }

.p3kpi-event-footer {
    margin-top: auto; padding-top: 16px; border-top: 1px dashed rgba(0, 89, 171, .15);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.p3kpi-event-price small { display: block; font-size: 11.5px; color: #8592a3; }
.p3kpi-event-price strong { font-size: 1.05rem; color: #0f2a4f; }
.p3kpi-event-price.is-free strong { color: #1e8e5a; }
.p3kpi-event-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 12px;
    background: linear-gradient(135deg, #0059ab 0%, #1287c9 100%); color: #fff !important;
    font-weight: 700; font-size: 14px; white-space: nowrap; box-shadow: 0 10px 22px rgba(0, 89, 171, .22);
}
.p3kpi-event-btn:hover { filter: brightness(1.06); }
.p3kpi-event-btn i { transition: transform .15s ease; }
.p3kpi-event-btn:hover i { transform: translateX(3px); }

/* Kosong */
.p3kpi-events-empty {
    max-width: 560px; margin: 0 auto; padding: 48px 28px; text-align: center;
    background: #fff; border-radius: 22px; border: 1px solid rgba(0, 89, 171, .08); box-shadow: 0 14px 36px rgba(0, 89, 171, .07);
}
.p3kpi-events-empty .empty-icon {
    display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; border-radius: 50%;
    background: rgba(0, 89, 171, .08); color: #0059ab; font-size: 30px; margin-bottom: 14px;
}
.p3kpi-events-empty h5 { color: #003b73; font-weight: 700; }
.p3kpi-events-empty p { color: #6d7a88; }
.p3kpi-events-link { font-weight: 700; color: #0059ab; display: inline-flex; align-items: center; gap: 6px; }

.p3kpi-events-pager { margin-top: 12px; display: flex; justify-content: center; }

@media (max-width: 767px) {
    .p3kpi-events-section { padding: 56px 0 40px; }
    .p3kpi-events-title { font-size: 1.7rem; }
    .p3kpi-events-subtitle { font-size: 14px; }
    .p3kpi-events-filter { margin-bottom: 26px; }
    .p3kpi-events-filter a { padding: 8px 16px; font-size: 13px; }
    .p3kpi-event-body { padding: 18px; }
}

/* PPL & biaya disembunyikan untuk pengunjung yang belum login */
.p3kpi-event-flags:empty { display: none; }
.p3kpi-event-price.is-hint span,
.p3kpi-event-price.is-hint a { display: block; font-size: 13px; font-weight: 600; color: #3c4a5e; line-height: 1.35; }
.p3kpi-event-price.is-hint a { color: #0059ab; text-decoration: none; }
.p3kpi-event-price.is-hint a:hover { text-decoration: underline; }
