/* Programme cards ([bpa_course_cards]): equal-height cards, buttons lined up along the bottom. */
.bpa-pc-grid {
    --bpa-pc-plum: #502430;
    --bpa-pc-slate: #28373b;
    --bpa-pc-title: #132c47;
    --bpa-pc-text: #696868;
    --bpa-pc-image-height: 230px;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
    font-family: "Segoe UI", "Heebo", Arial, sans-serif;
}

.bpa-pc-grid *, .bpa-pc-grid *::before, .bpa-pc-grid *::after { box-sizing: border-box; }

.bpa-pc-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(19, 44, 71, 0.08);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.bpa-pc-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(19, 44, 71, 0.14); }

.bpa-pc-card__media {
    position: relative;
    display: block;
    height: var(--bpa-pc-image-height);
    background: #eae6e4;
    overflow: hidden;
}

.bpa-pc-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bpa-pc-card__category, .bpa-pc-card__price {
    position: absolute;
    top: 18px;
    padding: 4px 9px;
    border-radius: 3px;
    color: #fff;
    font-size: 15px;
    line-height: 1.35;
}

.bpa-pc-card__category {
    left: 18px;
    max-width: calc(100% - 130px);
    background: var(--bpa-pc-plum);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bpa-pc-card__price {
    right: 18px;
    background: var(--bpa-pc-slate);
    font-size: 18px;
    font-weight: 700;
}

.bpa-pc-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px 22px 24px;
}

/* Titles take two lines and summaries three, so every card's text and buttons start at the same height. */
.bpa-pc-grid .bpa-pc-card__title {
    margin: 0 0 14px;
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    min-height: 2.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bpa-pc-grid .bpa-pc-card__title a { color: var(--bpa-pc-title); text-decoration: none; }
.bpa-pc-grid .bpa-pc-card__title a:hover { color: var(--bpa-pc-plum); }

.bpa-pc-card__summary {
    margin: 0 0 22px;
    color: var(--bpa-pc-text);
    font-size: 16px;
    line-height: 1.75;
    min-height: 5.25em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bpa-pc-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: auto;
}

.bpa-pc-grid .bpa-pc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 16px;
    color: #fff;
    font-size: 17px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    border-radius: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.bpa-pc-btn--register { background: var(--bpa-pc-plum); }
.bpa-pc-btn--more { background: var(--bpa-pc-slate); }
.bpa-pc-grid .bpa-pc-btn:hover { color: #fff; transform: scale(1.04); }
.bpa-pc-grid .bpa-pc-btn--register:hover { background: #3d1b25; }
.bpa-pc-grid .bpa-pc-btn--more:hover { background: #1c272a; }

@media (max-width: 1024px) {
    .bpa-pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .bpa-pc-grid { grid-template-columns: 1fr; gap: 22px; --bpa-pc-image-height: 210px; }
    .bpa-pc-grid .bpa-pc-card__title { font-size: 20px; min-height: 0; }
    .bpa-pc-card__summary { min-height: 0; }
}
