﻿.ag-courses_box {
    display: flex;
    flex-wrap: wrap;
    padding: 15px 0;
}

.ag-courses_item {
    flex: 1;
    margin: 0 15px 30px;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: rgba(0, 0, 0, 0.24) 1px 1px 1px;
}

.ag-courses-item_link {
    display: block;
    padding: 30px 20px;
    background-color: #FFF;
    overflow: hidden;
    position: relative;
}

    .ag-courses-item_link:hover,
    .ag-courses-item_link:hover .ag-courses-item_date {
        text-decoration: none;
        color: #FFF;
    }

        .ag-courses-item_link:hover .ag-courses-item_bg {
            -webkit-transform: scale(10);
            -ms-transform: scale(10);
            transform: scale(10);
             
        }

.ag-courses-item_title {
    min-height:200px;
    margin: 0 0 25px;
    overflow: hidden;
    
  
    z-index: 2;
    position: relative;
}
.ag-courses-item_link:hover .ag-courses-item_title > p {
    color: white;
}
    .ag-courses-item_date-box {
    font-size: 18px;
    color: #FFF;
    z-index: 2;
    position: relative;
}

.ag-courses-item_date {
    font-weight: bold;
    color: #f9b234;
    -webkit-transition: color .5s ease;
    -o-transition: color .5s ease;
    transition: color .5s ease
}

.ag-courses-item_bg {
    height: 128px;
    width: 128px;
    background-color: #6fb86e;
    z-index: 1;
    position: absolute;
    top: -75px;
    right: -75px;
    border-radius: 50%;
    -webkit-transition: all .5s ease;
    -o-transition: all .5s ease;
    transition: all .5s ease;
 
}
.ag-courses_item:nth-child(1n) .ag-courses-item_bg {
    background-color: #236333;
   
}
.ag-courses_item:nth-child(2n) .ag-courses-item_bg {
    background-color: #5AA15E;
}

.ag-courses_item:nth-child(3n) .ag-courses-item_bg {
    background-color: #6fb86e;
}

.ag-courses_item:nth-child(4n) .ag-courses-item_bg {
    background-color: #f9b234;
}

 



@media only screen and (max-width: 979px) {
    .ag-courses_item {
        -ms-flex-preferred-size: calc(50% - 30px);
        flex-basis: calc(50% - 30px);
    }

    .ag-courses-item_title {
       /* font-size: 15px;*/
    }
}

@media only screen and (max-width: 767px) {
    .ag-format-container {
        width: 96%;
    }
}

@media only screen and (max-width: 639px) {
    .ag-courses_item {
        -ms-flex-preferred-size: 100%;
        flex-basis: 100%;
    }

    .ag-courses-item_title {
        min-height: 200px;
        line-height: 1;
       /* font-size: 15px;*/
    }

    .ag-courses-item_link {
        padding: 22px 40px;
    }

    .ag-courses-item_date-box {
       /* font-size: 16px;*/
    }
}


.ag-courses-item_link {
    width: 100%;
    margin: 0 15px 30px;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: rgba(0, 0, 0, 0.24) 1px 1px 1px;
}

.ag-courses-item_title {
    min-height: 13em;
    width: 100%;
    height: 250px;
}

    .ag-courses-item_title img {
        display: block;
        margin: auto;
        width: 200px;
    }

    .ag-courses-item_title p {
        font-size: 1.3em;
    }

.text-container {
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ag-courses-item_link:hover p {
    color: white;
}