.ns-slider,
.ns-slider * {
    font-family: "Roboto", sans-serif !important;
}

.ns-slider {
    position: relative;
    width: 100%;
}

.ns-card {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 0;
    --ns-pad-x: 20px;
    --ns-pad-top: 20px;
    --ns-pad-bottom: 20px;
}

.ns-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.ns-card-link {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: block;
}

.ns-image-wrapper > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.ns-card:hover .ns-image-wrapper > img {
    transform: scale(1.04);
}

.ns-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.82) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0) 100%
    );
    pointer-events: none;
}

.ns-meta-top {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.ns-category-badge {
    position: absolute;
    top: var(--ns-pad-top);
    left: var(--ns-pad-x);
    z-index: 2;
    display: inline-block;
    background: #000;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    padding: 10px 10px;
    pointer-events: auto;
}

.ns-content {
    position: absolute;
    left: var(--ns-pad-x);
    right: var(--ns-pad-x);
    bottom: var(--ns-pad-bottom);
    z-index: 2;
    color: #fff;
}

.ns-title {
    margin: 0 0 6px;
    font-weight: 900 !important;
    line-height: 1;
    max-width: 100%;
}

.ns-title a {
    color: #fff;
    font-weight: 800 !important;
    text-decoration: none;
}

.ns-date {
    display: block;
    font-size: 13px;
    line-height: 1;
    font-weight: 500;
    color: #ff3040;
    margin-bottom: 10px;
}

.ns-excerpt {
    line-height: 1.35;
    color: #fff;
    max-width: 100%;
    margin-bottom: 20px;
}

.ns-author-box {
    position: absolute;
    top: var(--ns-pad-top);
    right: var(--ns-pad-x);
    left: auto;
    z-index: 2;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    background: #d62828;
    padding: 10px 10px;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    line-height: 1.15;
    text-align: center;
    gap: 6px;
    overflow: visible;
    pointer-events: auto;
}

.ns-author-avatar-wrap {
    display: block;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    line-height: 0;
}

.ns-author-box img,
.ns-author-box .ns-author-avatar,
.ns-author-box .avatar {
    display: block !important;
    position: static !important;
    inset: auto !important;
    flex: 0 0 auto;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px;
    max-width: 44px;
    max-height: 44px;
    border-radius: 50% !important;
    margin: 0 !important;
    float: none !important;
    object-fit: cover !important;
}

.ns-author-name {
    display: block;
    width: 100%;
    max-width: 100%;
    font-size: 11px;
    line-height: 1.15;
    font-weight: 700;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: manual;
}

.ns-pagination.swiper-pagination {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    text-align: center;
}

.ns-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0.9;
}

.ns-pagination .swiper-pagination-bullet-active {
    background: red;
    opacity: 1;
}

.ns-aspect-16-9 {
    aspect-ratio: 16 / 9;
    height: auto;
}

.ns-aspect-4-3 {
    aspect-ratio: 4 / 3;
    height: auto;
}

.ns-aspect-1-1 {
    aspect-ratio: 1 / 1;
    height: auto;
}

.ns-aspect-16-9 .ns-image-wrapper,
.ns-aspect-4-3 .ns-image-wrapper,
.ns-aspect-1-1 .ns-image-wrapper {
    height: 100%;
}

.ns-slider .swiper-slide {
    height: auto;
}

@media (max-width: 1024px) {
    .ns-card {
        height: 420px;
    }
}

@media (max-width: 768px) {
    .ns-card {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 280px;
    }

    .ns-slider--author .ns-card {
        min-height: 300px;
    }

    .ns-slider--excerpt .ns-card {
        min-height: 360px;
    }

    .ns-slider--excerpt.ns-slider--author .ns-card {
        min-height: 380px;
    }

    .ns-image-wrapper {
        position: relative;
        flex: 1 1 auto;
        width: 100%;
        min-height: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    .ns-image-wrapper > img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 0;
    }

    .ns-overlay {
        position: absolute;
        inset: 0;
        z-index: 1;
    }

    .ns-content {
        position: absolute;
        padding-top: 0;
        margin-top: 0;
    }

    .ns-title {
        font-size: clamp(24px, 7vw, 32px) !important;
        font-weight: 900 !important;
        line-height: 1.15;
        max-width: 100%;
        margin-bottom: 6px;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
        overflow: hidden;
    }

    .ns-date {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .ns-excerpt {
        font-size: 12px !important;
        line-height: 1.4;
        max-width: 100%;
        margin-bottom: 14px;
        opacity: 0.92;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }

    .ns-pagination.swiper-pagination {
        bottom: 6px;
    }
}

@media (max-width: 480px) {
    .ns-slider--excerpt .ns-card {
        min-height: 340px;
    }

    .ns-slider--excerpt.ns-slider--author .ns-card {
        min-height: 360px;
    }
}
