/* ==========================================================================
   Course details block (blocks/course-details)
   Two full-width sections under the course header: the Aim, Why and Who
   cards in the USPs card style on the light grey ground, then the three
   check lists in rounded panels on white.
   ========================================================================== */

.cf-course__container {
    max-width: var(--wp--style--global--content-size, 1332px);
    margin: 0 auto;
    padding: 0 var(--wp--preset--spacing--sm);
}

/* --- At a glance -------------------------------------------------------------
   One wide white card above the three, its points in a check list that
   flows into columns where there is room. */

.cf-course__glance {
    margin-bottom: var(--wp--preset--spacing--xl);
    padding: var(--wp--preset--spacing--md);
    border-radius: 20px;
    background-color: var(--wp--preset--color--background);
}

.cf-course__glance .cf-course__card-title {
    margin: 0 0 var(--wp--preset--spacing--md);
}

@media (min-width: 768px) {
    .cf-course__glance .cf-course__glance-items {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--md);
    }
}

@media (min-width: 992px) {
    .cf-course__glance .cf-course__glance-items {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* --- Cards ----------------------------------------------------------------- */

/* Both sections sit on the soft grey ground shared with the article body
   and listings (#EEEDF1, see blog-listing-v1.css); cards and panels are
   white on it. */
.cf-course__overview {
    padding: var(--wp--preset--spacing--2-xl) 0 var(--wp--preset--spacing--xl);
    background-color: #EEEDF1;
}

.cf-course__cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--wp--preset--spacing--sm);
}

.cf-course__card {
    padding: var(--wp--preset--spacing--md);
    border-radius: 20px;
    background-color: var(--wp--preset--color--background);
}

.cf-course__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 9px;
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--background);
    font-size: 24px;
    line-height: 1;
}

.cf-course__card-title {
    margin: var(--wp--preset--spacing--lg) 0 var(--wp--preset--spacing--xs);
    font-size: var(--wp--preset--font-size--medium);
}

.cf-course__card-text {
    color: var(--wp--preset--color--foreground-muted);
}

.cf-course__card-text p {
    margin: 0;
}

.cf-course__card-text p + p {
    margin-top: var(--wp--preset--spacing--xs);
}

/* --- Lists ----------------------------------------------------------------- */

.cf-course__details {
    padding: 0 0 var(--wp--preset--spacing--xl);
    background-color: #EEEDF1;
}

.cf-course__lists {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--wp--preset--spacing--sm);
}

.cf-course__list {
    padding: var(--wp--preset--spacing--md);
    border-radius: 20px;
    background-color: var(--wp--preset--color--background);
}

.cf-course__list-title {
    margin: 0 0 var(--wp--preset--spacing--md);
    font-size: var(--wp--preset--font-size--medium);
}

.cf-course__items {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--xs);
    margin: 0;
    padding: 0;
    list-style: none;
}

.cf-course__item {
    display: flex;
    align-items: flex-start;
    gap: var(--wp--preset--spacing--xs);
    color: var(--wp--preset--color--foreground-muted);
}

/* The theme's circle-check, the same mark as the Content V1.1 list. */
.cf-course__item::before {
    content: url("../../assets/decorations/content-v1-1-circle-check.svg");
    flex-shrink: 0;
    display: block;
    line-height: 1;
    margin-top: 0.15em;
}

/* --- Breakpoints ----------------------------------------------------------- */

@media (min-width: 768px) {
    .cf-course__cards,
    .cf-course__lists {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    /* Three lists side by side get cramped on tablets: the third one takes
       a row of its own. */
    .cf-course__lists {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cf-course__list:last-child {
        grid-column: 1 / -1;
    }
}

/* --- Extra content -----------------------------------------------------------
   The course's editor content (templates/single-course.html, "Course
   content"), on the same grey ground and prose styles as an article body
   (blog-content in single-article.css). Hidden when the course has none. */

.cf-course-content {
    background-color: #EEEDF1;
}

.cf-course-content:not(:has(.wp-block-post-content)) {
    display: none;
}

.cf-course-content .pattern-blog-content > h2:first-child {
    margin-top: 0;
}

/* Delivery options: three white cards in a wide row. Two classes: the
   prose rhythm rule and the group's flow layout rule each carry one. */
.pattern-blog-content > .cf-course-options {
    margin-top: var(--wp--preset--spacing--lg);
}

.cf-course-option {
    height: 100%;
    padding: var(--wp--preset--spacing--md);
    border-radius: 20px;
    background-color: var(--wp--preset--color--background);
}

.cf-course-option .cf-course-option__label {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin: 0 0 var(--wp--preset--spacing--xs);
    padding: 0 var(--wp--preset--spacing--xs);
    border-radius: 30px;
    background-color: color-mix(in srgb, var(--wp--preset--color--secondary) 24%, transparent);
    color: var(--wp--preset--color--secondary);
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: var(--wp--custom--font-weight--semibold);
    line-height: 1;
}

.cf-course-option .cf-course-option__media {
    margin: 0 0 var(--wp--preset--spacing--md);
}

.cf-course-option__media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
}

.cf-course-option h3 {
    margin: 0 0 var(--wp--preset--spacing--xs);
    font-size: var(--wp--preset--font-size--medium);
}

.cf-course-option p,
.cf-course-option li {
    color: var(--wp--preset--color--foreground-muted);
}

.cf-course-option p {
    margin: 0 0 var(--wp--preset--spacing--sm);
}

.cf-course-option ul {
    margin: 0 0 var(--wp--preset--spacing--sm);
    padding-left: 1em;
}

.cf-course-option ul > li {
    position: relative;
    padding-left: 1em;
}

.cf-course-option ul > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--wp--preset--color--secondary);
}

.cf-course-option li + li {
    margin-top: var(--wp--preset--spacing--2-xs);
}

.cf-course-option p:last-child {
    margin-bottom: 0;
    color: var(--wp--preset--color--foreground);
    font-weight: var(--wp--custom--font-weight--semibold);
}
