/* courses */

.container-2 {
    position: relative;
}

.courses-2 {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    display: flex;
    align-items: flex-start;
}

.courses-btn-2 {
    position: relative;
    top: -5rem;
    display: inline-block;
    z-index: 1;
    padding: clamp(6px, 1vw, 10px) clamp(40px, 8vw, 115px);
    background: linear-gradient(135deg, #1f2937, #374151);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    font-size: clamp(13px, 1.5vw, 18px);
    letter-spacing: 1px;
    clip-path: polygon(0 0, 90% 0, 100% 50%, 90% 100%, 0 100%);
    transition: all 0.3s ease;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.courses-btn-2:hover {
    background: linear-gradient(135deg, #111827, #1f2937);
    transform: translateX(1px);
}

/* COURSES CARDS */
.cards-2 {
    width: 100% !important;
    margin-top: 7rem !important;
    position: relative;
    z-index: 2;
}

.courses-card-2 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

/* 1 card */
.courses-card-2:has(.card-img-2:only-child) {
    grid-template-columns: minmax(280px, 500px);
    justify-content: center;
}

/* .courses-card-2:has(.card-img-2:nth-child(2):last-child) {
     display: grid;
     grid-template-columns: 1fr 1fr;
    justify-content: center;
   align-items: stretch; 
    
} */



.card-img-2 {
    height: 320px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(2, 194, 190, 0.4);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.12),
        0 -4px 12px rgba(0, 0, 0, 0.05),
        4px 0 12px rgba(0, 0, 0, 0.08),
        -4px 0 12px rgba(0, 0, 0, 0.08);
    transition: 0.3s ease;
    position: relative;
}

.card-img-2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    transition: 0.4s ease;
    display: block;
}

.card-img-2:hover img {
    transform: scale(1);
}

.card-Khalid-2 {
    position: relative;
    width: 100%;
    height: 100%;
}

.card-Khalid-2:hover img {
    border-radius: 16px;
    transform: scale(1) translateY(-80px);
    height: 73.5%;
}

.text-card-2 {
    position: relative;
    width: 100%;
    opacity: 0;
    line-height: 1.3;
    color: white;
    background: linear-gradient(
        to bottom,
        rgba(2, 6, 23, 0),
        rgba(2, 6, 23, 0.85) 15%,
        #020617 100%
    );
    padding: 28.5px 22px 24px;
    margin-top: -88.5px;
    transition: 0.3s ease;
}

.card-Khalid-2:hover .text-card-2 {
    opacity: 1;
    transition: 0.3s ease-in;
}

.text-card-2 h1 {
    font-size: 17px;
    font-weight: bold;
    color: white;
    margin-bottom: 6px;
}

.text-card-2 span {
    font-size: 15px;
    opacity: 0.9;
}

.text-card-2 p {
    font-size: 14px;
    margin-top: 6px;
    opacity: 0.85;
}

.text-card-2 .fa-check {
    background: #1da1f2;
    color: #fff;
    font-size: 11px;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.3rem;
}

.text-card-2 .fa-star {
    color: #f5c518;
    font-size: 15px;
}

.price-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.price-2 span {
    font-size: 26px;
    font-weight: bold;
}

.price-2 button {
    background-color: #01c2be;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 15px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}
.price-2 button:hover {
    background-color: #01c2be !important;
    color: white !important;
    border: none !important;
    padding: 8px 14px !important;
    border-radius: 15px !important;
    font-size: 13px !important;
    cursor: pointer;
    font-weight: 600 !important;
    transition: background-color 0.3s ease !important; 
}

.price-2 button i {
    background: white;
    color: #01c2be;
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 11px;
    margin-left: 8px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 992px) {

    .courses-card-2 {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .card-img-2 {
        height: 270px;
    }
}

@media (max-width: 768px) {
    .cards-2 {
    width: 100%;
    margin: 1rem auto 0;
    margin-top: 4rem !important;
    position: relative;
    z-index: 2;
}
.card-Khalid-2:hover img {
    border-radius: 16px;
    transform: scale(1) translateY(-80px);
    height: 70%;
}
}

@media (max-width: 600px) {
    .cards-2 {
        width: 100%;
    }

    .courses-card-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-img-2,
    .card-img-2.card-featured {
        height: 280px;
        grid-column: auto;
    }
    .card-Khalid-2:hover img {
    border-radius: 16px;
    transform: scale(1) translateY(-80px);
    height: 75%;
}
}

@media (max-width: 400px) {
    .cards-2 {
        width: 100% !important;
        padding: 0 8px !important;
    }

    
    .price-2 span {
        font-size: 20px;
    }

    .price-2 button {
        padding: 6px 10px;
        font-size: 12px;
    }
    .price-2 button:hover {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
     .card-Khalid-2:hover img {
    border-radius: 16px;
    transform: scale(1) translateY(-80px);
    height: 78%;
}
}
@media (max-width: 373px) {
    .cards-2 {
        width: 100% !important;
        padding: 0 8px !important;
    }

    
    .price-2 span {
        font-size: 20px;
    }

    .price-2 button {
        padding: 6px 10px;
        font-size: 12px;
    }
    .price-2 button:hover {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
     .card-Khalid-2:hover img {
    border-radius: 16px;
    transform: scale(1) translateY(-80px);
    height: 73%;
}
}

@media (max-width: 300px) {
    .card-img-2,
    .card-img-2.card-featured {
        height: 200px;
    }

    .text-card-2 h1 {
        font-size: 14px;
    }

    .price-2 span {
        font-size: 16px;
    }
}

/* end courses */