/* =========================================================
   NEWMOVIES.ONLINE — CATALOG FAMILY
   Categories / Countries / Years / Actors + result pages
   ========================================================= */

.nm-family-page {
    background:
        radial-gradient(circle at 12% 16%, rgba(196,35,51,.08), transparent 27%),
        radial-gradient(circle at 88% 9%, rgba(255,255,255,.025), transparent 26%),
        #05070a;
    color: #eef2f5;
}

.nm-family-page main { min-height: 64vh; }

.nm-family-hero {
    padding: 48px 0 34px;
    border-bottom: 1px solid rgba(255,255,255,.055);
}

.nm-hub-hero { padding-bottom: 38px; }

.nm-family-hero h1 {
    position: relative;
    display: inline-block;
    margin: 8px 0 0;
    padding-bottom: 13px;
    color: #f0f3f6;
    background: linear-gradient(180deg,#fff 0%,#edf0f3 56%,#bec5cc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(34px,4.5vw,56px);
    line-height: .98;
    font-weight: 850;
    letter-spacing: -.045em;
}

.nm-family-hero h1::after {
    content:"";
    position:absolute;
    left:0;
    bottom:0;
    width:74px;
    height:2px;
    border-radius:999px;
    background:linear-gradient(90deg,#d62b3a,rgba(214,43,58,0));
}

.nm-family-hero p {
    max-width: 700px;
    margin: 17px 0 0;
    color: #aab3bd;
    font-size: 13px;
    line-height: 1.75;
}

.nm-browse-tabs {
    display:flex;
    align-items:center;
    gap:7px;
    width:max-content;
    max-width:100%;
    margin: 0 0 32px;
    padding:5px;
    overflow-x:auto;
    scrollbar-width:none;
    border:1px solid rgba(255,255,255,.07);
    border-radius:999px;
    background:rgba(255,255,255,.025);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}

.nm-browse-tabs::-webkit-scrollbar { display:none; }

.nm-browse-tabs a {
    flex:0 0 auto;
    padding:9px 14px;
    border-radius:999px;
    color:#89939d;
    text-decoration:none;
    font-size:10px;
    font-weight:850;
    letter-spacing:.045em;
    transition:color .2s ease, background .2s ease;
}

.nm-browse-tabs a:hover { color:#fff; }
.nm-browse-tabs a.is-active {
    color:#fff;
    background:rgba(214,43,58,.13);
    box-shadow:inset 0 0 0 1px rgba(214,43,58,.2);
}

.nm-family-heading-row {
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:28px;
}

.nm-family-back {
    flex:0 0 auto;
    margin-bottom:7px;
    color:#aab3bd;
    text-decoration:none;
    font-size:10px;
    font-weight:850;
    letter-spacing:.05em;
}

.nm-family-back:hover { color:#e25561; }

.nm-family-stats {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:10px;
    margin-top:22px;
    color:#7f8993;
    font-size:10px;
    font-weight:750;
}

.nm-family-stats strong { color:#dfe4e8; font-weight:900; }
.nm-family-stats i { width:3px; height:3px; border-radius:50%; background:#d62b3a; opacity:.7; }

.nm-family-content { padding:34px 0 70px; }
.nm-family-section + .nm-family-section { margin-top:58px; }
.nm-family-section-heading { margin-bottom:20px; }
.nm-family-section-heading h2 { font-size:clamp(26px,2.7vw,36px); }

.nm-family-empty {
    padding:56px 26px;
    text-align:center;
    border:1px solid rgba(255,255,255,.065);
    border-radius:14px;
    background:rgba(255,255,255,.018);
}
.nm-family-empty strong { display:block; font-size:18px; }
.nm-family-empty p { margin:8px 0 0; color:#89939d; font-size:12px; }

/* Category hub */
.nm-category-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
}

.nm-category-card {
    position:relative;
    min-height:230px;
    overflow:hidden;
    isolation:isolate;
    border:1px solid rgba(255,255,255,.075);
    border-radius:16px;
    background:#090c10;
    color:#fff;
    text-decoration:none;
    box-shadow:0 18px 40px rgba(0,0,0,.17);
    transition:transform .26s ease,border-color .26s ease,box-shadow .26s ease;
}

.nm-category-art {
    position:absolute;
    inset:0;
    z-index:-2;
    background:
        radial-gradient(circle at 70% 20%,rgba(214,43,58,.12),transparent 35%),
        var(--nm-category-image, none) center/cover no-repeat,
        #0b0f14;
    filter:saturate(.9) brightness(.82);
    transition:transform .4s ease,filter .3s ease;
}

.nm-category-shade {
    position:absolute;
    inset:0;
    z-index:-1;
    background:linear-gradient(90deg,rgba(4,7,10,.96) 0%,rgba(4,7,10,.77) 48%,rgba(4,7,10,.24) 100%);
}

.nm-category-copy {
    min-height:230px;
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    padding:24px;
}

.nm-category-top { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; }
.nm-category-top strong { font-size:25px; line-height:1; letter-spacing:-.035em; }
.nm-category-top span { color:#a3adb6; font-size:9px; font-weight:850; text-transform:uppercase; letter-spacing:.08em; }
.nm-category-description { max-width:490px; margin-top:10px; color:#a9b1b9; font-size:11px; line-height:1.6; }
.nm-category-explore { margin-top:18px; color:#e4e8eb; font-size:10px; font-weight:850; letter-spacing:.025em; }
.nm-category-explore b { margin-left:5px; color:#e25561; }

@media (hover:hover) and (pointer:fine) {
    .nm-category-card:hover { transform:translateY(-3px); border-color:rgba(214,43,58,.3); box-shadow:0 24px 54px rgba(0,0,0,.24); }
    .nm-category-card:hover .nm-category-art { transform:scale(1.035); filter:saturate(1) brightness(.9); }
}

/* Country hub */
.nm-link-grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:11px;
}

.nm-link-card {
    position:relative;
    min-height:126px;
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    padding:17px 18px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.07);
    border-radius:12px;
    background:linear-gradient(145deg,rgba(255,255,255,.027),rgba(255,255,255,.008));
    color:#fff;
    text-decoration:none;
    transition:transform .22s ease,border-color .22s ease,background .22s ease;
}

.nm-link-card::before {
    content:"";
    position:absolute;
    left:0;
    top:0;
    width:42px;
    height:2px;
    background:linear-gradient(90deg,#d62b3a,transparent);
}
.nm-link-card-label { color:#c34a56; font-size:7.5px; font-weight:950; letter-spacing:.12em; }
.nm-link-card strong { margin-top:9px; font-size:17px; line-height:1.05; letter-spacing:-.025em; }
.nm-link-card-meta { margin-top:8px; color:#87929c; font-size:9px; font-weight:750; }
.nm-link-card-meta b { float:right; color:#d85d68; }
@media (hover:hover) and (pointer:fine) {
    .nm-link-card:hover { transform:translateY(-2px); border-color:rgba(214,43,58,.26); background:rgba(255,255,255,.032); }
}

/* Years */
.nm-year-grid {
    display:grid;
    grid-template-columns:repeat(8,minmax(0,1fr));
    gap:9px;
}
.nm-year-card {
    min-height:94px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    border:1px solid rgba(255,255,255,.065);
    border-radius:11px;
    background:rgba(255,255,255,.017);
    color:#fff;
    text-decoration:none;
    transition:transform .2s ease,border-color .2s ease,background .2s ease;
}
.nm-year-card strong { font-size:22px; letter-spacing:-.035em; }
.nm-year-card span { margin-top:5px; color:#7f8993; font-size:8.5px; font-weight:800; }
.nm-year-card:hover { transform:translateY(-2px); border-color:rgba(214,43,58,.28); background:rgba(214,43,58,.035); }

/* Actors */
.nm-actor-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:9px;
}
.nm-actor-card {
    display:grid;
    grid-template-columns:42px minmax(0,1fr) 18px;
    align-items:center;
    gap:12px;
    min-height:68px;
    padding:10px 13px;
    border:1px solid rgba(255,255,255,.06);
    border-radius:11px;
    background:rgba(255,255,255,.016);
    color:#fff;
    text-decoration:none;
    transition:border-color .2s ease,background .2s ease,transform .2s ease;
}
.nm-actor-avatar {
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:linear-gradient(145deg,#202630,#0b0f14);
    color:#d6dce1;
    font-size:13px;
    font-weight:900;
    border:1px solid rgba(255,255,255,.07);
}
.nm-actor-copy { min-width:0; }
.nm-actor-copy strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.nm-actor-copy span { display:block; margin-top:4px; color:#7e8993; font-size:8.5px; font-weight:750; }
.nm-actor-arrow { color:#bd4550; font-size:14px; }
.nm-actor-card:hover { transform:translateY(-1px); border-color:rgba(214,43,58,.24); background:rgba(255,255,255,.025); }

/* Pagination */
.nm-family-pagination-wrap { display:flex; justify-content:flex-end; margin-top:34px; }
.nm-family-pagination { display:flex; align-items:center; gap:5px; }
.nm-family-page-number,.nm-family-page-arrow,.nm-family-page-dots {
    min-width:32px;
    height:32px;
    display:grid;
    place-items:center;
    border:1px solid rgba(255,255,255,.07);
    border-radius:9px;
    color:#9aa4ad;
    text-decoration:none;
    font-size:10px;
    font-weight:850;
}
.nm-family-page-number:hover,.nm-family-page-arrow:hover { color:#fff; border-color:rgba(214,43,58,.26); }
.nm-family-page-number.is-current { color:#fff; border-color:rgba(214,43,58,.4); background:rgba(214,43,58,.12); }
.nm-family-page-arrow.is-disabled { opacity:.3; }
.nm-family-page-dots { border-color:transparent; }

@media (max-width:1100px) {
    .nm-link-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
    .nm-year-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
}

@media (max-width:820px) {
    .nm-category-grid { grid-template-columns:1fr; }
    .nm-link-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .nm-year-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
    .nm-actor-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .nm-family-heading-row { align-items:flex-start; flex-direction:column; gap:13px; }
    .nm-family-back { margin-bottom:0; }
}

@media (max-width:560px) {
    .nm-family-hero { padding:30px 0 25px; }
    .nm-browse-tabs { width:100%; margin-bottom:25px; border-radius:12px; }
    .nm-browse-tabs a { padding:8px 12px; }
    .nm-family-hero h1 { font-size:35px; }
    .nm-family-content { padding-top:24px; }
    .nm-category-card,.nm-category-copy { min-height:205px; }
    .nm-category-copy { padding:19px; }
    .nm-category-top strong { font-size:22px; }
    .nm-link-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
    .nm-link-card { min-height:110px; padding:14px; }
    .nm-link-card strong { font-size:15px; }
    .nm-year-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
    .nm-year-card { min-height:80px; }
    .nm-year-card strong { font-size:19px; }
    .nm-actor-grid { grid-template-columns:1fr; }
    .nm-family-pagination-wrap { justify-content:center; }
}




/* =========================================================
   V3 — COUNTRIES HUB
   Featured cinematic row + compact country directory
   ========================================================= */

.nm-country-featured {
    margin-bottom: 58px;
}

.nm-country-section-heading,
.nm-country-all-heading {
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:28px;
    margin-bottom:20px;
}

.nm-country-section-heading h2,
.nm-country-all-heading h2 {
    margin:6px 0 0;
    font-size:clamp(25px,2.5vw,35px);
    line-height:1;
    letter-spacing:-.035em;
}

.nm-country-section-heading > p {
    max-width:390px;
    margin:0 0 2px;
    color:#77828c;
    font-size:10px;
    line-height:1.65;
    text-align:right;
}


/* Featured countries */
.nm-country-feature-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
}

.nm-country-feature-card {
    position:relative;
    min-height:215px;
    overflow:hidden;
    isolation:isolate;
    border:1px solid rgba(255,255,255,.075);
    border-radius:15px;
    background:
        radial-gradient(circle at 80% 20%,rgba(214,43,58,.13),transparent 34%),
        #0a0d11;
    color:#fff;
    text-decoration:none;
    box-shadow:0 18px 38px rgba(0,0,0,.16);
    transition:transform .25s ease,border-color .25s ease,box-shadow .25s ease;
}

.nm-country-feature-art {
    position:absolute;
    inset:0;
    z-index:-3;
    width:100%;
    height:100%;
    object-fit:cover;
    filter:saturate(.82) brightness(.72);
    transform:scale(1.01);
    transition:transform .4s ease,filter .3s ease;
}

.nm-country-feature-shade {
    position:absolute;
    inset:0;
    z-index:-2;
    background:
        linear-gradient(180deg,rgba(5,7,10,.13) 0%,rgba(5,7,10,.42) 42%,rgba(5,7,10,.96) 100%),
        linear-gradient(90deg,rgba(5,7,10,.5),transparent 68%);
}

.nm-country-feature-card::after {
    content:"";
    position:absolute;
    left:0;
    top:0;
    width:52px;
    height:2px;
    background:linear-gradient(90deg,#d62b3a,transparent);
}

.nm-country-feature-top {
    position:absolute;
    top:15px;
    left:16px;
    right:15px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.nm-country-badge {
    min-width:32px;
    height:27px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 7px;
    border:1px solid rgba(255,255,255,.10);
    border-radius:8px;
    background:rgba(6,8,11,.52);
    backdrop-filter:blur(7px);
    color:#eef2f5;
    font-size:14px;
    line-height:1;
    font-weight:900;
}

.nm-country-feature-arrow {
    width:28px;
    height:28px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,255,255,.09);
    border-radius:50%;
    background:rgba(6,8,11,.40);
    color:#d8dde1;
    font-size:11px;
    backdrop-filter:blur(7px);
    transition:background .2s ease,color .2s ease,transform .2s ease;
}

.nm-country-feature-copy {
    position:absolute;
    left:18px;
    right:18px;
    bottom:16px;
}

.nm-country-feature-copy strong {
    display:block;
    font-size:22px;
    line-height:1;
    letter-spacing:-.035em;
    text-shadow:0 2px 14px rgba(0,0,0,.7);
}

.nm-country-feature-copy > span {
    display:flex;
    align-items:center;
    gap:7px;
    margin-top:9px;
    color:#b7bec5;
    font-size:8.5px;
    font-weight:850;
}

.nm-country-feature-copy i {
    width:3px;
    height:3px;
    border-radius:50%;
    background:#d62b3a;
}

@media (hover:hover) and (pointer:fine) {
    .nm-country-feature-card:hover {
        transform:translateY(-3px);
        border-color:rgba(214,43,58,.30);
        box-shadow:0 24px 52px rgba(0,0,0,.24);
    }

    .nm-country-feature-card:hover .nm-country-feature-art {
        transform:scale(1.045);
        filter:saturate(.95) brightness(.78);
    }

    .nm-country-feature-card:hover .nm-country-feature-arrow {
        background:rgba(214,43,58,.16);
        color:#fff;
        transform:translate(2px,-2px);
    }
}


/* Complete directory */
.nm-country-all {
    margin-top:0;
}

.nm-country-visible {
    flex:0 0 auto;
    margin-bottom:3px;
    color:#7d8790;
    font-size:9px;
    font-weight:850;
    letter-spacing:.04em;
}

.nm-country-toolbar-v3 {
    display:flex;
    align-items:center;
    gap:16px;
    margin-bottom:19px;
}

.nm-country-search {
    position:relative;
    flex:0 0 360px;
    max-width:100%;
}

.nm-country-search input {
    width:100%;
    height:43px;
    padding:0 15px 0 41px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:11px;
    outline:none;
    background:rgba(255,255,255,.022);
    color:#eef2f5;
    font:inherit;
    font-size:10px;
    font-weight:750;
    transition:border-color .2s ease,background .2s ease,box-shadow .2s ease;
}

.nm-country-search input::placeholder {
    color:#68727c;
}

.nm-country-search input:focus {
    border-color:rgba(214,43,58,.28);
    background:rgba(255,255,255,.032);
    box-shadow:0 0 0 3px rgba(214,43,58,.05);
}

.nm-country-search-icon {
    position:absolute;
    left:15px;
    top:50%;
    width:12px;
    height:12px;
    transform:translateY(-55%);
    border:1.5px solid #78838d;
    border-radius:50%;
    pointer-events:none;
}

.nm-country-search-icon::after {
    content:"";
    position:absolute;
    right:-4px;
    bottom:-2px;
    width:5px;
    height:1.5px;
    border-radius:2px;
    background:#78838d;
    transform:rotate(45deg);
}

.nm-country-alpha {
    min-width:0;
    flex:1;
    display:flex;
    align-items:center;
    gap:4px;
    overflow-x:auto;
    padding:2px 1px;
    scrollbar-width:none;
}

.nm-country-alpha::-webkit-scrollbar {
    display:none;
}

.nm-country-alpha button {
    flex:0 0 auto;
    min-width:27px;
    height:27px;
    padding:0 7px;
    border:0;
    border-radius:7px;
    background:transparent;
    color:#6f7982;
    font:inherit;
    font-size:8px;
    font-weight:900;
    cursor:pointer;
    transition:background .18s ease,color .18s ease;
}

.nm-country-alpha button:hover {
    color:#dfe3e7;
    background:rgba(255,255,255,.035);
}

.nm-country-alpha button.is-active {
    color:#fff;
    background:rgba(214,43,58,.14);
    box-shadow:inset 0 0 0 1px rgba(214,43,58,.20);
}


/* Compact country cards */
.nm-country-grid-v3 {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
}

.nm-country-card-v3 {
    position:relative;
    min-width:0;
    min-height:82px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:13px 38px 13px 13px;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.065);
    border-radius:11px;
    background:
        linear-gradient(145deg,rgba(255,255,255,.024),rgba(255,255,255,.008));
    color:#fff;
    text-decoration:none;
    transition:transform .2s ease,border-color .2s ease,background .2s ease;
}

.nm-country-card-v3::before {
    content:"";
    position:absolute;
    left:0;
    top:0;
    width:32px;
    height:2px;
    background:linear-gradient(90deg,#c52b39,transparent);
}

.nm-country-card-badge {
    flex:0 0 auto;
    min-width:35px;
    height:35px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 7px;
    border:1px solid rgba(255,255,255,.07);
    border-radius:9px;
    background:rgba(255,255,255,.025);
    color:#dfe4e8;
    font-size:13px;
    line-height:1;
    font-weight:900;
}

.nm-country-card-copy {
    min-width:0;
    display:block;
}

.nm-country-card-copy strong {
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:13px;
    line-height:1.15;
    letter-spacing:-.018em;
}

.nm-country-card-copy > span {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:5px;
    margin-top:6px;
    color:#727d86;
    font-size:7.5px;
    font-weight:800;
}

.nm-country-card-copy b {
    color:#aeb6bd;
    font-weight:900;
}

.nm-country-card-copy i {
    width:2px;
    height:2px;
    border-radius:50%;
    background:#ae3440;
}

.nm-country-card-arrow {
    position:absolute;
    right:13px;
    top:50%;
    transform:translateY(-50%);
    color:#743740;
    font-size:12px;
    font-weight:900;
    transition:color .2s ease,transform .2s ease;
}

.nm-country-no-results {
    margin-top:10px;
}

@media (hover:hover) and (pointer:fine) {
    .nm-country-card-v3:hover {
        transform:translateY(-1px);
        border-color:rgba(214,43,58,.23);
        background:rgba(255,255,255,.029);
    }

    .nm-country-card-v3:hover .nm-country-card-arrow {
        color:#df5662;
        transform:translate(2px,-50%);
    }
}


@media (max-width:1100px) {
    .nm-country-feature-grid {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .nm-country-grid-v3 {
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}

@media (max-width:820px) {
    .nm-country-section-heading,
    .nm-country-all-heading {
        align-items:flex-start;
        flex-direction:column;
        gap:10px;
    }

    .nm-country-section-heading > p {
        max-width:520px;
        text-align:left;
    }

    .nm-country-toolbar-v3 {
        align-items:stretch;
        flex-direction:column;
        gap:11px;
    }

    .nm-country-search {
        flex:0 0 auto;
        width:100%;
    }

    .nm-country-grid-v3 {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media (max-width:560px) {
    .nm-country-featured {
        margin-bottom:44px;
    }

    .nm-country-feature-grid {
        display:flex;
        gap:10px;
        overflow-x:auto;
        margin-right:-16px;
        padding-right:16px;
        padding-bottom:4px;
        scroll-snap-type:x proximity;
        scrollbar-width:none;
    }

    .nm-country-feature-grid::-webkit-scrollbar {
        display:none;
    }

    .nm-country-feature-card {
        flex:0 0 82%;
        min-height:190px;
        scroll-snap-align:start;
    }

    .nm-country-feature-copy strong {
        font-size:20px;
    }

    .nm-country-grid-v3 {
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:7px;
    }

    .nm-country-card-v3 {
        min-height:76px;
        gap:9px;
        padding:11px 29px 11px 10px;
    }

    .nm-country-card-badge {
        min-width:31px;
        height:31px;
        padding:0 5px;
        font-size:11px;
    }

    .nm-country-card-copy strong {
        font-size:12px;
    }

    .nm-country-card-copy > span {
        gap:4px;
        font-size:6.9px;
    }

    .nm-country-card-arrow {
        right:9px;
        font-size:10px;
    }
}

@media (max-width:360px) {
    .nm-country-grid-v3 {
        grid-template-columns:1fr;
    }

    .nm-country-feature-card {
        flex-basis:88%;
    }
}

/* Fix red outlines on portrait movie cards */
body .nm-card.nm-card--portrait {
    outline: none !important;
}

/* Keep keyboard focus visible in blue */
body .nm-card.nm-card--portrait:focus-visible {
    outline: 2px solid #69bfff !important;
    outline-offset: 2px;
}


/* =========================================================
   2026-10-15 — CATALOG FAMILY GRID SAFETY
   Genre / country / release-year / actor result pages only.
   Keeps portrait result cards in a stable responsive grid.
   ========================================================= */
body.nm-family-page .nm-family-content .nm-related-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    column-gap: 14px !important;
    row-gap: 16px !important;
    align-items: start;
}

body.nm-family-page .nm-family-content .nm-related-card,
body.nm-family-page .nm-family-content .nm-card.nm-card--portrait {
    min-width: 0 !important;
    min-height: 0 !important;
    aspect-ratio: 2 / 3 !important;
    overflow: hidden !important;
    border-radius: 10px !important;
}

body.nm-family-page .nm-family-content .nm-related-card .nm-card__image,
body.nm-family-page .nm-family-content .nm-card.nm-card--portrait .nm-card__image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

@media (max-width: 1100px) {
    body.nm-family-page .nm-family-content .nm-related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    body.nm-family-page .nm-family-content .nm-related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        column-gap: 10px !important;
        row-gap: 12px !important;
    }
}

@media (max-width: 520px) {
    body.nm-family-page .nm-family-content .nm-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

