﻿.slider-wrapper {
    position: relative;
}

.home-slider .item {
    position: relative;
}

    .home-slider .item img {
        width: 100%;
        height: auto;
        display: block;
    }

.slider-caption-content {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    z-index: 2;
    color: var(--white, #fff);
}

.slide-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--white, #fff);
}

.slide-desc {
    font-size: 16px;
    margin-bottom: 20px;
}

.slide-btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--primary, #ff3500);
    color: var(--white, #fff);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

    .slide-btn:hover {
        background-color: var(--orange, #dd4801);
        color: var(--white, #fff);
    }
.home-slider .owl-nav {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    pointer-events: none; /* Giúp không bị vướng sự kiện click vào vùng trống giữa 2 nút */
    z-index: 10;
    margin: 0;
}

    /* Tùy chỉnh từng nút bấm riêng lẻ */
    .home-slider .owl-nav button.owl-prev,
    .home-slider .owl-nav button.owl-next {
        position: absolute;
        pointer-events: auto; /* Cho phép click vào nút */
        width: 45px;
        height: 45px;
        background: rgba(0, 0, 0, 0.5) !important; /* Màu nền mờ cho dễ nhìn, có thể đổi thành var(--primary) */
        color: var(--white, #fff) !important;
        font-size: 20px !important;
        border-radius: 50%; /* Tạo hình tròn (hoặc bỏ nếu muốn nút vuông) */
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        outline: none;
        margin: 0 !important;
    }

    /* Đẩy nút Prev sát lề trái */
    .home-slider .owl-nav button.owl-prev {
        left: 15px;
    }

    /* Đẩy nút Next sát lề phải */
    .home-slider .owl-nav button.owl-next {
        right: 15px;
    }

        /* Hiệu ứng khi rê chuột (hover) vào nút */
        .home-slider .owl-nav button.owl-prev:hover,
        .home-slider .owl-nav button.owl-next:hover {
            background: var(--primary, #ff3500) !important;
            color: var(--white, #fff) !important;
        }
/* ===== Lưới tin tức: 1 bài lớn + 3 bài nhỏ (post.grid_big_small) ===== */
.pgbs {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.pgbs-big {
    flex: 0 0 calc(50% - 10px);
    min-width: 0;
}

.pgbs-list {
    flex: 1 1 0;
    min-width: 0;
}

/* khung ảnh: giữ đúng tỉ lệ, ảnh luôn phủ kín */
.pgbs-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    background: #eceff1;
}

    .pgbs-thumb img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .35s ease;
    }

    .pgbs-thumb:hover img {
        transform: scale(1.04);
    }

.pgbs-big .pgbs-thumb {
    aspect-ratio: 5 / 3;
}

.pgbs-item .pgbs-thumb {
    aspect-ratio: 16 / 10;
    flex: 0 0 48%;
}

/* bài nhỏ: ảnh trái, chữ phải */
.pgbs-item {
    display: flex;
    gap: 15px;
    margin-bottom: 8px;
}

    .pgbs-item:last-child {
        margin-bottom: 0;
    }

    .pgbs-item .pgbs-desc {
        flex: 1 1 0;
        min-width: 0;
    }

/* chữ */
.pgbs-desc {
    padding-top: 8px;
}

.pgbs-item .pgbs-desc {
    padding-top: 0;
}

.pgbs-cat {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 15px;
    color: #e8401c;
    text-decoration: none;
}

    .pgbs-cat .fa {
        margin-right: 2px;
    }

    .pgbs-cat:hover {
        text-decoration: underline;
    }

.pgbs-title {
    margin: 0 0 10px;
    font-weight: 600;
    line-height: 1.45;
}

    .pgbs-title a {
        color: #222;
        text-decoration: none;
    }

        .pgbs-title a:hover {
            color: #e8401c;
        }

.pgbs-big .pgbs-title {
    font-size: 26px;
}

.pgbs-item .pgbs-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.pgbs-excerpt {
    margin: 0;
    color: #555;
    line-height: 1.65;
}

.pgbs-big .pgbs-excerpt {
    font-size: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pgbs-item .pgbs-excerpt {
    font-size: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* tablet: bài nhỏ xếp ảnh trên - chữ dưới cho đỡ chật */
@media (max-width: 991px) {
    .pgbs-big .pgbs-title {
        font-size: 22px;
    }

    .pgbs-item {
        flex-direction: column;
        gap: 8px;
    }

        .pgbs-item .pgbs-thumb {
            flex: none;
            width: 100%;
        }
}

/* mobile: 1 cột; bài nhỏ trở lại ảnh trái - chữ phải */
@media (max-width: 767px) {
    .pgbs {
        flex-direction: column;
        gap: 18px;
    }

    .pgbs-big, .pgbs-list {
        flex: none;
        width: 100%;
    }

    .pgbs-item {
        flex-direction: row;
        gap: 12px;
        margin-bottom: 14px;
    }

        .pgbs-item .pgbs-thumb {
            flex: 0 0 40%;
        }

        .pgbs-item .pgbs-title {
            font-size: 16px;
        }

        .pgbs-item .pgbs-excerpt {
            display: none;
        }
}