/* ============================================
   CARD PANEL SIMPLE — Katalog template styles
   Image top, centered title + button bottom.
   Scopé via .katalog-theme-panel_simple pour éviter les conflits multi-instances.
   ============================================ */

/* Grid layout for the course list */
.katalog-theme-panel_simple .block_katalog-courseslist .courses-list,
.katalog-theme-panel_simple .block_katalog-courseslist.coursebox {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* Course card base */
.katalog-theme-panel_simple .panel.panel-katalog.coursebox {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.katalog-theme-panel_simple .panel.panel-katalog.coursebox:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Panel body & image */
.katalog-theme-panel_simple .block_katalog-courseslist .coursebox .panel-body {
    padding: 0;
    text-align: left;
    width: 100%;
}

.katalog-theme-panel_simple .block_katalog-courseslist .coursebox .panel-body a {
    color: inherit;
    text-decoration: none;
}

/* Panel info: title + button centered */
.katalog-theme-panel_simple .panel-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 16px;
    min-height: 120px;
}

.katalog-theme-panel_simple .courseName {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
    margin-bottom: 8px;
    word-wrap: break-word;
}

/* Course summary in card */
.katalog-theme-panel_simple .panel-info .coursesummary {
    font-size: 0.82rem;
    color: #5f6368;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Button at bottom */
.katalog-theme-panel_simple .panel-info .coursebtn {
    margin-bottom: 0;
    margin-top: auto;
}

/* Progress label */
.katalog-theme-panel_simple .progress-label {
    width: fit-content;
    height: fit-content;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: absolute;
    bottom: 5px;
    left: 5px;
    z-index: 10;
}

/* Sidebar block variant */
#block-region-side-pre .katalog-theme-panel_simple .block_katalog-courseslist .coursebox.panel {
    width: 100%;
    min-width: 240px;
}
