/* --- Sermons Presentation Framework Layout --- */
.acm-sermon-wrapper {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.acm-grid-controls {
    margin-bottom: 25px;
    background: #f7f9fa;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.acm-grid-btn {
    background: #ffffff;
    border: 1px solid #dcdfe6;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}
.acm-grid-btn.active, .acm-grid-btn:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
.acm-sermon-grid {
    display: grid;
    gap: 24px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.acm-sermon-grid.col-2 { grid-template-columns: repeat(2, 1fr); }
.acm-sermon-grid.col-3 { grid-template-columns: repeat(3, 1fr); }
.acm-sermon-grid.col-4 { grid-template-columns: repeat(4, 1fr); }

/* Card Rendering Architecture */
.acm-sermon-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid #f0f2f5;
}
.acm-card-thumbnail {
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #000;
}
.acm-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 36px;
    text-decoration: none !important;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.acm-sermon-card:hover .acm-play-overlay {
    opacity: 1;
}
.acm-card-content {
    padding: 16px;
}
.acm-card-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}
.acm-card-excerpt {
    color: #606266;
    font-size: 14px;
    margin-bottom: 16px;
}
.acm-resource-tray {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.acm-view-pdf-btn, .acm-download-pdf-btn {
    font-size: 12px;
    padding: 8px;
    text-align: center;
    border-radius: 4px;
    text-decoration: none !important;
    cursor: pointer;
    font-weight: bold;
}
.acm-view-pdf-btn {
    background: #e1f5fe;
    color: #0288d1;
    border: none;
}
.acm-download-pdf-btn {
    background: #f4f4f5;
    color: #909399;
    border: 1px solid #dcdfe6;
}

/* Modal Windows Architecture */
.acm-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
}
.acm-modal-container {
    position: relative;
    width: 85%;
    max-width: 960px;
    height: 80vh;
    margin: 5vh auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}
.acm-modal-container.spec-box {
    height: auto;
    max-width: 600px;
    padding: 30px;
    margin-top: 15vh;
}
.acm-modal-close, .acm-event-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    z-index: 10;
}
#acm-pdf-iframe {
    width: 100%;
    height: 100%;
}

/* --- Calendar Functional Matrix Layout --- */
.acm-calendar-wrapper {
    margin: 30px 0;
}
.acm-calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.acm-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    background: #e4e7ed;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    overflow: hidden;
}
.acm-day-header {
    background: #f5f7fa;
    padding: 12px text-align;
    text-align: center;
    font-weight: bold;
    color: #303133;
}
.acm-calendar-day {
    background: #ffffff;
    min-height: 110px;
    padding: 8px;
    display: flex;
    flex-direction: column;
}
.acm-calendar-day.blank {
    background: #fafbfc;
}
.day-num {
    font-weight: 600;
    color: #909399;
    margin-bottom: 6px;
}
.acm-calendar-event-link {
    background: #f0f9eb;
    color: #67c23a;
    border: 1px solid #c2e7b0;
    font-size: 11px;
    padding: 4px 6px;
    margin-bottom: 4px;
    border-radius: 3px;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.acm-calendar-event-link:hover {
    background: #67c23a;
    color: #fff;
}