/* === LAYOUT CHUNG & BOXES === */
.p-detail-8 {
    padding: 40px 0;
    background-color: #f7f7f7; /* Nền nhẹ nhàng */
}
.p-detail-8 .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.p-detail-8 .detail-main {
    /* Flexbox cho Main Content và Sidebar */
    display: flex;
    gap: 30px;
}
.p-detail-8 .ht-page__main {
    flex: 2; /* Phần chính rộng hơn */
}
.p-detail-8 .ht-page__sidebar {
    flex: 1; /* Sidebar hẹp hơn */
}
.p_box-shadow {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Đổ bóng nhẹ nhàng */
}

/* === HEADER: DATE & TAG === */
.box-content {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.p_date {
    background-color: var(--tertiary-color);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
}
.p_date .day {
    display: block;
    font-size: 18px;
    line-height: 1;
}
.p_date .month-year {
    display: block;
    font-size: 11px;
}
.p_tag {
    margin-left: 15px;
}
.p_tag a {
    color: var(--tertiary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid var(--tertiary-color);
    padding: 10px;
    border-radius: 16px;
    transition: background-color 0.3s, color 0.3s;
}
.p_tag a:hover {
    background-color: var(--tertiary-color);
    color: #fff;
}

/* === TIÊU ĐỀ & MÔ TẢ TÓM TẮT === */
.p_title {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 15px;
    margin-bottom: 25px;
    line-height: 1.3;
}
.p_desc {
    font-size: 18px;
    color: #333;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* === NỘI DUNG CHÍNH SÁCH === */
.ht-format-detail h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color); /* Màu xanh nổi bật cho tiêu đề điều khoản */
    margin-top: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 15px;
}
.ht-format-detail p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: justify; /* Căn đều cho văn bản chính sách */
}
.ht-format-detail ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}
.ht-format-detail ul li {
    margin-bottom: 8px;
    color: #333;
    line-height: 1.5;
}
blockquote {
    border-left: 4px solid var(--primary-color); /* Màu cam nổi bật */
    padding: 10px 15px;
    color: #555;
    font-style: italic;
    background-color: #fffaf5;
    border-radius: 4px;
    margin: 25px 0;
}
/* CSS cho phần liên quan */
.p_other h2 {
    font-size: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 15px;
}
.p_other ul {
    list-style: none;
    padding: 0;
}
.p_other ul li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}
.p_other ul li a {
    color: #05a;
    text-decoration: none;
    transition: color 0.2s;
}
.p_other ul li a:hover {
    color: var(--tertiary-color);
}

/* === SIDEBAR BOX (Dạng Card) === */
.sidebar-box {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}
.sidebar-box h3 {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #05a;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.sidebar-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-box ul li.sidebar-card-item {
    margin-bottom: 20px;
    border-bottom: none;
}

/* Card Link Container */
.sidebar-box ul li a {
    display: block;
    text-decoration: none;
    color: #333;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s, transform 0.3s;
}

.sidebar-box ul li a:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px); /* Hiệu ứng nhấc nhẹ */
}

/* Hình ảnh (Toàn bộ chiều rộng) */
.sidebar-thumb {
    width: 100%;
    overflow: hidden;
    position: relative;
}
.sidebar-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.sidebar-box ul li a:hover .sidebar-thumb img {
    transform: scale(1.05); /* Zoom ảnh khi hover */
}

/* Nội dung (Tiêu đề + Mô tả) */
.sidebar-content {
    padding: 15px;
}
.sidebar-title {
    font-size: 16px;
    line-height: 1.4;
    font-weight: bold;
    color: #05a;
    margin-bottom: 5px;
    display: block;
}

/* Mô tả */
.sidebar-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    margin: 0;
    /* Giới hạn 2 dòng cho mô tả */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

@media (max-width: 992px) {
    .p-detail-8 .detail-main {
        flex-direction: column; /* Chuyển Main và Sidebar thành 2 cột dọc */
    }
    .p-detail-8 .ht-page__main,
    .p-detail-8 .ht-page__sidebar {
        flex: auto;
    }
}

@media (max-width: 768px) {
    .p-detail-8 {
        padding: 20px 0;
    }
    .p_box-shadow {
        padding: 20px;
    }
    .p_title {
        font-size: 24px;
    }
    .ht-format-detail h2 {
        font-size: 20px;
    }
}

.chinh-sach-title{
    font-size: 28px; margin-bottom: 25px; color: #05a;
}

.chinh-sach-desc{
    font-size: 18px; color: #333; font-weight: 400; line-height: 1.5;
}

/* ===========================
   RESPONSIVE
=========================== */

/* Tablet – Sidebar chuyển xuống dưới */
@media (max-width: 992px) {
    .p-detail-8 .detail-main {
        gap: 20px;
    }
    .p_box-shadow {
        padding: 22px;
    }
    .sidebar-box ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* chia 2 cột */
        gap: 15px; /* khoảng cách giữa các card */
    }

    .sidebar-card-item {
        list-style: none;
    }
}

/* Tablet nhỏ */
@media (max-width: 768px) {
    .p-detail-8 {
        padding: 20px 0;
    }

    .p_box-shadow {
        padding: 18px;
    }

    .p_title,
    .chinh-sach-title {
        font-size: 22px;
        margin-bottom: 18px;
    }

    .chinh-sach-desc,
    .p_desc {
        font-size: 16px;
        line-height: 1.5;
    }

    .box-content {
        flex-wrap: wrap;
        gap: 10px;
        padding-bottom: 10px;
    }

    .p_date {
        padding: 4px 8px;
    }

    .sidebar-title {
        font-size: 15px;
    }
    .sidebar-desc {
        font-size: 12px;
    }
}

/* Mobile vừa */
@media (max-width: 576px) {
    .p_box-shadow {
        padding: 15px;
        border-radius: 6px;
    }

    .p_title,
    .chinh-sach-title {
        font-size: 20px;
    }

    .p_desc,
    .chinh-sach-desc {
        font-size: 15px;
    }

    .p_tag a {
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 14px;
    }

    .sidebar-box {
        padding: 15px;
    }

    .sidebar-content {
        padding: 12px;
    }

    .sidebar-title {
        font-size: 14px;
    }
}

/* Mobile nhỏ (iPhone SE, 360px – 400px) */
@media (max-width: 400px) {

    .p_title,
    .chinh-sach-title {
        font-size: 18px;
    }

    .p_desc,
    .chinh-sach-desc {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .p_date {
        padding: 3px 6px;
    }

    .p_date .day {
        font-size: 16px;
    }

    .p_tag a {
        font-size: 12px;
        padding: 6px 10px;
    }

    .sidebar-title {
        font-size: 13px;
    }

    .sidebar-desc {
        -webkit-line-clamp: 3;
    }
    .sidebar-box ul {
        grid-template-columns: 1fr !important;
    }
}
