﻿.page-title {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.ag-format-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f9f9f9;
    width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.service-divider {
    align-self: center;
    width: 60%;
    height: 5px;
    background-color: #d2c3cb;
    margin-bottom: 20px;
    border-radius: 2px;
}

.ag-courses_box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.ag-courses_item {
    flex-basis: calc(30% - 30px);
    margin: 0 15px 30px;
    overflow: hidden;
    border-radius: 28px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: none;
    display: flex;
    flex-direction: column;
    height: 350px;
    position: relative;
    transition: transform 0.3s ease;
}

    .ag-courses_item:hover {
        transform: scale(1.05);
    }

.ag-courses-item_link {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0;
    background-color: transparent;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

.ag-courses-item_title {
    margin: 15px 20px 10px;
    font-weight: bold;
    font-size: 24px;
    color: #000;
    position: relative;
    text-align: center;
    flex-grow: 1;
}

.ag-courses-item_date-box {
    font-size: 16px;
    color: #666;
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

.ag-courses-item_date {
    font-weight: bold;
    color: #f9b234;
}

.ag-courses-item_bg {
    height: 128px;
    width: 128px;
    background-color: #f9b234;
    position: absolute;
    top: -75px;
    right: -75px;
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.ag-courses-item_link:hover .ag-courses-item_bg {
    transform: scale(10);
}

.ag-courses_item:nth-child(2n) .ag-courses-item_bg {
    background-color: #3ecd5e;
}

.ag-courses_item:nth-child(3n) .ag-courses-item_bg {
    background-color: #e44002;
}

.ag-courses_item:nth-child(4n) .ag-courses-item_bg {
    background-color: #952aff;
}

.ag-courses_item:nth-child(5n) .ag-courses-item_bg {
    background-color: #cd3e94;
}

.ag-courses_item:nth-child(6n) .ag-courses-item_bg {
    background-color: #4c49ea;
}

@media only screen and (max-width: 979px) {
    .page-title {
        font-size: 32px;
    }

    .ag-courses_item {
        flex-basis: calc(45% - 30px);
    }

    .ag-courses-item_title {
        font-size: 20px;
    }
}

@media only screen and (max-width: 767px) {
    .ag-format-container {
        width: 96%;
    }
}

@media only screen and (max-width: 639px) {
    .page-title {
        font-size: 28px;
    }

    .ag-courses_item {
        flex-basis: 100%;
    }

    .ag-courses-item_title {
        min-height: 72px;
        font-size: 18px;
    }

    .ag-courses-item_link {
        padding: 22px 40px;
    }

    .ag-courses-item_date-box {
        font-size: 14px;
    }
}
