/* Course Card ---------------------------------- */
.course-meta {
    display: inline-block;
    > a,
    > span {
        color: $body-color;
        font-weight: 500;
        margin-right: 25px;
        i {
            margin-right: 5px;
            color: $theme-color;
        }
        &:last-child {
            margin-right: 0;
        }
    }
    .meta-box {
        border-right: 1px solid $border-color;
        padding-right: 12px;
        margin-right: 8px;
        &:last-child {
            border-right: none !important;
            padding-right: 0 !important;
            margin-right: 0 !important;
        }
    }
    a:hover {
        color: $theme-color;
    }
}
.meta-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    .avater {
        border-radius: 50%;
        overflow: hidden;
    }
    .icon {
        font-size: 36px;
        color: $theme-color;
    }
    .title {
        font-size: 16px;
        margin-top: -0.4em;
        margin-bottom: 0;
    }
    .info {
        font-size: 14px;
        display: block;
        margin-bottom: -0.4em;
        color: $theme-color;
    }
}
.course-card {
    display: flex;
    gap: 30px;
    background-color: $white-color;
    box-shadow: 0px 0px 15px rgba(193, 193, 193, 0.15);
    border-radius: 10px;
    padding: 30px;
    &_img {
        flex: 50%;
        border-radius: 10px;
        overflow: hidden;
        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }
    &_content {
        flex: 50%;
    }
    &_text {
        margin-bottom: 23px;
    }
    .course-meta {
        margin-bottom: 30px;
    }
    .price-wrap {
        background-color: $theme-color2;
        padding: 9px 28px;
        color: $white-color;
        border-radius: 35px 0 0 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-right: -30px;
        margin-bottom: 30px;
        position: relative;
        z-index: 2;
        overflow: hidden;
        &:before {
            content: '';
            height: 100%;
            width: 130px;
            background-color: $theme-color;
            position: absolute;
            top: 0;
            left: 0;
            z-index: -1;
            clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0% 100%);
        }
    }
    .price {
        color: $white-color;
        font-weight: 600;
        font-size: 24px;
    }
    .th-btn {
        background-color: $smoke-color;
        border: 1px solid $border-color;
        color: $title-color;
        font-weight: 600;
        &:hover {
            color: $white-color;
            font-weight: 500;
        }
    }
    &.style2 {
        background-color: #2A2F3C;
        box-shadow: none;
        padding: 40px;
        gap: 40px;
        .price-wrap {
            background-color: #2A2F3C;
            justify-content: flex-start;
            gap: 65px;
            &:before {
                background-color: $theme-color2;
            }
        }
        .course-meta {
            display: flex;
            align-items: center;
        }
        .box-title {
            font-size: 36px;
            color: $white-color;
        }
        .course-card {
            &_text {
                color: $white-color;
            }
        }
        .meta-box {
            padding-right: 30px;
            margin-right: 26px;
            .title {
                color: $white-color;
                font-weight: 500;
            }
        }
        .th-btn {
            background-color: $theme-color;
            color: $white-color;
            border: none;
        }
    }
}

@include lg {
    .course-card {
        &_img {
            max-height: 340px;
        }
        &.style2 {
            .course-card {
                &_img {
                    max-height: 100%;
                }
            }
        }
    }
}
@include md {
    .course-card {
        &.style2 {
            flex-wrap: wrap;
            .course-card {
                &_img {
                    flex: 100%;
                }
                &_content {
                    flex: 100%;
                }
            }
        }
    }
}
@include sm {
    .course-card {
        flex-wrap: wrap;
        &_img {
            flex: 100%;
        }
        &_content {
            flex: 100%;
        }
        .price-wrap {
            max-width: 280px;
        }
        &.style2 {
            .price-wrap {
                max-width: calc(100% + 20px);
                margin-right: -20px;
            }
        }
    }
}

