/**
 * ==========================================================================
 * News List Builder Element Stylesheet - K-Tech (A-Elements)
 * ==========================================================================
 */

.ktech-news-list-wrap {
    width: 100%;
    box-sizing: border-box;
}

/* 1. Grid Container */
.ktech-news-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}

.ktech-news-grid.cols-1 {
    grid-template-columns: 1fr;
}

.ktech-news-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ktech-news-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ktech-news-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.ktech-news-grid.cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.ktech-news-grid.cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* 2. Card Item */
.ktech-news-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.ktech-news-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: #d1d5db;
}

/* 3. Card Thumbnail */
.ktech-news-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f3f4f6;
}

.ktech-news-thumb-link {
    display: block;
    width: 100%;
    height: 100%;
}

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

.ktech-news-card:hover .ktech-news-thumb-img {
    transform: scale(1.05);
}

.ktech-news-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: #94a3b8;
}

/* 4. Card Body */
.ktech-news-body {
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ktech-news-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px;
    color: var(--ktech-news-accent, #b31b34);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
}

.ktech-news-title a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.ktech-news-title a:hover {
    opacity: 0.85;
}

.ktech-news-excerpt {
    font-size: 13.5px;
    line-height: 1.5;
    color: #4b5563;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 60px;
    flex: 1;
}

.ktech-news-readmore-wrap {
    margin-top: auto;
}

.ktech-news-readmore {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: var(--ktech-news-accent, #b31b34);
    text-decoration: none;
    transition: all 0.2s ease;
}

.ktech-news-readmore:hover {
    opacity: 0.8;
    transform: translateX(2px);
}

/* 5. Card Footer (Date) */
.ktech-news-footer {
    padding: 10px 16px;
    border-top: 1px solid #f1f3f5;
    background-color: #ffffff;
}

.ktech-news-date {
    font-size: 12.5px;
    color: #8c96a4;
    display: inline-block;
}

/* 6. Section View All Link (Bottom Right) */
.ktech-news-view-all-wrap {
    width: 100%;
    text-align: right;
    margin-top: 18px;
}

.ktech-news-view-all {
    display: inline-block;
    font-size: 15px;
    font-weight: 600;
    font-style: italic;
    color: var(--ktech-news-accent, #b31b34);
    text-decoration: none;
    transition: all 0.2s ease;
}

.ktech-news-view-all:hover {
    opacity: 0.85;
    text-decoration: underline;
}

/* 7. Responsive Breakpoints */
@media (max-width: 1024px) {

    .ktech-news-grid.cols-4,
    .ktech-news-grid.cols-5,
    .ktech-news-grid.cols-6 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .ktech-news-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .ktech-news-title {
        min-height: auto;
    }

    .ktech-news-excerpt {
        min-height: auto;
    }
}