/* ==========================================================
   News & Insight Category Page — Tekcom
   ========================================================== */

/* ── Breadcrumb ───────────────────────────────────────────── */
.ni-breadcrumb {
    position: absolute;
    top: 28px;
    left: 0;
    right: 0;
    z-index: 3;
}

.ni-breadcrumb__container {
    max-width: 1680px;
    width: 90%;
    margin: 0 auto;
}

.ni-breadcrumb__list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ni-breadcrumb__item {
    display: flex;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 400;
    color: #ffffff !important;
}

.ni-breadcrumb__item a {
    color: #ffffff !important;
    font-size: 1.125rem;
}

.ni-breadcrumb__item+.ni-breadcrumb__item::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 6px;
    vertical-align: middle;
    opacity: 0.45;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M4 2l4 4-4 4' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.ni-breadcrumb__link {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
}

.ni-breadcrumb__link:hover {
    color: #ffffff;
}

.ni-breadcrumb__item--current {
    color: #E8AE37 !important;
    font-weight: 400;
}

/* ── Hero ─────────────────────────────────────────────────── */
.ni-hero {
    position: relative;
    width: 100%;
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a2d42;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.ni-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgb(0 0 0) 0%, rgb(10 20 35 / 26%) 100%);
    z-index: 1;
    opacity: 0.7;
}

.ni-hero__inner {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 760px;
    padding: 60px 48px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ni-hero__title {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3.125rem) !important;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
}

.ni-hero__desc {
    margin: 0;
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
}

/* ── Shared section title ─────────────────────────────────── */
.ni-section-title {
    position: relative;
    margin: 0;
    font-size: clamp(2.5rem, 2.5vw, 3.125rem) !important;
    font-weight: 700;
    color: #254B78;
    line-height: 1.2;
}

.ni-section-title::before {
    content: '';
    position: absolute;
    top: -24px;
    left: -40px;
    width: 72px;
    height: 76px;
    background: #3C95FF;
    opacity: 0.15;
    z-index: 0;
}

/* ── Shared tag pill ──────────────────────────────────────── */
.ni-tag {
    display: inline-block;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: none;
    color: #AD7500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* vertical divider between tag and date */
.ni-card__meta .ni-tag+.ni-date,
.ni-featured__main-meta .ni-tag+.ni-date,
.ni-featured__item-meta .ni-tag+.ni-date {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ni-card__meta .ni-tag+.ni-date::before,
.ni-featured__main-meta .ni-tag+.ni-date::before,
.ni-featured__item-meta .ni-tag+.ni-date::before {
    content: '';
    display: inline-block;
    width: 2px;
    height: 14px;
    background: currentColor;
    opacity: 0.35;
    flex-shrink: 0;
}

/* ── Shared date ──────────────────────────────────────────── */
.ni-date {
    font-size: 0.88rem !important;
    color: #A28356;
    font-weight: 600;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   FEATURED ARTICLES
══════════════════════════════════════════════════════════ */
.ni-featured {
    padding: 80px 0 60px;
}

.ni-featured__container {
    max-width: 1680px;
    width: 94%;
    margin: 0 auto;
    padding: 0;
}

.ni-featured__layout {
    display: flex;
    gap: 40px;
    margin-top: 48px;
    align-items: stretch;
}

/* ── Left: large card ─────────────────────────────────────── */
.ni-featured__main {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.ni-featured__main:hover {
    opacity: 0.88;
}

.ni-featured__main-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 500px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #e2e8f0;
}

.ni-featured__main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.ni-featured__main:hover .ni-featured__main-img img {
    transform: scale(1.04);
}

.ni-featured__main-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ni-featured__main-meta .ni-date {
    color: hwb(0 0% 100% / 0.5);
    font-size: 1.125rem !important;
    text-transform: uppercase;
    font-weight: 600;
}

.ni-featured__main-title {
    margin: 0 0 12px;
    font-size: clamp(1.1rem, 1.6vw, 1.375rem) !important;
    font-weight: 700;
    color: #193250;
    line-height: 1.35;
}

.ni-featured__main-excerpt {
    margin: 0 0 16px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ni-featured__arrow {
    color: #c9a84c;
    display: inline-flex;
    transform: rotate(-45deg);
}

/* ── Right: side list ─────────────────────────────────────── */
.ni-featured__side {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #e2e8f0;
}

.ni-featured__item {
    display: flex;
    gap: 45px;
    align-items: flex-start;
    padding: 24px 0;
    border-bottom: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.ni-featured__item:hover .ni-featured__item-title {
    color: #3C95FF;
}

.ni-featured__item-meta {
    flex-shrink: 0;
    padding-top: 2px;
}

.ni-featured__item-body {
    flex: 1 1 0;
    min-width: 0;
}

.ni-featured__item-title {
    margin: 0 0 8px;
    font-size: 1.375rem !important;
    font-weight: 700;
    color: #193250;
    line-height: 1.4;
    transition: color 0.2s;
}

.ni-featured__item-excerpt {
    margin: 0;
    font-size: 1rem;
    color: #545557;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ni-featured__item-arrow {
    flex-shrink: 0;
    margin-top: 2px;
    color: #c9a84c;
    display: inline-flex;
    transform: rotate(-45deg);
    transition: transform 0.2s;
}

.ni-featured__item:hover .ni-featured__item-arrow {
    transform: rotate(-45deg) translate(2px, -2px);
}

/* ══════════════════════════════════════════════════════════
   NEWS GRID SECTION
══════════════════════════════════════════════════════════ */
.ni-grid-section {
    padding: 60px 0 80px;
    background: #ffffff;
}

.ni-grid-section__container {
    max-width: 1680px;
    width: 90%;
    margin: 0 auto;
    padding: 0;
}

/* ── Section header ───────────────────────────────────────── */
.ni-grid-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.ni-grid-section__controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Filter dropdowns ─────────────────────────────────────── */
.ni-filter {
    position: relative;
}

.ni-filter__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 100px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s, background 0.2s;
    line-height: 1;
}

.ni-filter__btn span {
    color: #3C95FF;
    font-weight: 700;
}

.ni-filter__btn:hover,
.ni-filter__btn--active {
    border-color: #3C95FF;
    background: #eff6ff;
}

.ni-filter__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 100;
    overflow: hidden;
    padding: 6px 0;
}

.ni-filter.is-open .ni-filter__dropdown {
    display: block;
}

.ni-filter__option {
    display: block;
    width: 100%;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #334155;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    white-space: nowrap;
}

.ni-filter__option:hover {
    background: #f8fafc;
}

.ni-filter__option.is-active {
    color: #3C95FF;
    font-weight: 600;
    background: #eff6ff;
}

/* ── Grid ─────────────────────────────────────────────────── */
.ni-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 28px;
}

.ni-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    color: #94a3b8;
    padding: 40px 0;
}

/* ── Post card ────────────────────────────────────────────── */
.ni-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    background-color: #F9FAFB;
}

