/* Course grid */

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.course-grid > .wp-block-post {
    margin-block-start: 0 !important; /* Fix the Gutenberg margin-block-start */
}


/* Course cards */

.course-card {
    height: 100%;
    width: 100%;
    display: flex !important;
    flex-direction: column;
}

.course-card .wp-block-post-featured-image {
    width: 100%;
    margin: 0;
}

.course-card .wp-block-post-featured-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.course-card .wp-block-post-excerpt {
    flex-grow: 1;
}


/* Course options */

.course-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.course-option {
    padding: 24px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;

}

.course-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #bbb;
}

.course-option__name {
    margin-top: 0;
    margin-bottom: 12px;
}

.course-option__duration {
    margin-bottom: 8px;
}

.course-option__price {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.course-option__description {
    margin-bottom: 20px;
}

.course-option__registration {
    display: inline-block;
}

/* Tablet */
@media (max-width: 900px) {
    .course-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .course-options {
        grid-template-columns: 1fr;
    }
}

/* Read More button */

.read-more-button {
    display: inline-block;
    padding: 12px 22px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.2s ease;
    margin-top: 0;
    align-self: center;
}

.read-more-button:hover {
    background-color: #333;
    color: #fff;
    text-decoration: none;
}

.read-more-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* Course price */
.course-price {
    display: block;
    width: fit-content;
    margin: 0 auto 32px auto;
    padding: 12px 28px;

    border: 2px solid #333;
    border-radius: 8px;

    text-align: center;

    font-size: 1.0rem;
    font-weight: 700;

    background: #F9F9F9;
}

.course-option-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.course-option-prices .course-price {
    margin: 0;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
}