/* Build 13.5 — RTL JavaScript expansion order with FLIP animation */
.ntg {
    width: calc(100% - 20px);
    margin: 10px auto 18px;
    direction: rtl;
    font-family: inherit;
}
.ntg, .ntg * { box-sizing: border-box; }

.ntg__toolbar {
    direction: ltr;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 96px;
    align-items: stretch;
    min-height: 32px;
    background: linear-gradient(#3d3d3d, #292929);
    color: #fff;
    overflow: hidden;
}
.ntg__controls { direction: ltr; display: flex; grid-column: 1; }
.ntg__control {
    width: 32px; min-width: 32px; height: 32px; border: 0;
    border-left: 1px solid rgba(255,255,255,.12);
    background: transparent; color: #fff; font-size: 15px;
    line-height: 32px; padding: 0; cursor: pointer;
}
.ntg__control:hover { background: #151515; }
.ntg__control:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.ntg__pagination {
    grid-column: 2; direction: rtl; display: flex;
    justify-content: center; align-items: stretch; min-width: 0;
}
.ntg__number {
    width: 34px; height: 32px; border: 0;
    border-right: 1px solid rgba(255,255,255,.13);
    background: transparent; color: #fff; font-weight: 700;
    line-height: 32px; padding: 0; cursor: pointer;
}
.ntg__number:hover { background: #1e1e1e; }
.ntg__number.is-active { background: #d71920; }
.ntg__number:focus, .ntg__number:focus-visible { outline: 0; box-shadow: none; }
.ntg__urgent {
    direction: rtl; grid-column: 3; display: flex; align-items: center;
    justify-content: flex-start; padding: 0 8px 0 0;
    font-weight: 700; white-space: nowrap;
}

.ntg__stage--dynamic {
    direction: rtl;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-template-rows: repeat(2, 116px);
    gap: 6px;
    margin-top: 6px;
    height: 238px;
    overflow: hidden;
    background: #fff;
    contain: layout paint;
}
.ntg__item {
    display: block;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    position: relative;
    background: #eee;
    text-decoration: none;
    will-change: transform;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
    z-index: 1;
}
.ntg__item.is-active {
    z-index: 3;
    box-shadow: inset 0 0 0 2px rgba(215,25,32,.32), 0 3px 12px rgba(0,0,0,.16);
}
.ntg__item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .28s ease, filter .28s ease;
}
.ntg__item:not(.is-active):hover img { transform: scale(1.035); }
.ntg__item:focus-visible { outline: 3px solid #d71920; outline-offset: -3px; }
.ntg__item.is-active img { filter: saturate(1.04) contrast(1.02); }

.ntg__caption {
    display: block; min-height: 34px; margin-top: 6px; padding: 5px 12px;
    background: #5a5a5a; color: #fff; text-align: center;
    font-size: 17px; line-height: 24px; text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ntg__caption:hover { color: #fff; background: #444; }

@media (max-width: 991px) {
    .ntg { width: 100%; }
    .ntg__toolbar { grid-template-columns: 96px minmax(0, 1fr) 64px; }
    .ntg__number { width: 28px; }
    .ntg__stage--dynamic {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-template-rows: repeat(4, 82px);
        height: 346px;
    }
}
@media (max-width: 760px) {
    .ntg { margin-top: 8px; }
    .ntg__toolbar { grid-template-columns: 90px minmax(0, 1fr) 54px; }
    .ntg__pagination { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
    .ntg__pagination::-webkit-scrollbar { display: none; }
    .ntg__number { flex: 0 0 28px; }
    .ntg__urgent { padding-right: 4px; font-size: 12px; }
    .ntg__stage--dynamic {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: repeat(6, 74px);
        height: 474px;
    }
    .ntg__caption { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .ntg__item, .ntg__item img { transition: none !important; }
}
