/* HALAMAN AGENDA */
.agenda-page {
    padding-bottom: 65px;
    background: #f6f8f7;
    color: #26372f;
}

/* HERO */
.agenda-page-hero {
    margin-bottom: 0;
    text-align: left;
}

.agenda-page-hero .profile-container {
    width: min(1020px, 92%);
    margin: 0 auto;
}

.agenda-page-hero .profile-container > p {
    max-width: 680px;
}

/* AREA DAFTAR */
.agenda-container {
    width: min(1020px, 92%);
    margin: 0 auto;
    padding-top: 40px;
}

.agenda-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

/* KARTU AGENDA */
.agenda-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e4ebe6;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(27, 61, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.agenda-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(27, 61, 42, 0.1);
}

.agenda-image,
.agenda-image-placeholder {
    width: 100%;
    height: 190px;
}

.agenda-image {
    display: block;
    object-fit: cover;
}

.agenda-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5eee8;
    color: #176b46;
    font-size: 38px;
}

.agenda-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
}

.agenda-date {
    display: block;
    margin-bottom: 12px;
    color: #176b46;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.8;
}

.agenda-card h2 {
    margin: 0 0 14px;
    color: #203d2d;
    font-size: 19px;
    line-height: 1.45;
}

.agenda-description {
    margin: 0 0 16px;
    color: #64756b;
    font-size: 13px;
    line-height: 1.8;
}

.agenda-location {
    margin: auto 0 16px;
    color: #64756b;
    font-size: 12px;
    line-height: 1.7;
}

.agenda-detail-button {
    width: 100%;
    padding: 11px 15px;
    border: 0;
    border-radius: 8px;
    background: #174b3e;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.agenda-detail-button:hover {
    background: #236b53;
}

/* KETIKA BELUM ADA AGENDA */
.agenda-empty-state {
    padding: 35px 22px;
    border: 1px solid #e4ebe6;
    border-radius: 14px;
    background: #fff;
    color: #64756b;
    text-align: center;
}

.agenda-empty-state h2 {
    color: #203d2d;
}

/* PAGINATION */
.agenda-pagination {
    margin-top: 32px;
}

.agenda-pagination nav {
    display: flex;
    justify-content: center;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .agenda-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .agenda-page {
        padding-bottom: 45px;
    }

    .agenda-container {
        padding-top: 25px;
    }

    .agenda-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .agenda-image,
    .agenda-image-placeholder {
        height: 220px;
    }

    .agenda-card-body {
        padding: 20px 18px;
    }
}

/* ========================================
   POPUP DETAIL AGENDA
======================================== */

.agenda-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.agenda-modal.is-open {
    display: flex;
}

.agenda-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 29, 22, 0.76);
    backdrop-filter: blur(5px);
}

.agenda-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    max-height: 88vh;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.28);
    animation: agenda-modal-enter 0.22s ease-out;
}

.agenda-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 28px;
    border-bottom: 1px solid #e4ebe6;
    background: #fff;
}

.agenda-modal-label {
    color: #a27a32;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

.agenda-modal-header h2 {
    margin: 9px 0 0;
    color: #17463c;
    font-size: clamp(20px, 3vw, 27px);
    line-height: 1.4;
}

.agenda-modal-close {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: #edf3ef;
    color: #17463c;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.agenda-modal-close:hover {
    background: #dce9df;
}

.agenda-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
}

.agenda-modal-image {
    display: block;
    width: 100%;
    max-height: 340px;
    margin-bottom: 24px;
    border-radius: 12px;
    background: #f0f4f1;
    object-fit: contain;
}

.agenda-modal-image[hidden],
.agenda-modal-meta-item[hidden] {
    display: none !important;
}

.agenda-modal-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.agenda-modal-meta-item {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e4ebe6;
    border-radius: 11px;
    background: #f8faf8;
}

.agenda-modal-meta-item span {
    display: block;
    margin-bottom: 7px;
    color: #738077;
    font-size: 12px;
}

.agenda-modal-meta-item strong {
    display: block;
    color: #17463c;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.agenda-modal-description {
    margin-top: 25px;
}

.agenda-modal-description h3 {
    margin: 0 0 10px;
    color: #17463c;
    font-size: 18px;
}

.agenda-modal-description p {
    margin: 0;
    color: #526259;
    font-size: 14px;
    line-height: 1.9;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.agenda-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 17px 28px;
    border-top: 1px solid #e4ebe6;
    background: #fbfcfb;
}

.agenda-modal-button {
    padding: 11px 22px;
    border: 0;
    border-radius: 8px;
    background: #174b3e;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.agenda-modal-button:hover {
    background: #28745b;
}

body.agenda-modal-open {
    overflow: hidden;
}

@keyframes agenda-modal-enter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {
    .agenda-modal {
        padding: 10px;
    }

    .agenda-modal-dialog {
        max-height: 92vh;
        border-radius: 14px;
    }

    .agenda-modal-header {
        padding: 19px;
    }

    .agenda-modal-body {
        padding: 19px;
    }

    .agenda-modal-footer {
        padding: 15px 19px;
    }

    .agenda-modal-meta {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .agenda-modal-image {
        max-height: 240px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .agenda-modal-dialog {
        animation: none;
    }
}
