.wrap_portfolio .item {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    min-width: 0;
    display: block;
}
/*LMS WRAP LIST */

.wrap_portfolio {
    padding: 30px 0;
}

/* Apply two-column grid to actual item containers */
#wrap-list-content,
#wrap-list-skeleton {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.wrap_portfolio .item .thumbnail-portfolio {
    height: 370px !important;
    background-color: #000;
    overflow: hidden;
    position: relative;
}

.wrap_portfolio .item .thumbnail-portfolio img {
    object-fit: contain !important;
    object-position: center;
    width: 100%;
    height: 100%;
}

/* Per-item skeleton overlay until image load */
.item-skeleton {
    position: absolute;
    inset: 0;
    background-color: #575757;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: skeleton-dark-pulse 1.2s infinite ease-in-out;
    z-index: 1;
}
.item-skeleton-text {
    color: #c9c9c9;
    font-size: 13px;
}

.wrap_portfolio .item .ttitle {
    min-height: 40px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 10px 0;
}

.wrap_portfolio .item .trr {
    width: 100% !important;
    height: 100% !important;
}

/* Skeleton visuals to match card layout */
.skeleton-item {
    height: auto; /* allow inner skeleton blocks to define height */
    background: none;
    animation: none;
}

.skeleton-thumb {
    height: 370px !important;
    background-color: #575757;
    border-radius: 0;
    animation: skeleton-dark-pulse 1.2s infinite ease-in-out;
    position: relative;
}

.skeleton-title {
    height: 22px;
    background-color: #575757;
    border-radius: 0;
    margin-bottom: 10px;
    animation: skeleton-dark-pulse 1.2s infinite ease-in-out;
}

/* Overlay text centered inside skeleton thumbnail */
.skeleton-loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.skeleton-lottie {
    width: 56px;
    height: 56px;
}

.skeleton-loading-text {
    color: #c9c9c9;
    font-size: 13px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    white-space: nowrap;
}

/* Ensure no rounded corners on actual thumbnails or zoom anchors */
.wrap_portfolio .item .thumbnail-portfolio,
.wrap_portfolio .item .thumbnail-portfolio img,
.wrap_portfolio .item .MagicZoomPlus,
.wrap_portfolio .item .MagicZoomPlus img {
    border-radius: 0 !important;
}

/* CSS spinner fallback if Lottie fails or is slow */
/* spinner removed */

/* Loading text shown above skeleton tiles */
.skeleton-loading-text {
    grid-column: 1 / -1;
    text-align: center;
    color: #9aa0a6;
    font-size: 14px;
    line-height: 1.4;
    padding: 4px 0 8px;
    animation: skeleton-fade 1.2s ease-in-out infinite;
}

@keyframes skeleton-fade {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Dark pulse for skeleton surfaces */
@keyframes skeleton-dark-pulse {
    0% { background-color: #4f4f4f; }
    50% { background-color: #6a6a6a; }
    100% { background-color: #4f4f4f; }
}

.wrap_portfolio .item .ttitle h3 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 16px !important;
    color: #fff !important;
    margin: 2px 0 !important;
    min-height: auto !important;
    font-size: 20px;
    line-height: 23px;
}

@media (max-width: 768px) {
    #wrap-list-content,
    #wrap-list-skeleton {
        grid-template-columns: 1fr;
    }

    .wrap_portfolio .item .thumbnail-portfolio img {
        object-fit: contain !important;
        object-position: center;
        width: 100%;
        height: 100%;
    }
}