@include xs {
    .course-card {
        &.style2 {
            padding: 20px;
            .box-title {
                font-size: 24px;
            }
            .course-meta {
                flex-wrap: wrap;
                gap: 20px;
            }
            .meta-box {
                border-right: none;
                padding-right: 12px;
                margin-right: 0;
            }
        }
    }
}

@include vxs {
    .course-card {
        padding: 20px;
        &.style2 {
            .price-wrap {
                gap: 42px;
                &:before {
                    width: 120px;
                }
            }
        }
    }
}

/* Course Card ---------------------------------- */
.course-box {
    background: $white-color;
    box-shadow: 0px 3px 15px rgba(193, 193, 193, 0.2);
    border-radius: 10px;
    padding: 30px;
    &_img {
        border-radius: 10px;
        overflow: hidden;
        position: relative;
        margin-bottom: 25px;
        img {
            width: 100%;
            transition: 0.4s ease-in-out;
        }
    }
    .price {
        font-size: 24px;
        font-weight: 700;
        color: $white-color;
        text-align: center;
        line-height: 46px;
        padding-right: 5px;
        position: absolute;
        bottom: 0;
        left: 0;
        height: 46px;
        width: 116px;
        background-color: $theme-color2;
        clip-path: path("M0 0H82.8871C90.8496 0 98.0536 4.72328 101.228 12.0255L116 46H10C4.47715 46 0 41.5228 0 36V0Z");
        transition: 0.4s ease-in-out;
    }
    .course-meta {
        margin-bottom: 23px;
    }
    &_text {
        margin-bottom: 23px;
    }
    .th-btn {
        background-color: $white-color;
        border: 1px solid $border-color;
        color: $title-color;
        &:before,
        &:after {
            background-color: $theme-color;
        }
        &:hover {
            color: $white-color;
            border-color: $theme-color;
        }
    }
    &:hover {
        .price {
            background-color: $theme-color;
        }
        .course-box {
            &_img {
                img {
                    transform: scale(1.1);
                }
            }
        }
    }
}

@media (max-width: 350px) {
    .course-box {
        padding: 20px;
    }
}

/* Course Details ---------------------------------- */ 
.course-feature {
    &-wrap {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    background-color: $smoke-color;
    padding: 30px;
    // box-shadow: 0px 0px 20px rgba(191, 191, 191, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    &_icon {
        font-size: 44px;
        text-align: center;
        color: $theme-color;
    }
    &_title {
        font-size: 20px;
        font-weight: 500;
        margin-bottom: 3px;
        margin-top: -0.3em;
    }
    &_text {
        margin-bottom: -0.5em;
    }
}
@include xl {
    .course-feature {
        &-wrap {
            gap: 24px;
        }
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 30px 10px;
        &_text {
            margin-bottom: -0.5em;
            max-width: 260px;
            margin-left: auto;
            margin-right: auto;
        }
    }
}
@include xs {
    .course-feature-wrap {
        grid-template-columns: auto;
    }
}
.inner-box {
    background-color: $white-color;
    // box-shadow: 0px 0px 20px rgba(191, 191, 191, 0.1);
    border-radius: 10px;
    overflow: hidden;
    --space: 30px;
    .header {
        background-color: $theme-color;
        padding: var(--space);
    }
    .box-title {
        color: $white-color;
        margin-bottom: 3px;
    }
    .subtitle {
        font-size: 14px;
        color: $white-color;
        margin-bottom: -0.5em;
    }
    .content {
        padding: var(--space);
        background-color: $smoke-color;
        .text {
            margin-bottom: -0.5em;
            margin-top: -0.5em;
        }
    }
}

.buy-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    background-color: $title-color;
    padding: 30px;
    border-radius: 10px;
    gap: 15px;
    @include xl {
        justify-content: center;
        text-align: center;
    }
    .buy-title {
        font-size: 24px;
        font-weight: 600;
        color: $white-color;
        margin-bottom: 0;
    }
}
