@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes soft-vibrate {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(1px, -1px);
    }
    50% {
        transform: translate(-1px, 1px);
    }
    75% {
        transform: translate(1px, 1px);
    }
    100% {
        transform: translate(0, 0);
    }
}

@keyframes circleEffect {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

#ota_box_banner {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#ota_box_banner img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    height: auto;
}

#ota_box_event_planning {
    margin-top: 80px;
    background: url(/isocms/templates/default/skin/images/ota_bgr_new.png)
            no-repeat,
        #f6f4f3;
    background-size: 100%;
    background-position: 0 215px;
}

.ota_information_title {
    color: var(--Primary-58595B, #58595b);
    text-align: center;
    font-size: 46px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%;
    margin: 0;
}

.ota_information_intro {
    color: var(--Primary-58595B, #58595b);
    text-align: center;
    font-size: 20px;
    font-style: normal;
    font-weight: 450;
    line-height: 150%;
    margin-top: 20px;
}

.ota_lst_catalogue {
    margin-top: 60px;
}

.ota_cookingClass {
    overflow-x: auto;
    /* position: sticky; */
    top: 72px;
    width: 100%;
    /* background: #fff; */
    z-index: 3;
    padding-top: 10px;
}

.ota_cooking_class {
    width: fit-content;
    display: flex;
    align-items: center;
    margin: 0 auto;
    padding-bottom: 10px;
}

.ota_cooking_class_title {
    color: var(--Primary-58595B, #58595b);
    font-size: 30px;
    font-style: normal;
    font-weight: 700;
    line-height: 150%;
    margin: 0;
    display: flex;
    width: max-content;
}

.ota_item_cooking_class {
    padding: 0 60px;
    cursor: pointer;
}

.ota_item_cooking_class:first-child {
    padding-left: 0;
}
.ota_item_cooking_class:last-child {
    padding-right: 0;
}
.ota_item_cooking_class:nth-child(n + 2) {
    border-left: 4px solid var(--Primary-58595B, #58595b);
}

.ota_item_cooking_class.active,
.ota_item_cooking_class:hover {
    overflow: hidden;
    display: flex;
    width: max-content;
    background: linear-gradient(
        90deg,
        var(--Secondary-C3DBE8, #c3dbe8),
        var(--Secondary-CBDB29, #cbdb29),
        var(--Secondary-CC3232, #cc3232),
        var(--Secondary-FFCC33, #fc3),
        var(--Secondary-2C9CDB, #2c9cdb),
        var(--Secondary-C3DBE8, #c3dbe8)
    );
    background-size: 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientAnimation 6s ease-in-out infinite;
}

.ota_list_cooking_class {
    margin-top: 50px;
}

.ota_box_loading {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 30px 0;
    color: var(--Primary-3298CB);
}

.ota_box_loading i {
    animation: spin 2s linear infinite; /* Hiệu ứng xoay */
}

/*css grid*/
.ota_list_cooking_class.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 32px;
    row-gap: 0; /* Xóa row-gap để sử dụng margin */
    align-items: start; /* Mặc định các phần tử căn lề trên */
}
.ota_cooking_class_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    width: 100%;
}
/* Chiều cao của phần tử lẻ */
.ota_cooking_class_item:nth-child(odd) {
    min-height: 300px;
}
/* Chiều cao của phần tử chẵn (cao hơn 1/3) */
.ota_cooking_class_item:nth-child(even) {
    min-height: calc(300px * 5 / 4);
}
/* Các phần tử hàng chẵn căn lề dưới */
.ota_cooking_class_item:nth-child(n + 4):nth-child(-n + 6),
.ota_cooking_class_item:nth-child(n + 10):nth-child(-n + 12) {
    align-self: end;
}
/* Từ hàng thứ 3 trở đi (hàng 3, 5, 7, ...) thêm margin-top: 32px, nhưng loại bỏ hàng 4 */
.ota_cooking_class_item:nth-child(n + 7):not(
        :nth-child(n + 10):nth-child(-n + 12)
    ) {
    margin-top: 32px;
}

.ota_item_image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 4px 4px 0 0; /* Bo góc ảnh */
}
.ota_box_shadow_img {
    position: relative;
    width: 100%;
}
.ota_box_shadow_img::before {
    content: "";
    background: url(/isocms/templates/default/skin/images/shadow_image.png)
        no-repeat;
    position: absolute;
    bottom: -34px;
    width: 100%;
    left: 0;
    height: 34px;
    background-position: center;
}

.ota_item_image img {
    width: 100%;
    opacity: 1;
    transition: transform 0.3s ease, opacity 0.3s ease;
    object-fit: cover;
}

.ota_item_image::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 1s ease-out, opacity 0.5s ease-out;
}

.ota_item_image:hover::after {
    animation: circleEffect 2s forwards;
    animation-delay: 0s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-out;
}

.ota_item_body {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: start;
    gap: 14px;
    padding: 0 10px;
    min-height: 146px;
}

.ota_item_title {
    color: var(--Primary-58595B, #58595b);
    text-align: center;
    font-size: 24px;
    font-style: normal;
    font-weight: 450;
    line-height: 150%;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    /* height: 72px; */
}

.ota_item_link {
    padding: 5px 32px;
    color: var(--Chroma-FFFFFF, #fff);
    text-align: center;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 150%;
    border-radius: 80px;
    background: var(--Primary-3298CB, #3298cb);
    position: relative;
    margin: 0;
}

.ota_cooking_class_item:hover .ota_item_title {
    background: linear-gradient(
        90deg,
        var(--Secondary-C3DBE8, #c3dbe8),
        var(--Secondary-CBDB29, #cbdb29),
        var(--Secondary-CC3232, #cc3232),
        var(--Secondary-FFCC33, #fc3),
        var(--Secondary-2C9CDB, #2c9cdb)
    );
    background-size: 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientAnimation 6s ease-in-out infinite;
}
.ota_item_href {
    position: relative;
    padding: 5px 10px;
}
.ota_cooking_class_item:hover .ota_item_href {
    animation: soft-vibrate 0.3s ease-in-out infinite;
}
/*end css grid*/

#pagination {
    display: flex;
    list-style: none;
    padding: 0;
    justify-content: center;
}
#pagination li {
    margin: 20px 5px;
}
#pagination a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    border: 1px solid #007bff;
    color: #007bff;
    border-radius: 4px;
    cursor: pointer;
}
#pagination .active a {
    background-color: #007bff;
    color: white;
}
#pagination a:hover {
    background-color: #007bff;
    color: white;
}
#pagination .disabled a {
    color: #ccc;
    border-color: #ccc;
    pointer-events: none;
}

#ota_box_event_planning .otao_kitchen_testimonial_section {
    background: unset !important;
}
.item_class_cooking_detail {
    color: var(--Primary-58595B, #58595B);
    text-align: center;
    font-size: 30px;
    font-style: normal;
    font-weight: 700;
    line-height: 36px;
}
@media screen and (max-width: 1200px) {
    .ota_item_cooking_class.active,
    .ota_item_cooking_class:hover {
        overflow: unset;
    }

    .ota_list_cooking_class.grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 32px;
    }

    .ota_cooking_class_item {
        align-self: start !important;
        min-height: fit-content !important;
    }

    .ota_item_image img {
        height: 392px;
    }

    .ota_item_body {
        height: fit-content;
        min-height: unset;
    }

    #ota_box_catalogue {
        margin-top: 40px;
    }

    .ota_information_title {
        font-size: 30px;
        line-height: 150%;
    }

    .ota_information_intro {
        font-size: 16px;
        line-height: 150%;
    }
}

@media screen and (max-width: 991px) {
    .ota_item_image img {
        height: 314px;
    }
    /* #ota_box_banner img {
        height: auto;
    } */
    #ota_box_event_planning {
        background: unset;
    }
}

@media screen and (max-width: 768px) {
    .ota_item_image img {
        height: 314px;
    }

    .ota_information_title,
    .ota_cooking_class_title {
        font-size: 24px;
        line-height: 150%;
    }

    .ota_item_cooking_class {
        padding: 0 30px;
    }

    .ota_item_cooking_class:nth-child(n + 2) {
        border-left: 2px solid var(--Primary-58595B, #58595b);
    }
}

@media screen and (max-width: 576px) {
    .ota_list_cooking_class.grid {
        grid-template-columns: repeat(1, 1fr);
    }

    #ota_box_banner img {
        max-height: 360px;
        height: 360px;
    }
}
