.t888-list-gallery .t888-list-gallery-image-inner{
    /* padding: 0 60px; */
}

/* ============================================
   STYLE3 - FADE IN UP ANIMATION
   Animate từng hàng khi cuộn đến
   Delay tính theo vị trí trong hàng (cột), không phụ thuộc hàng nào
   ============================================ */

@keyframes fadeInUpGallery {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Initial state - ẩn tất cả items (KHÔNG áp dụng trong Elementor editor) */
body:not(.elementor-editor-active) .t888-list-gallery.style3 .t888-gallery-grid-item {
    opacity: 0;
    transform: translateY(40px);
}

/* Hiển thị bình thường trong Elementor editor */
body.elementor-editor-active .t888-list-gallery.style3 .t888-gallery-grid-item {
    opacity: 1;
    transform: translateY(0);
}

/* Animate khi item visible (trigger riêng từng item) - KHÔNG trong editor */
body:not(.elementor-editor-active) .t888-list-gallery.style3 .t888-gallery-grid-item.item-visible {
    animation: fadeInUpGallery 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Delay theo vị trí cột (3n+1 = cột 1, 3n+2 = cột 2, 3n+3 = cột 3) */
/* Cột 1 - 0ms delay */
body:not(.elementor-editor-active) .t888-list-gallery.style3 .t888-gallery-grid-item:nth-child(3n+1).item-visible {
    animation-delay: 0ms;
}

/* Cột 2 - 150ms delay */
body:not(.elementor-editor-active) .t888-list-gallery.style3 .t888-gallery-grid-item:nth-child(3n+2).item-visible {
    animation-delay: 0.15s;
}

/* Cột 3 - 300ms delay */
body:not(.elementor-editor-active) .t888-list-gallery.style3 .t888-gallery-grid-item:nth-child(3n+3).item-visible {
    animation-delay: 0.3s;
}


.t888-list-gallery .list-gallery-wrapper-logo{
    align-items: center;
}
.t888-list-gallery .t888-list-gallery-title{
    margin-top: 0;
    margin-bottom: 24px;
}
.t888-list-gallery .swiper-button-next{
    top: -86px;
    right: 0;
    z-index: 5;
}
.t888-list-gallery .swiper-button-next:hover{
   background:var(--third-color);
   color: var(--secondary-color);
    border: 1px solid var(--third-color);
}
.t888-list-gallery .swiper-button-next:hover i{
    color: var(--secondary-color);
}
.t888-list-gallery .swiper-button-prev{
    top: -86px;
    right: 36px;
    left: auto;
    z-index: 5;
}
.t888-list-gallery .swiper-button-prev:hover{
   background:var(--third-color);
   color: var(--secondary-color);
   border: 1px solid var(--third-color);
}
.t888-list-gallery .swiper-button-prev:hover i{
    color: var(--secondary-color);
}
.t888-list-gallery-image-inner img {
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.t888-list-gallery-item.swiper-slide {
    /* max-width: 115px; */
}


/* ===== GRID STYLE 3 ===== */
.t888-list-gallery.style3 .t888-gallery-grid {
    display: grid;
    grid-template-columns: repeat(var(--gallery-columns), 1fr);
    gap: var(--gallery-gap);
}

.t888-list-gallery.style3 .t888-gallery-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.t888-list-gallery.style3 .t888-gallery-img {
    width: 100%;
    height: 100%;
    aspect-ratio: 450/320;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.t888-list-gallery.style3 .t888-gallery-grid-item:hover img {
    transform: scale(1.05);
}

/* ===== PAGINATION ===== */
.t888-gallery-pagination {
    margin-top: 60px;
    text-align: center;
}

.t888-gallery-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 10px;
}

.t888-gallery-pagination li {
    display: inline-block;
}

.t888-gallery-pagination a,
.t888-gallery-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    background: #D9D9D9;
    border: 1px solid #D9D9D9;
    transition: all 0.25s ease;
}

.t888-gallery-pagination .current {
    background: var(--third-color);
    color: #fff;
    border-color: var(--third-color);
}

.t888-gallery-pagination a:hover {
    background: var(--third-color);
    color: #fff;
    border-color: var(--third-color);
}

/* =================================================
   STYLE 4 – MARQUEE + CURVED ELLIPSE
================================================= */

.t888-list-gallery.style4 {
    position: relative;
    background: #0b3a78; 
    overflow: hidden;
}

/* ===== TITLE ===== */
.t888-list-gallery.style4 .t888-list-gallery-title {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    margin-bottom: 50px;
}

/* ===== CURVED SHAPES ===== */
.t888-list-gallery.style4::before {
    content: '';
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 105%;
    height: 120px;
    background: #00377B; 
    border-radius: 0 0 50% 50%;
    z-index: 15;
}
.t888-list-gallery.style4::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 105%;
    height: 120px;
    background: #00377B; 
    border-radius: 50% 50% 0 0;
    z-index: 15;
}


/* ===== MARQUEE ===== */
.style4-marquee {
    position: relative;
    z-index: 2;
    overflow: hidden;
    width: 100%;
}

.style4-marquee-track {
    display: flex;
    width: max-content;
    animation: style4-marquee 90s linear infinite;
}

.style4-item {
    flex: 0 0 auto;
    margin: 0 15px;
}

.style4-item img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
}

/* ===== ANIMATION ===== */
@keyframes style4-marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}



/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
     .t888-list-gallery.style4::before,
     .t888-list-gallery.style4::after {
        width: 125%;
     }
     .t888-list-gallery.style3 .t888-gallery-grid{
        gap: 20px;
     }
}

@media (max-width: 767px) {

    .style4-item img {
        height: 400px;
    }
 .t888-list-gallery.style4::before,
     .t888-list-gallery.style4::after {
        width: 160%;
        height: 80px;
     }
     .t888-list-gallery.style3 .t888-gallery-grid{
        grid-template-columns: repeat(2, 1fr);
     }
     .t888-gallery-pagination a, .t888-gallery-pagination span{
        min-width: 50px;
        height: 50px;
        font-size: 16px;
     }
}
