﻿/* =====================================================
   NEWS & EVENTS SECTION - TIN TỨC & SỰ KIỆN
   Trang chủ ASHICO - 2 cột: Tin DN + Tin Tuyển dụng
   ===================================================== */

.news-events-section {
    padding: 30px 0 50px;
    background: #f8f9fa;
    position: relative;
}

/* ⭐ SECTION HEADER */
.news-events-section__header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.news-events-section__title {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 32px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 1px;
    color: var(--ashico-red, #ec2028);
}

/* ⭐ NEWS COLUMNS WRAPPER */
.news-events-section__wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    position: relative;
    z-index: 1;
}

@media (max-width: 991px) {
    .news-events-section__wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ⭐ NEWS CARD (Cột trái/phải) */
.news-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.news-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

/* ⭐ NEWS CARD TITLE */
.news-card__title {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
    color: var(--ashico-blue, #034ea2);
}

.news-card__title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--ashico-blue, #034ea2);
}

.news-card:last-child .news-card__title::after {
    background: var(--ashico-red, #ec2028);
}

/* ⭐ SLIDER WRAPPER - CHỨA NÚT VÀ ITEMS */
.news-card__slider-wrapper {
    position: relative;
}

/* ⭐ NÚT ĐIỀU KHIỂN TRÁI/PHẢI - ẨN TRÊN DESKTOP */
.news-card__nav {
    display: none;
}

/* ⭐ NAV WRAPPER - ẨN TRÊN DESKTOP */
.news-card__nav-wrapper {
    display: none;
}

/* ⭐ NEWS ITEMS CONTAINER */
.news-card__items {
    display: block;
}

/* ⭐ NEWS ITEM - Layout ngang */
.news-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s ease;
}

.news-item:last-of-type {
    border-bottom: none;
}

.news-item:hover {
    background: linear-gradient(90deg, #f9fafb, transparent);
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 8px;
}

/* ⭐ NEWS ITEM IMAGE */
.news-item__image {
    flex-shrink: 0;
    width: 100px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-item:hover .news-item__image img {
    transform: scale(1.08);
}

/* ⭐ NEWS ITEM CONTENT */
.news-item__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-item__title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-item__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-item__title a:hover {
    color: var(--ashico-blue, #034ea2);
}

.news-item__excerpt {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 11px;
    color: #777;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

/* ⭐ NEWS ITEM META */
.news-item__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    margin-top: auto;
}

.news-item__date {
    font-weight: 600;
    color: var(--ashico-red, #ec2028);
}

.news-item__author {
    font-weight: 600;
    color: var(--ashico-blue, #034ea2);
}

/* ⭐ VIEW ALL BUTTON */
.news-card__view-all {
    display: block;
    text-align: center;
    margin-top: 20px;
    padding: 12px 25px;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
}

.news-card__view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* ⭐ JOB TAG */
.news-item__job-tag {
    display: inline-block;
    background: var(--ashico-red, #ec2028);
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =====================================================
   ⭐ MOBILE - HIỂN THỊ 2 TIN + NÚT TRÁI/PHẢI
   ===================================================== */

@media (max-width: 767px) {
    .news-events-section {
        padding: 25px 0 20px;
    }
    
    .news-events-section__header {
        margin-bottom: 15px;
    }
    
    .news-events-section__title {
        font-size: 18px;
    }
    
    .news-card {
        padding: 12px;
        border-radius: 10px;
    }
    
    .news-card__title {
        font-size: 13px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    /* ⭐ SLIDER WRAPPER - LAYOUT DỌC */
    .news-card__slider-wrapper {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    /* ⭐ NEWS ITEMS - HIỂN THỊ 2 CỘT GRID */
    .news-card__items {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        order: 1;
    }
    
    /* ⭐ MẶC ĐỊNH ẨN TIN TỪ THỨ 3 - KHÔNG DÙNG !important ĐỂ JS CÓ THỂ OVERRIDE */
    .news-card__items .news-item:nth-child(n+3) {
        display: none;
    }
    
    /* ⭐ NEWS ITEM - CARD DỌC */
    .news-item {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0;
        border-bottom: none;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        overflow: hidden;
    }
    
    .news-item:hover {
        margin: 0;
        padding: 0;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    }
    
    /* ⭐ NEWS ITEM IMAGE */
    .news-item__image {
        width: 100%;
        height: 85px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .news-item__image a {
        display: block;
        width: 100%;
        height: 100%;
    }
    
    /* ⭐ NEWS ITEM CONTENT */
    .news-item__content {
        padding: 8px;
        min-height: 80px;
    }
    
    .news-item__title {
        font-size: 10px;
        line-height: 1.35;
        margin-bottom: 4px;
    }
    
    .news-item__excerpt {
        font-size: 8px;
        line-height: 1.3;
        margin-bottom: 5px;
        color: #888;
    }
    
    .news-item__meta {
        font-size: 7px;
        flex-wrap: wrap;
        gap: 2px;
    }
    
    .news-item__date,
    .news-item__author {
        font-size: 7px;
    }
    
    .news-item__job-tag {
        font-size: 6px;
        padding: 2px 4px;
    }
    
    /* ⭐ WRAPPER CHO 2 NÚT TRÁI/PHẢI - HIỂN THỊ */
    .news-card__nav-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
        order: 2;
        margin-top: 5px;
    }
    
    /* ⭐ NÚT ĐIỀU KHIỂN - HIỂN THỊ */
    .news-card__nav {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        min-width: 36px;
        border-radius: 50%;
        border: none;
        color: #fff;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    }
    
    .news-card__nav:hover {
        transform: scale(1.1);
        box-shadow: 0 5px 18px rgba(0, 0, 0, 0.3);
    }
    
    .news-card__nav:active {
        transform: scale(0.95);
    }
    
    .news-card__nav i {
        font-size: 14px;
        line-height: 1;
    }
    
    /* ⭐ NÚT XEM THÊM */
    .news-card__view-all {
        order: 3;
        margin-top: 10px;
        padding: 10px 18px;
        font-size: 12px;
        border-radius: 20px;
    }
}

/* ⭐ EXTRA SMALL MOBILE (iPhone SE, etc.) */
@media (max-width: 375px) {
    .news-events-section__title {
        font-size: 16px;
    }
    
    .news-card {
        padding: 10px;
    }
    
    .news-card__title {
        font-size: 12px;
    }
    
    .news-card__items {
        gap: 8px;
    }
    
    .news-item__image {
        height: 75px;
    }
    
    .news-item__content {
        padding: 6px;
        min-height: 70px;
    }
    
    .news-item__title {
        font-size: 9px;
    }
    
    .news-item__excerpt {
        font-size: 7px;
    }
    
    .news-card__nav {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    
    .news-card__nav i {
        font-size: 12px;
    }
    
    .news-card__view-all {
        padding: 8px 15px;
        font-size: 11px;
    }
}

/* ⭐ TABLET */
@media (min-width: 768px) and (max-width: 991px) {
    .news-card {
        padding: 22px;
    }
    
    .news-item__image {
        width: 90px;
        height: 62px;
    }
    
    .news-item__title {
        font-size: 13px;
    }
}