* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #e3f2fd; /* Đổi từ #f8fbff sang xanh nhẹ hơn */
}

/* ========== BRAND SLIDER ========== */

.brand-slider-wrapper {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    flex-grow: 1;
    scrollbar-width: none;
}

.brand-slider-wrapper::-webkit-scrollbar {
    display: none;
}

.brand-slider-wrapper img {
    mix-blend-mode: multiply;
}

.brand-slider-wrapper a img:hover {
    transform: scale(1.2);
}

.brand-slider-wrapper a[title]:hover img {
    transform: scale(1.3);
}

/* ========== NEWS SECTION ========== */

.news-section {
    padding: 30px;
    background-color: #e3f2fd;
    text-align: center
}


.news-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #1c3d5a;
}

.news-carousel {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.news-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 10px;
    justify-items: center;
    align-items: center;
}

.news-card {
    width: 100%;
    height: 320px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

.news-card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    mix-blend-mode: multiply;
    padding: 10px;
}

.news-card h3 {
    font-size: 18px;
    color: #1c3d5a;
    margin: 10px;
    text-align: center;
    min-height: 80px;
    /*line-height: 1.3;*/
    /*display: flex;*/
    align-items: center;
    justify-content: center;
    text-align: center;

    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 50px; /* hoặc 2 * line-height */
}

/*.news-card p {
    margin: 0 10px 10px;
    font-size: 14px;
    color: #3d5a80;
}*/

.news-card p {
    margin-bottom: 25px; /* ĐẨY phần tử xuống cuối */
    font-size: 14px;
    color: #ef5350;
    font-weight: bold; /* Thêm in đậm */
}

/* ========== PAGINATION ========== */

.news-pagination {
    margin-top: 20px;
}

.news-page-btn {
    padding: 8px 16px;
    margin: 0 5px;
    background-color: #d0ebff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: #1c3d5a;
    transition: all 0.3s ease;
}

.news-page-btn:hover {
    background-color: #74c0fc;
    color: #ffffff;
}

.news-page-btn.active {
    background-color: #1c3d5a;
    color: white;
}

/* ========== SLIDER BUTTONS ========== */

.prev-btn, .next-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background-color: #ffffff;
    border: none;
    font-size: 24px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    color: #1c3d5a;
    transition: background-color 0.3s;
}

.prev-btn:hover, .next-btn:hover {
    background-color: #d0ebff;
}

/* ========== BANNER SLIDER ========== */

.banner-slider {
    position: relative;
    overflow: hidden;
    width: 1200px;
    height: 300px;
    margin: 30px auto;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.banner-track {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.banner-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.banner-btn {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent; /* nhạt vừa phải */
    color: transparent;
    border: none;
    font-size: 28px;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: background 0.3s;
}

/*.banner-btn:hover {
    background-color: rgba(28, 61, 90, 0.9);
}*/

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/*=========== NEW =============*/

.model-intro {
    width: 80%;
    margin: 40px auto;
    text-align: center;
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.model-intro h3 {
    font-size: 24px;
    color: #2e7d32;
    margin-bottom: 15px;
    font-weight: bold;
}

.model-intro p {
    font-size: 16px;
    color: #444;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

.model-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-items: center;
    margin-top: 30px;
}

.model-gallery img {
    width: 100%;
    max-width: 450px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.model-gallery img:hover {
    transform: scale(1.03);
}

#chat-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    height: 400px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 9999;
}
#chat-log {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-family: sans-serif;
    font-size: 14px;
}
#chat-input {
    display: flex;
    border-top: 1px solid #ddd;
}
#chat-input input {
    flex: 1;
    padding: 10px;
    border: none;
}
#chat-input button {
    padding: 10px;
    border: none;
    background: #007bff;
    color: white;
    cursor: pointer;
}
.user {
    text-align: right;
    color: blue;
    margin-bottom: 5px;
}
.bot {
    text-align: left;
    color: green;
    margin-bottom: 5px;
}
/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
    .news-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-card h3 {
        font-size: 16px;
    }

    .news-card p {
        font-size: 13px;
    }

    .prev-btn, .next-btn {
        font-size: 20px;
        padding: 6px 10px;
    }
}

@media (max-width: 600px) {
    .news-items {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .news-title {
        font-size: 22px;
    }

    .news-card h3 {
        font-size: 16px;
    }

    .news-card p {
        font-size: 12px;
    }

    .news-card {
        aspect-ratio: 1 / 1;
    }

    .prev-btn, .next-btn {
        display: none;
    }

    .news-pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .news-page-btn {
        margin: 5px 3px;
        padding: 6px 12px;
    }
}
