/* ============================================================
   NJOFTIME.ORG — UI UPGRADES v1  (sticky header + cards + hero)
   ============================================================ */

/* ── 1. STICKY HEADER ─────────────────────────────────────── */
nav.b-top-menu__background.js-top-menu-user.metro-header,
header.b-top-background__header-mainnav-subnav.metro-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 990 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18) !important;
    background-color: #fff !important;
}
nav.b-top-menu__background.js-top-menu-user.metro-header .search-box {
    border-radius: 24px;
}

/* ── 2. CARD GRID — class .nj-cards added by JS ───────────── */
body.nj-cards .topic-list-container table.topic-list {
    display: block !important;
}
body.nj-cards .topic-list-container table.topic-list tbody {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 18px;
    padding: 16px 4px;
}
body.nj-cards .topic-list-container table.topic-list thead,
body.nj-cards .topic-list-container .topic-list-header {
    display: none !important;
}
body.nj-cards tr.topic-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex !important;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.09);
    border: 1px solid #e8eaed;
    -webkit-transition: box-shadow .22s, -webkit-transform .22s;
    transition: box-shadow .22s, transform .22s;
    height: auto !important;
}
body.nj-cards tr.topic-item:hover {
    box-shadow: 0 8px 22px rgba(0,0,0,.16);
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
}
body.nj-cards tr.topic-item .cell-count,
body.nj-cards tr.topic-item .cell-lastpost,
body.nj-cards tr.topic-item .cell-topic-image,
body.nj-cards tr.topic-item .cell-icons,
body.nj-cards tr.topic-item .cell-inlinemod-item,
body.nj-cards .list-footer-count {
    display: none !important;
}
body.nj-cards tr.topic-item td.cell-topic-thumb {
    display: block !important;
    width: 100% !important;
    min-width: unset !important;
    padding: 0 !important;
    border: none !important;
}
body.nj-cards tr.topic-item td.cell-topic-thumb .topic-thumb-link {
    display: block !important;
    width: 100% !important;
    height: 190px !important;
    border-radius: 0 !important;
    background: #e9edf1;
}
body.nj-cards tr.topic-item td.cell-topic-thumb .topic-thumb-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 0 !important;
}
body.nj-cards tr.topic-item td.cell-topic {
    display: block !important;
    padding: 12px 14px 14px !important;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    background: #fff;
}
body.nj-cards tr.topic-item td.cell-topic .topic-wrapper {
    font-size: 14px !important;
    margin: 0 0 6px 0 !important;
}
body.nj-cards tr.topic-item td.cell-topic .topic-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1a1a2e !important;
    line-height: 1.45 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
body.nj-cards tr.topic-item td.cell-topic .topic-title:hover {
    color: #0066cc !important;
}
body.nj-cards tr.topic-item td.cell-topic .topic-info {
    display: none !important;
}
body.nj-cards .nj-price-badge {
    display: inline-block;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-top: 6px;
    letter-spacing: .3px;
}
body.nj-cards .nj-card-meta {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    display: block;
}
body.nj-cards tr.topic-item:not(.has-thumb) td.cell-topic-thumb {
    display: none !important;
}

@media (max-width: 600px) {
    body.nj-cards .topic-list-container table.topic-list tbody {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 10px 0;
    }
    body.nj-cards tr.topic-item td.cell-topic-thumb .topic-thumb-link {
        height: 220px !important;
    }
}
@media (min-width: 601px) and (max-width: 900px) {
    body.nj-cards .topic-list-container table.topic-list tbody {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── 3. HERO BANNER ────────────────────────────────────────── */
#nj-hero {
    width: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    padding: 36px 20px 32px;
    box-sizing: border-box;
}
#nj-hero h2 {
    text-align: center;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 24px;
    letter-spacing: .4px;
}
#nj-hero h2 span {
    color: #38bdf8;
}
#nj-hero .nj-tiles {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    max-width: 1100px;
    margin: 0 auto;
}
#nj-hero .nj-tile {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    border-radius: 14px;
    padding: 22px 18px 16px;
    min-height: 130px;
    text-decoration: none;
    color: #fff;
    position: relative;
    overflow: hidden;
    -webkit-transition: -webkit-transform .22s, box-shadow .22s;
    transition: transform .22s, box-shadow .22s;
    box-shadow: 0 4px 14px rgba(0,0,0,.28);
}
#nj-hero .nj-tile:hover {
    -webkit-transform: translateY(-4px);
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,.38);
    text-decoration: none;
    color: #fff;
}
#nj-hero .nj-tile-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.3);
    border-radius: 14px;
    z-index: 0;
}
#nj-hero .nj-tile-icon,
#nj-hero .nj-tile-name,
#nj-hero .nj-tile-count {
    position: relative;
    z-index: 1;
}
#nj-hero .nj-tile-icon {
    font-size: 32px;
    margin-bottom: 8px;
    line-height: 1;
}
#nj-hero .nj-tile-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}
#nj-hero .nj-tile-count {
    font-size: 12px;
    opacity: .85;
    margin-top: 3px;
}
.nj-tile-shitje { background: linear-gradient(145deg, #1d4ed8, #3b82f6); }
.nj-tile-qera   { background: linear-gradient(145deg, #0f766e, #14b8a6); }
.nj-tile-pune   { background: linear-gradient(145deg, #b45309, #f59e0b); }
.nj-tile-makina { background: linear-gradient(145deg, #7c3aed, #a78bfa); }
.nj-tile-kerkoj { background: linear-gradient(145deg, #be123c, #f43f5e); }

@media (max-width: 700px) {
    #nj-hero .nj-tiles { grid-template-columns: repeat(2, 1fr); }
    #nj-hero { padding: 24px 14px 20px; }
    #nj-hero h2 { font-size: 17px; margin-bottom: 16px; }
}
@media (max-width: 360px) {
    #nj-hero .nj-tiles { grid-template-columns: 1fr; }
}
