.nvs-gallery-wrap{
    --nvs-text:#17223b;
    --nvs-muted:#667085;
    --nvs-border:#e9e3dd;
    --nvs-radius:0;
    --nvs-bg:#fffaf6;
    --nvs-primary:#d00b13;
    --nvs-primary-dark:#9b0208;
    --nvs-columns:4;
    width:100%;
    color:var(--nvs-text);
}
.nvs-gallery-wrap *{box-sizing:border-box;}
.nvs-gallery-title{
    margin:0 0 22px;
    font-size:clamp(26px,3vw,40px);
    line-height:1.15;
    letter-spacing:-.03em;
    color:#0b3a79;
    text-align:center;
    font-weight:800;
    text-transform:uppercase;
}


.nvs-gallery-intro{
    max-width:920px;
    margin:-6px auto 26px;
    color:#344054;
    font-size:16px;
    line-height:1.7;
    text-align:center;
}
.nvs-gallery-intro p{
    margin:0 0 12px;
}
.nvs-gallery-intro p:last-child{
    margin-bottom:0;
}
.nvs-gallery-intro a{
    color:#0b3a79;
    font-weight:700;
    text-decoration:underline;
    text-underline-offset:3px;
}

.nvs-gallery-grid{
    display:grid;
    grid-template-columns:repeat(var(--nvs-columns),minmax(0,1fr));
    gap:20px;
}
.nvs-gallery-card{
    display:block;
    width:100%;
    padding:0;
    border:1px solid var(--nvs-border);
    border-radius:var(--nvs-radius);
    overflow:hidden;
    background:#fff;
    cursor:pointer;
    text-align:left;
    box-shadow:0 12px 34px rgba(70,44,28,.07);
    transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    font:inherit;
}
.nvs-gallery-card:hover,
.nvs-gallery-card:focus-visible{
    transform:translateY(-4px);
    border-color:rgba(208,11,19,.35);
    box-shadow:0 18px 44px rgba(70,44,28,.13);
    outline:none;
}
.nvs-card-media{
    display:block;
    position:relative;
    aspect-ratio:4/3;
    background:var(--nvs-bg);
    overflow:hidden;
}
.nvs-video-grid .nvs-card-media{
    aspect-ratio:16/9;
}
.nvs-card-media img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
    transition:transform .32s ease;
}
.nvs-gallery-card:hover img{
    transform:scale(1.045);
}
.nvs-card-caption{
    display:block;
    padding:13px 15px 15px;
    font-size:15px;
    line-height:1.35;
    font-weight:600;
    color:var(--nvs-text);
}
.nvs-card-caption strong,
.nvs-card-caption small{
    display:block;
}
.nvs-card-caption small{
    margin-top:3px;
    font-size:13px;
    line-height:1.35;
    color:var(--nvs-muted);
    font-weight:600;
}
.nvs-play-icon{
    position:absolute;
    inset:50% auto auto 50%;
    width:62px;
    height:62px;
    transform:translate(-50%,-50%);
    border-radius:999px;
    background:#e50914;
    box-shadow:0 12px 35px rgba(0,0,0,.22);
}
.nvs-play-icon::before{
    content:"";
    position:absolute;
    top:50%;
    left:53%;
    transform:translate(-38%,-50%);
    width:0;
    height:0;
    border-top:13px solid transparent;
    border-bottom:13px solid transparent;
    border-left:20px solid #fff;
}
.nvs-pagination{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:8px;
    margin-top:30px;
}
.nvs-page-link,
.nvs-page-dots{
    min-width:40px;
    height:40px;
    padding:0 13px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    font-size:14px;
    font-weight:700;
    text-decoration:none!important;
}
.nvs-page-link{
    border:1px solid var(--nvs-border);
    color:var(--nvs-text)!important;
    background:#fff;
}
.nvs-page-link:hover,
.nvs-page-link.is-current{
    color:#fff!important;
    border-color:var(--nvs-primary);
    background:var(--nvs-primary);
}
.nvs-page-dots{color:var(--nvs-muted);}
.nvs-gallery-empty{
    padding:20px;
    border:1px dashed var(--nvs-border);
    border-radius:var(--nvs-radius);
    background:#fff;
    color:var(--nvs-muted);
}
.nvs-gallery-more{
    margin:26px 0 0;
    text-align:center;
}
.nvs-gallery-more a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:0 22px;
    border-radius:999px;
    background:#d00b13;
    color:#fff!important;
    font-weight:700;
    text-decoration:none!important;
}
.nvs-gallery-more a:hover{background:#b2070e;}

/* Home page style: dùng cho các shortcode nvs_home_customer_* */
.nvs-home-gallery{margin-top:18px;}
.nvs-home-video-gallery 
.nvs-gallery-grid{gap:28px 20px;}
.nvs-home-video-gallery .nvs-gallery-card{
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    overflow:visible;
}
.nvs-home-video-gallery .nvs-gallery-card:hover,
.nvs-home-video-gallery .nvs-gallery-card:focus-visible{
    transform:translateY(-3px);
    box-shadow:none;
}
.nvs-home-video-gallery .nvs-card-media{
    border-radius:0;
    background:#111;
    box-shadow:0 8px 22px rgba(16,24,40,.12);
}
.nvs-home-video-gallery .nvs-play-icon{
    width:68px;
    height:48px;
    border-radius:14px;
    background:#ff0000;
}
.nvs-home-video-gallery .nvs-play-icon::before{
    border-top-width:10px;
    border-bottom-width:10px;
    border-left-width:17px;
}
.nvs-home-image-gallery 
.nvs-gallery-grid{gap:28px 26px;}
.nvs-home-image-gallery .nvs-gallery-card{
    border:0;
    background:transparent;
    box-shadow:none;
    overflow:visible;
    text-align:center;
}
.nvs-home-image-gallery .nvs-gallery-card:hover,
.nvs-home-image-gallery .nvs-gallery-card:focus-visible{
    transform:translateY(-4px);
    box-shadow:none;
}
.nvs-home-image-gallery .nvs-card-media{
    aspect-ratio:4/3;
    padding:14px;
    border-radius:18px;
    background:#d00b13;
    overflow:hidden;
    box-shadow:0 10px 24px rgba(208,11,19,.16);
}
.nvs-home-image-gallery .nvs-card-media img{
    border-radius:14px;
}
.nvs-home-image-gallery .nvs-card-caption{
    padding:14px 4px 0;
    color:#111827;
    text-align:center;
    font-size:16px;
    font-weight:800;
}
.nvs-home-image-gallery .nvs-card-caption small{
    color:#111827;
    font-size:15px;
    font-weight:800;
}

/* Lightbox / slide box */
.nvs-lightbox{
    position:fixed;
    inset:0;
    z-index:999999;
    display:none;
    align-items:center;
    justify-content:center;
    padding:clamp(22px,4vw,58px) clamp(18px,6vw,88px);
    background:rgba(21,15,12,.86);
    backdrop-filter:blur(8px);
}
.nvs-lightbox.is-open{display:flex;}
.nvs-lightbox-inner{
    position:relative;
    width:min(1100px,100%);
    max-height:92vh;
}
.nvs-lightbox-stage{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:260px;
    border-radius:22px;
    background:#111;
    overflow:hidden;
    box-shadow:0 24px 80px rgba(0,0,0,.45);
}
.nvs-lightbox-stage img{
    max-width:100%;
    max-height:82vh;
    display:block;
    object-fit:contain;
}
.nvs-video-frame{
    width:100%;
    aspect-ratio:16/9;
    border:0;
    display:block;
    background:#000;
}
.nvs-lightbox-title{
    margin-top:14px;
    color:#fff;
    text-align:center;
    font-weight:800;
    font-size:clamp(18px,2.2vw,28px);
    line-height:1.25;
    text-shadow:0 3px 18px rgba(0,0,0,.45);
}
.nvs-lightbox-close,
.nvs-lightbox-prev,
.nvs-lightbox-next{
    position:absolute;
    z-index:5;
    width:46px!important;
    height:46px!important;
    min-width:46px!important;
    max-width:46px!important;
    min-height:46px!important;
    padding:0!important;
    margin:0!important;
    border:1px solid rgba(255,255,255,.42)!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.92)!important;
    color:#111827!important;
    cursor:pointer;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    box-shadow:0 14px 34px rgba(0,0,0,.28)!important;
    font-family:Arial,sans-serif!important;
    font-weight:800!important;
    line-height:1!important;
    text-align:center!important;
    -webkit-appearance:none;
    appearance:none;
    transition:transform .18s ease, background .18s ease, color .18s ease;
}
.nvs-lightbox-close{
    top:-58px;
    right:0;
    font-size:30px!important;
}
.nvs-lightbox-prev,
.nvs-lightbox-next{
    top:50%;
    transform:translateY(-50%);
    font-size:36px!important;
}
.nvs-lightbox-prev{left:-64px;}
.nvs-lightbox-next{right:-64px;}
.nvs-lightbox-close:hover,
.nvs-lightbox-prev:hover,
.nvs-lightbox-next:hover,
.nvs-lightbox-close:focus-visible,
.nvs-lightbox-prev:focus-visible,
.nvs-lightbox-next:focus-visible{
    background:#fff!important;
    outline:2px solid rgba(255,255,255,.55);
    outline-offset:3px;
}
.nvs-lightbox-close:hover{transform:translateY(-2px);}
.nvs-lightbox-prev:hover{transform:translateY(-50%) translateX(-2px);}
.nvs-lightbox-next:hover{transform:translateY(-50%) translateX(2px);}

