@use "../abstracts/variables" as vars;

.courses2 {
    background-color: vars.$color-white;

    // Section header row
    &__header {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        margin-bottom: vars.rem(40);

        @media (max-width: 575px) {
            flex-direction: column;
            align-items: flex-start;
            gap: vars.rem(20);
        }
    }

    &__nav {
        display: flex;
        gap: vars.rem(0);
        flex-shrink: 0;
    }

    &__nav-btn {
        width: vars.rem(100);
        height: vars.rem(70);
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: vars.rem(18);
        cursor: pointer;
        transition: all 0.3s ease;
        color: vars.$color-white;

        @media (max-width:1199px) {
            width: vars.rem(80);
            height: vars.rem(60);
            font-size: vars.rem(16);
        }

        @media (max-width:991px) {
            width: vars.rem(60);
            height: vars.rem(50);
            font-size: vars.rem(14);
        }

        &--next {
            background-color: vars.$color-primary;
            border-bottom-left-radius: 50px;
            border-top-left-radius: 50px;

            &:hover {
                background-color: darken(#007bff, 10%);
            }
        }

        &--prev {
            background-color: vars.$color-heading;
            border-bottom-right-radius: 50px;
            border-top-right-radius: 50px;

            &:hover {
                background-color: lighten(#121117, 15%);
            }
        }
    }

    // Card
    &__card {
        background: #EFF3FA;
        border-radius: vars.rem(16);
        overflow: hidden;
        box-shadow: 0 vars.rem(4) vars.rem(20) rgba(0, 0, 0, 0.06);
        transition: all 0.3s ease;

        &:hover {
            box-shadow: 0 vars.rem(8) vars.rem(30) rgba(0, 0, 0, 0.1);
            transform: translateY(vars.rem(-5));
        }
    }

    &__card-inner {
        display: flex;

        @media (max-width: 575px) {
            flex-direction: column;
        }
    }

    // Image area
    &__card-thumb {
        position: relative;
        flex: 0 0 45%;
        max-width: 45%;
        overflow: hidden;

        @media (max-width: 575px) {
            flex: 0 0 100%;
            max-width: 100%;
            height: vars.rem(220);
        }

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
    }

    // Price overlay
    &__card-price {
        position: absolute;
        bottom: 0;
        right: 0;
        text-align: center;
        width: 110px;
        height: 75px;
        opacity: 1;
        border-top-left-radius: 15px;
        border-bottom-right-radius: 15px;
        background: #EFF3FA;
        display: flex;
        gap: 5px;
        align-items: center;
        justify-content: center;
        flex-direction: column;


        &-amount {
            display: block;
            font-family: vars.$font-family-base;
            font-weight: 700;
            font-size: vars.rem(28);
            color: vars.$color-heading;
            line-height: 1;
        }

        &-label {
            display: block;
            font-family: vars.$font-family-base;
            font-weight: 600;
            font-size: vars.rem(10);
            text-transform: uppercase;
            letter-spacing: vars.rem(1);
            color: vars.$color-secondary;
            margin-top: vars.rem(2);
        }
    }

    // Content area
    &__card-content {
        flex: 1;
        padding: vars.rem(24) vars.rem(20);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    // Meta row (level, duration, arrow)
    &__card-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: vars.rem(16);
        margin-bottom: vars.rem(14);
        background: vars.$color-white;
        padding: 10px;
        border-radius: 8px;

        @media (max-width: 992px) {
            flex-wrap: wrap;
            gap: 10px;
        }

        .meta-item {
            display: flex;
            align-items: center;
            gap: vars.rem(6);

            i {
                color: vars.$color-text;
                font-size: vars.rem(14);
            }

            span {
                font-family: vars.$font-family-base;
                font-weight: 700;
                font-size: 18px;
                line-height: 36px;
                letter-spacing: -2%;
                text-transform: capitalize;
                color: vars.$color-text;

                @media (max-width: 767px) {
                    font-size: 16px;
                }
            }
        }
    }

    &__card-arrow {
        margin-left: auto;
        width: vars.rem(75);
        height: vars.rem(50);
        border-radius: 80px;
        background-color: #EFF1F6;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        color: vars.$color-heading;
        font-size: vars.rem(14);

        @media (max-width: 1399px) {
            width: 60px;
            height: 40px;
            font-size: 14px;
        }

        &:hover {
            background-color: vars.$color-primary;
            color: vars.$color-white;
        }

        @media (max-width: 992px) {
            margin-left: 0;
        }
    }

    &__card-title {
        font-family: vars.$font-family-base;
        font-weight: 700;
        font-size: 24px;
        line-height: 34px;
        letter-spacing: -3%;
        text-transform: capitalize;
        color: vars.$color-heading;
        margin-bottom: vars.rem(10);
        max-width: 195px;

        @media (max-width: 992px) {
            max-width: 100%;
            font-size: 20px;
        }

        @media (max-width: 1399px) {
            font-size: 18px;
            line-height: 28px;
        }
    }

    &__card-desc {
        font-family: vars.$font-family-base;
        font-weight: 500;
        font-size: 16px;
        line-height: 28px;
        letter-spacing: 0%;
        color: vars.$color-secondary;
        margin-bottom: 0;
        max-width: 264px;

        @media (max-width: 992px) {
            max-width: 100%;
            font-size: 14px;
        }
    }
}