﻿/* =========================================================
   HONGHA UI2026
   MODULE: TECHNOLOGY NEWS SLIDER
   ---------------------------------------------------------
   Desktop : 4 visible
   Tablet  : 2 visible
   Mobile  : 1 visible
   Move    : 1 item
   Auto    : 5 seconds
   ========================================================= */


/* =========================================================
   SECTION
   ========================================================= */

.hh-tech-news {

    position: relative;

    width: 100%;

    margin: 28px 0 34px;

    box-sizing: border-box;

}


/* =========================================================
   HEADER
   ========================================================= */

.hh-tech-news-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    width: 100%;

    margin-bottom: 16px;

    box-sizing: border-box;

}


.hh-tech-news-header h2 {

    margin: 0;

    padding: 0;

    font-size: 22px;

    line-height: 1.3;

    font-weight: 700;

    color: #222;

}


.hh-tech-news-header a {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    margin: 0;

    padding: 4px 0;

    font-size: 14px;

    line-height: 1.4;

    font-weight: 500;

    color: #555;

    text-decoration: none;

    white-space: nowrap;

    transition:
        color .2s ease;

}


.hh-tech-news-header a:hover {

    color: #d70018;

}


.hh-tech-news-header a i {

    font-size: 12px;

}


/* =========================================================
   SLIDER
   ========================================================= */

.hh-tech-news-slider {

    position: relative;

    width: 100%;

    box-sizing: border-box;

}


/* =========================================================
   VIEWPORT
   ========================================================= */

.hh-tech-news-viewport {

    position: relative;

    width: 100%;

    overflow: hidden;

    box-sizing: border-box;

}


/* =========================================================
   TRACK
   ========================================================= */

.hh-tech-news-track {

    display: flex;

    flex-wrap: nowrap;

    align-items: stretch;

    gap: 16px;

    width: 100%;

    margin: 0;

    padding: 0;

    box-sizing: border-box;

    transform: translate3d(0, 0, 0);

    transition:
        transform .45s ease;

    will-change: transform;

}


/*
    AJAX container.

    Không tạo thêm một flex item.
*/
#listtincongngheinhome {
       display: contents;
}

/* =========================================================
   NEWS ITEM
   ========================================================= */

.hh-tech-news-item {

    position: relative;

    flex: 0 0 calc(
        (100% - 48px) / 4
    );

    width: calc(
        (100% - 48px) / 4
    );

    min-width: 0;

    margin: 0;

    padding: 0;

    background: #fff;

    border-radius: 14px;

    overflow: hidden;

    box-sizing: border-box;

    box-shadow:
        0 3px 14px rgba(0,0,0,.06);

    transition:
        transform .25s ease,
        box-shadow .25s ease;

}


/* =========================================================
   HOVER
   ========================================================= */

.hh-tech-news-item:hover {

    transform: translateY(-3px);

    box-shadow:
        0 8px 24px rgba(0,0,0,.10);

}


/* =========================================================
   LINK
   ========================================================= */

.hh-tech-news-link {

    display: block;

    width: 100%;

    height: 100%;

    color: inherit;

    text-decoration: none;

    box-sizing: border-box;

}


/* =========================================================
   IMAGE
   ========================================================= */

.hh-tech-news-image {

    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #f4f4f4;

}


/* =========================================================
   IMAGE
   ========================================================= */

.hh-tech-news-image img {

    display: block;

    width: 100%;

    height: 100%;

    max-width: none;

    object-fit: cover;

    object-position: center;

    border: 0;

    margin: 0;

    padding: 0;

    transition:
        transform .45s ease;

}


.hh-tech-news-item:hover
.hh-tech-news-image img {

    transform: scale(1.04);

}


/* =========================================================
   CONTENT
   ========================================================= */

.hh-tech-news-content {

    display: flex;

    flex-direction: column;

    padding: 12px 14px 14px;

    box-sizing: border-box;

}