@media (max-width:1024px){
    
.nvs-gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:767px){
    
.nvs-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
    .nvs-card-caption{font-size:13px;padding:10px 11px 12px;}
    .nvs-card-caption small{font-size:12px;}
    .nvs-play-icon{width:50px;height:50px;}
    .nvs-home-video-gallery .nvs-play-icon{width:58px;height:42px;}
    .nvs-home-image-gallery .nvs-card-media{padding:10px;border-radius:16px;}
    .nvs-home-image-gallery .nvs-card-media img{border-radius:12px;}
    .nvs-home-image-gallery .nvs-card-caption{font-size:14px;}
    .nvs-home-image-gallery .nvs-card-caption small{font-size:13px;}
    .nvs-lightbox{
        align-items:center;
        padding:calc(env(safe-area-inset-top) + 70px) 14px calc(env(safe-area-inset-bottom) + 78px);
    }
    .nvs-lightbox-inner{
        width:100%;
        max-height:calc(100vh - 150px);
        padding-bottom:58px;
    }
    .nvs-lightbox-stage{
        min-height:180px;
        border-radius:18px;
    }
    .nvs-lightbox-stage img{
        max-height:58vh;
    }
    .nvs-lightbox-title{
        margin-top:12px;
        font-size:21px;
        line-height:1.25;
        padding:0 8px;
    }
    .nvs-lightbox-close{
        top:-56px;
        right:4px;
        width:42px!important;
        height:42px!important;
        min-width:42px!important;
        max-width:42px!important;
        min-height:42px!important;
        font-size:29px!important;
    }
    .nvs-lightbox-prev,
    .nvs-lightbox-next{
        top:auto;
        bottom:0;
        width:44px!important;
        height:44px!important;
        min-width:44px!important;
        max-width:44px!important;
        min-height:44px!important;
        transform:none;
        font-size:34px!important;
    }
    .nvs-lightbox-prev{left:calc(50% - 54px);}
    .nvs-lightbox-next{right:calc(50% - 54px);}
    .nvs-lightbox-prev:hover,
    .nvs-lightbox-next:hover{transform:translateY(-2px);}
}
@media (max-width:420px){
    
.nvs-gallery-grid{grid-template-columns:1fr;}
    .nvs-home-video-gallery .nvs-gallery-grid,
    .nvs-home-image-gallery 
.nvs-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}