.ni-card__img {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e2e8f0;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.ni-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.ni-card:hover .ni-card__img img {
    transform: scale(1.05);
}

.ni-card__body {
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex: 1;
}

.ni-card__body .ni-date {
    color: hwb(0 0% 100% / 0.5);
    font-size: 1.125rem !important;
    text-transform: uppercase;
    font-weight: 600;
}

.ni-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ni-card__title {
    margin: 0 0 10px;
    font-size: 1.375rem !important;
    font-weight: 700;
    color: #254B78;
    line-height: 1.4;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ni-card:hover .ni-card__title {
    color: #1d4ed8;
}

.ni-card__excerpt {
    margin: 0;
    font-size: 1.125rem;
    color: #545557;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── SEE MORE button ──────────────────────────────────────── */
.ni-see-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 56px;
}

.ni-see-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 52px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1e293b;
    background: transparent;
    border: 1px solid #1e293b;
    border-radius: 100px;
    cursor: pointer;
    transition: background 0.25s, color 0.25s;
}

.ni-see-more-btn:hover {
    background: #1e293b;
    color: #ffffff;
}

.ni-see-more-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ── Loading skeleton card ────────────────────────────────── */
.ni-card--skeleton .ni-card__img,
.ni-card--skeleton .ni-card__title,
.ni-card--skeleton .ni-card__excerpt,
.ni-card--skeleton .ni-card__meta {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: ni-shimmer 1.4s infinite;
    border-radius: 4px;
}

.ni-card--skeleton .ni-card__title {
    height: 18px;
    width: 80%;
    margin-bottom: 8px;
}

.ni-card--skeleton .ni-card__meta {
    height: 14px;
    width: 50%;
}

.ni-card--skeleton .ni-card__excerpt {
    height: 56px;
    margin-top: 4px;
}

@keyframes ni-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .ni-featured__layout {
        gap: 28px;
    }

    .ni-featured__main {
        flex: 0 0 40%;
    }

    .ni-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .ni-hero {
        min-height: 320px;
    }

    .ni-featured {
        padding: 48px 0 40px;
    }

    .ni-featured__layout {
        flex-direction: column;
        gap: 32px;
    }

    .ni-featured__main {
        flex: none;
    }

    .ni-featured__main-img {
        aspect-ratio: 16 / 9;
    }

    .ni-section-title::before {
        display: none;
    }

    .ni-grid-section__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .ni-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .ni-see-more-btn {
        padding: 13px 40px;
    }
}