/* ==========================================================================
   Agenda Pondok - Card & Grid Layout
   ========================================================================== */

.ap-container {
    --ap-primary: #0d9488;
    --ap-card-bg: #1e293b;
    --ap-text: #ffffff;
    --ap-text-muted: rgba(255, 255, 255, 0.8);
    --ap-border-radius: 16px;
    --ap-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --ap-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ap-no-agenda {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 15px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

/* Grid Layout */
.ap-grid {
    display: grid;
    gap: 28px;
}

.ap-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ap-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ap-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ==========================================================================
   Card Base
   ========================================================================== */
.ap-card {
    position: relative;
    border-radius: var(--ap-border-radius);
    overflow: hidden;
    background: var(--ap-card-bg);
    box-shadow: var(--ap-shadow);
    transition: var(--ap-transition);
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.ap-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

/* Card Background */
.ap-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-color: var(--ap-card-bg);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.ap-card:hover .ap-card-bg {
    transform: scale(1.08);
}

.ap-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.2) 30%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

/* ==========================================================================
   Top Bar: Checkbox + Date/Kategori
   ========================================================================== */
.ap-card-topbar {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 18px;
}

.ap-card-checkbox {
    flex-shrink: 0;
}

.ap-card-checkbox .ap-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    accent-color: var(--ap-primary);
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
}

.ap-card-checkbox .ap-checkbox:checked {
    background: var(--ap-primary);
    border-color: var(--ap-primary);
}

.ap-card-checkbox .ap-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.ap-card-checkbox .ap-checkbox:hover {
    border-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
}

.ap-card-top-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Date Label Capsule */
.ap-card-date-label {
    display: inline-block;
    background: #ffffff;
    color: #1e293b;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ap-card:hover .ap-card-date-label {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ap-card-kategori-label {
    display: none;
}

.ap-card:hover .ap-card-kategori-label {
    display: none;
}

/* ==========================================================================
   Card Center Content
   ========================================================================== */
.ap-card-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px;
    color: #ffffff;
}

.ap-card-kategori-pill {
    display: inline-block;
    background: #ffffff;
    color: #1e293b;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ap-card-title {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.ap-card-subtitle-text {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Pemateri */
.ap-card-pemateri {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
}

.ap-card-pemateri .ap-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Body Text */
.ap-card-body {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    line-height: 1.6;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* List Card Variant */
.ap-card-list {
    flex-direction: row;
    min-height: 200px;
}

.ap-card-list .ap-card-bg {
    width: 240px;
    position: relative;
}

.ap-card-list .ap-card-overlay {
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

.ap-card-list .ap-card-content {
    text-align: left;
    padding: 24px;
    justify-content: center;
}

.ap-card-list .ap-card-title {
    font-size: 24px;
}

.ap-card-list .ap-card-pemateri {
    justify-content: flex-start;
}

.ap-card-list .ap-card-body {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.ap-card-body-full {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 10px;
    line-height: 1.6;
}

/* Single Card Layout */
.ap-layout-single {
    max-width: 500px;
}

.ap-layout-single .ap-card {
    min-height: 420px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 1024px) {
    .ap-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .ap-grid-3,
    .ap-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ap-card {
        min-height: 340px;
    }

    .ap-card-content {
        padding: 0 18px 22px;
    }

    .ap-card-title {
        font-size: 28px;
    }

    .ap-card-subtitle {
        font-size: 15px;
    }

    .ap-card-topbar {
        padding: 14px 16px;
    }
}

@media screen and (max-width: 480px) {
    .ap-grid-2,
    .ap-grid-3,
    .ap-grid-4 {
        grid-template-columns: 1fr;
    }

    .ap-container {
        padding: 12px;
    }

    .ap-card {
        min-height: 320px;
    }

    .ap-card-title {
        font-size: 26px;
    }

    .ap-card-list {
        flex-direction: column;
    }

    .ap-card-list .ap-card-bg {
        width: 100%;
        height: 220px;
    }

    .ap-card-list .ap-card-content {
        text-align: center;
    }

    .ap-card-list .ap-card-pemateri {
        justify-content: center;
    }
}