/* v1.1.3: bỏ bo góc và bóng đổ trong cách hiển thị hình ảnh/video */
.nvs-gallery-wrap .nvs-gallery-card,
.nvs-gallery-wrap .nvs-card-media,
.nvs-gallery-wrap .nvs-card-media img,
.nvs-gallery-wrap .nvs-video-card,
.nvs-home-video-gallery .nvs-gallery-card,
.nvs-home-video-gallery .nvs-card-media,
.nvs-home-image-gallery .nvs-gallery-card,
.nvs-home-image-gallery .nvs-card-media,
.nvs-home-image-gallery .nvs-card-media img,
.nvs-lightbox-stage,
.nvs-lightbox-stage img,
.nvs-video-frame{
    border-radius:0!important;
    box-shadow:none!important;
}
.nvs-gallery-wrap .nvs-gallery-card:hover,
.nvs-gallery-wrap .nvs-gallery-card:focus-visible,
.nvs-home-video-gallery .nvs-gallery-card:hover,
.nvs-home-video-gallery .nvs-gallery-card:focus-visible,
.nvs-home-image-gallery .nvs-gallery-card:hover,
.nvs-home-image-gallery .nvs-gallery-card:focus-visible{
    box-shadow:none!important;
}
.nvs-card-media,
.nvs-lightbox-stage{
    overflow:hidden;
}

