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

/* ===========================
   Courses 3
   =========================== */
.courses3 {
    position: relative;
    background-color: vars.$color-black;
    overflow: hidden;

    // Full-bleed background image with dark overlay
    &__bg {
        position: absolute;
        inset: 0;
        z-index: 0;

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

        &::after {
            content: '';
            position: absolute;
            inset: 0;
        }
    }

    // Wrap everything above the bg
    .container {
        position: relative;
        z-index: 1;
    }

    // ── Section header ────────────────────────────
    .section-top__subtitle {
        color: vars.$color-white;
    }

    .section-top__title {
        color: vars.$color-white;
    }

    // ── Card ─────────────────────────────────────
    &__card {
        padding: 25px;
        background: vars.$color-white;
        border-radius: vars.rem(16);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: transform 0.3s ease, box-shadow 0.3s ease;

        &:hover {
            transform: translateY(vars.rem(-6));
            box-shadow: 0 vars.rem(24) vars.rem(50) rgba(0, 0, 0, 0.35);
        }

        &--active {
            background: #3B3B46;

            .courses3__card-title {
                color: vars.$color-white;
            }
        }
    }

    // ── Card top: title + price badge ─────────────
    &__card-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: vars.rem(12);
    }

    &__card-title {
        font-family: vars.$font-family-base;
        font-weight: 700;
        font-size: 24px;
        line-height: 34px;
        letter-spacing: -3%;
        vertical-align: middle;
        text-transform: capitalize;
        color: vars.$color-heading;
        margin: 0;
        flex: 1;
        color: #191825;

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

        @media (max-width: 767px) {
            font-size: 17px;
            line-height: 20px;
        }
    }

    // Price badge
    &__card-price {
        background-color: #0073E6;
        border-radius: vars.rem(10);
        padding: vars.rem(10) vars.rem(14);
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex-shrink: 0;
        min-width: vars.rem(78);

        @media (max-width: 1199px) {
            min-width: vars.rem(60);
            padding: vars.rem(8) vars.rem(10);
        }
    }

    &__card-price-amount {
        font-family: vars.$font-family-base;
        font-weight: 700;
        font-size: 24px;
        line-height: 26px;
        letter-spacing: -2%;
        text-align: center;
        text-transform: capitalize;
        color: vars.$color-white;
        display: block;
        margin-bottom: 5px;

        @media (max-width: 1199px) {
            font-size: 16px;
            line-height: 24px;
        }

    }

    &__card-price-label {
        font-family: vars.$font-family-base;
        font-weight: 700;
        font-size: 14px;
        line-height: 26px;
        letter-spacing: 0%;
        text-align: center;
        text-transform: uppercase;
        color: vars.$color-white;
        display: block;

        @media (max-width: 1199px) {
            font-size: 12px;
            line-height: 20px;
        }

        @media (max-width: 767px) {
            font-size: 11px;
            line-height: 15px;
        }
    }

    // ── Card image ────────────────────────────────
    &__card-thumb {
        width: 100%;
        aspect-ratio: 4/3;
        overflow: hidden;
        border-radius: 15px;
        margin-top: 30px;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            transition: transform 0.5s ease;
        }
    }

    &__card:hover &__card-thumb img {
        transform: scale(1.05);
    }

    // ── Card footer: meta + arrow ─────────────────
    &__card-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: vars.rem(20) vars.rem(20);
        background-color: vars.$color-heading;
        margin-top: auto;
        border-radius: 15px;
    }

    &__card-meta {
        display: flex;
        flex-direction: column;
        gap: vars.rem(1);
    }

    &__card-meta-item {
        display: flex;
        align-items: center;
        gap: vars.rem(8);
        font-family: vars.$font-family-base;
        font-weight: 700;
        font-size: vars.rem(18);
        line-height: vars.rem(36);
        letter-spacing: -0.02em;
        text-transform: capitalize;
        color: vars.$color-white;

        @media (max-width: 1199px) {
            font-size: 14px;
            line-height: 24px;
        }

        i {
            font-size: vars.rem(14);
            color: rgba(255, 255, 255, 0.7);
            width: vars.rem(16);
            flex-shrink: 0;
        }
    }

    &__card-arrow {
        width: vars.rem(75);
        height: vars.rem(45);
        border-radius: 80px;
        background-color: rgba(255, 255, 255, 0.12);
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: background-color 0.3s ease;
        flex-shrink: 0;

        i {
            font-size: vars.rem(16);
            color: vars.$color-white;
        }

        &:hover {
            background-color: #0073E6;
            text-decoration: none;
        }
    }

    // ── Responsive ────────────────────────────────
    @media (max-width: 991px) {
        &__card {
            margin-bottom: 0;
        }
    }
}