@use "../../../../styles/abstracts/variables" as *; 

.course__card {
    padding: 1.3rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    background: #181818;
    display: flex;
    flex-direction: column;
    flex: 0 0 320px;
    cursor: pointer;
    position: relative;
    transition: all ease-in-out .5s;
    @media only screen and (max-width: 1000px){
        flex: 0;
    }

       // Hover effect
       &:hover {
        transform: translateY(-2px);
        border-radius: 10px;
        box-shadow: 0 2px 6px rgba(255, 122, 0, 0.2); // subtle orange shadow
    }

    // Orange overlay
    &::after {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(255, 122, 0, 0); // fully transparent initially
        transition: background 0.3s ease;
        pointer-events: none;
        z-index: 1;
        border-radius: 10px;
    }

    &:hover::after {
        background: rgba(255, 122, 0, 0.05); // soft orange tint on hover
    }

     // Prevent card hover when button is hovered (Chrome/Safari only)
  &:has(button:hover),
  &:has(.button:hover) {
    transform: none;
    box-shadow: none;

    &::after {
      background: rgba(255, 122, 0, 0); // remove overlay
    }
  }
    @media only screen and (max-width: 1000px) {
        flex: 0 0 250px;
        padding: .7rem;
    }

    img {
        border-radius: 6px;
        width: 100%;
        height: 150px;
    }

    h3{
        color: $col-orange;
        margin-top: 1rem;
        margin-bottom: .7rem;
        font-size: 1.2rem;
        font-weight: 500;
    }

    span {
        border: 1px solid #FF8C42;
        color: #FF8C42;
        color: $col-orange !important;
        font-size: .7rem;
        padding: .4rem .5rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
        display: inline !important;
        border-radius: 6px;
        font-weight: 500;
        width: 45%;
        text-align: center;
        @media only screen and (max-width: 1000px){
            width: 100%;
        }
    }

    h4{
        color: $col-white;
        font-weight: 500;
        font-size: .9rem;
        // font-family: $font-header;
        opacity: .9;

        @media only screen and (max-width: 1000px){
            font-size: .9rem;
        }
    }

    &--student {
        display: flex;
        justify-content: space-between;
        align-items: center;

        h6{
            color: $col-white;
            font-size: .8rem;
            font-weight: 500;
            opacity: .85;
        }

        span{
            font-weight: 600;
            font-size: .75rem;
            color: $col-dark !important;
            background: $col-orange;
            border-radius: 50px;
            height: 2rem;
            width: 2rem;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            text-align: center !important;
            padding: 0 !important;
        }
    }

    button{
        background: $col-orange;
        color: $col-dark;
        padding: .6rem 1.5rem;
        border-radius: 6px;
        font-weight: 600 !important;
        font-size: .8rem;
        margin-top: .5rem;
        @media only screen and (max-width: 1000px) {
            margin-bottom: 1rem;
        }
    }
}