/* Mobile: bỏ nút đóng và nút điều hướng, click/tap ra ngoài để đóng. PC vẫn giữ nút như cũ. */
@media (max-width:767px){
    .nvs-lightbox-close,
    .nvs-lightbox-prev,
    .nvs-lightbox-next{
        display:none!important;
        visibility:hidden!important;
        opacity:0!important;
        pointer-events:none!important;
    }
    .nvs-lightbox-inner{
        padding-bottom:0!important;
    }
    .nvs-lightbox{
        padding:calc(env(safe-area-inset-top) + 34px) 14px calc(env(safe-area-inset-bottom) + 34px)!important;
    }
}


/* v1.1.4: cache-busting + hard override cho hiển thị media */
.nvs-gallery-wrap .nvs-gallery-card,
.nvs-gallery-wrap .nvs-card-media,
.nvs-gallery-wrap .nvs-card-media img,
.nvs-gallery-wrap iframe.nvs-video-frame,
.nvs-lightbox-stage,
.nvs-lightbox-stage img,
.nvs-lightbox-stage iframe,
.nvs-home-video-gallery .nvs-gallery-card,
.nvs-home-video-gallery .nvs-card-media,
.nvs-home-image-gallery .nvs-gallery-card,
.nvs-home-image-gallery .nvs-card-media,
.nvs-home-image-gallery .nvs-card-media img{
    border-radius:0!important;
    box-shadow:none!important;
    filter:none!important;
}
.nvs-gallery-wrap .nvs-gallery-card:hover,
.nvs-gallery-wrap .nvs-gallery-card:focus-visible,
.nvs-home-video-gallery .nvs-gallery-card:hover,
.nvs-home-video-gallery .nvs-gallery-card:focus-visible,
.nvs-home-image-gallery .nvs-gallery-card:hover,
.nvs-home-image-gallery .nvs-gallery-card:focus-visible{
    box-shadow:none!important;
}
@media (max-width:767px){
    body .nvs-lightbox .nvs-lightbox-close,
    body .nvs-lightbox .nvs-lightbox-prev,
    body .nvs-lightbox .nvs-lightbox-next{
        display:none!important;
        visibility:hidden!important;
        opacity:0!important;
        pointer-events:none!important;
        width:0!important;
        height:0!important;
        min-width:0!important;
        min-height:0!important;
        overflow:hidden!important;
    }
}
