/*
 * Blog News Section Styles for carbide-products.com
 */

.yinx_news_bg {
    background: #f8f9fa;
    padding: 10px 0 40px;
    position: relative;
}

.yinx_news_bg .wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

.yinx_news_bg .ttl {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 50px;
    color: #1f2328;
    font-weight: bold;
}

.news-featured {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.news-featured-item {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-featured-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.news-featured-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-featured-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #e9ecef;
}

.news-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-featured-item:hover .news-featured-image img {
    transform: scale(1.05);
}

.news-featured-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-featured-date {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 12px;
}

.news-featured-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2328;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-featured-excerpt {
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-category-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.news-category-tab {
    padding: 10px 25px;
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    color: #495057;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-category-tab:hover,
.news-category-tab.active {
    background: #09013D;
    border-color: #09013D;
    color: #ffffff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.news-grid-item {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.news-grid-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-grid-content {
    padding: 20px;
}

.news-grid-date {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.news-grid-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2328;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3em;
}

.news-more-btn {
    text-align: center;
    margin-top: 20px;
}

.news-more-btn .common_btn {
    display: inline-block;
    padding: 15px 50px;
    background: #09013D;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.news-more-btn .common_btn:hover {
    background: #f2a016;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 160, 22, 0.3);
}

@media screen and (max-width: 1199px) {
    .yinx_news_bg {
        padding: 50px 0 60px;
    }

    .yinx_news_bg .ttl {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .news-featured {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        margin-bottom: 40px;
    }

    .news-featured-image {
        height: 200px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Responsive Design - Mobile */
@media screen and (max-width: 767px) {
    .yinx_news_bg {
        padding: 40px 0 50px;
    }

    .yinx_news_bg .wrapper {
        padding: 0 10px;
    }

    .yinx_news_bg .ttl {
        font-size: 1.75rem;
        margin-bottom: 30px;
    }

    /* Featured section - stack vertically */
    .news-featured {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 35px;
    }

    .news-featured-image {
        height: 220px;
    }

    .news-featured-content {
        padding: 20px;
    }

    .news-featured-title {
        font-size: 1.15rem;
    }

    /* Category tabs - smaller on mobile */
    .news-category-tabs {
        gap: 10px;
        margin-bottom: 30px;
    }

    .news-category-tab {
        padding: 8px 18px;
        font-size: 0.9rem;
    }

    /* Grid - single column on mobile */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 30px;
    }

    .news-grid-content {
        padding: 15px;
    }

    .news-grid-title {
        font-size: 1rem;
    }

    /* More button */
    .news-more-btn .common_btn {
        padding: 12px 40px;
        font-size: 1rem;
    }
}

/*  Small Mobile Devices   */
@media screen and (max-width: 480px) {
    .yinx_news_bg .ttl {
        font-size: 1.5rem;
    }

    .news-featured-image {
        height: 180px;
    }

    .news-featured-content {
        padding: 15px;
    }

    .news-featured-title {
        font-size: 1.05rem;
    }

    .news-featured-excerpt {
        font-size: 0.9rem;
    }

    .news-category-tab {
        padding: 7px 15px;
        font-size: 0.85rem;
    }
}