/* =========================================================
   CATEGORY
   ========================================================= */

.hh-tech-news-category {

    width: 100%;

    margin: 0 0 6px;

    padding: 0;

    font-size: 12px;

    line-height: 1.4;

    font-weight: 600;

    color: #d70018;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}


/* =========================================================
   TITLE
   ========================================================= */

.hh-tech-news-title {

    width: 100%;

    height: 46px;

    min-height: 46px;

    max-height: 46px;

    margin: 0;

    padding: 0;

    font-size: 16px;

    line-height: 23px;

    font-weight: 600;

    color: #222;

    overflow: hidden;

    display: -webkit-box;

    -webkit-box-orient: vertical;

    -webkit-line-clamp: 2;

    box-sizing: border-box;

}


/* =========================================================
   DATE
   ========================================================= */

.hh-tech-news-date {

    margin-top: 10px;

    padding: 0;

    font-size: 12px;

    line-height: 18px;

    color: #888;

}


/* =========================================================
   PREV / NEXT
   ========================================================= */

.hh-tech-news-prev,
.hh-tech-news-next {

    position: absolute;

    top: 50%;

    z-index: 20;

    display: flex;

    align-items: center;

    justify-content: center;

    width: 40px;

    height: 40px;

    margin: 0;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background: rgba(255,255,255,.96);

    color: #444;

    box-shadow:
        0 3px 12px rgba(0,0,0,.16);

    cursor: pointer;

    transform:
        translateY(-50%);

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease,
        opacity .2s ease;

}


.hh-tech-news-prev {

    left: 10px;

}


.hh-tech-news-next {

    right: 10px;

}


/* =========================================================
   BUTTON HOVER
   ========================================================= */

.hh-tech-news-prev:hover,
.hh-tech-news-next:hover {

    background: #d70018;

    color: #fff;

    transform:
        translateY(-50%)
        scale(1.06);

}


/* =========================================================
   DISABLED
   ========================================================= */

.hh-tech-news-prev.is-disabled,
.hh-tech-news-next.is-disabled {

    opacity: .35;

}


/* =========================================================
   DOTS
   ========================================================= */

.hh-tech-news-dots {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    width: 100%;

    min-height: 8px;

    margin-top: 12px;

    box-sizing: border-box;

}


.hh-tech-news-dot {

    display: block;

    width: 7px;

    height: 7px;

    margin: 0;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background: #ccc;

    cursor: pointer;

    transition:
        width .25s ease,
        background .25s ease;

}


.hh-tech-news-dot.is-active {

    width: 20px;

    border-radius: 10px;

    background: #d70018;

}


/* =========================================================
   NO SLIDER
   ========================================================= */

.hh-tech-news.no-slider
.hh-tech-news-prev,

.hh-tech-news.no-slider
.hh-tech-news-next {

    display: none;

}


.hh-tech-news.no-slider
.hh-tech-news-dots {

    display: none;

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .hh-tech-news-item {

        flex-basis:
            calc((100% - 16px) / 2);

        width:
            calc((100% - 16px) / 2);

    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .hh-tech-news {

        margin-top: 20px;

        margin-bottom: 24px;

    }


    .hh-tech-news-header {

        margin-bottom: 12px;

    }


    .hh-tech-news-header h2 {

        font-size: 19px;

    }


    .hh-tech-news-header a {

        font-size: 13px;

    }


    .hh-tech-news-item {

        flex-basis: 100%;

        width: 100%;

    }


    .hh-tech-news-prev,
    .hh-tech-news-next {

        width: 34px;

        height: 34px;

    }


    .hh-tech-news-prev {

        left: 6px;

    }


    .hh-tech-news-next {

        right: 6px;

    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {

    .hh-tech-news-header h2 {

        font-size: 18px;

    }


    .hh-tech-news-title {

        font-size: 15px;

        line-height: 22px;

        height: 44px;

        min-height: 44px;

        max-height: 44px;

    }

}