/*
 * Template Default - bản responsive một bộ view cho mọi thiết bị.
 * v1 tách 2 bộ view Desktop/Mobile; ở đây dùng chung một bộ, phần khác biệt của bản Mobile v1 gom về đây.
 * Nạp SAU desktop-all.min.css (CSS gốc của v1, giữ nguyên).
 */

/* Mobile v1 (Themes/Mobile/main.scss) */
.logo-footer {
    max-width: 200px;
}

@media (max-width: 991.98px) {
    .footer-menu {
        margin-top: 25px;
    }
}

/* Banner header: chỉ còn banner giữa và co theo chiều rộng màn hình */
.header-giapha .header-banner-image img {
    max-width: 100%;
    height: auto;
}

/* Menu: các nút cổ xếp nhiều dòng, không tràn ngang */
@media (max-width: 767.98px) {
    .nav-menu-giapha ul {
        justify-content: center;
    }

    .container-giapha,
    .container {
        overflow-wrap: anywhere;
    }
}

/* Nội dung bài viết/lời nói đầu do admin dán vào: ảnh, bảng, iframe không được làm vỡ bố cục */
.entry-content img,
.loi-noi-dau img,
.entry-content video {
    max-width: 100%;
    height: auto;
}

.entry-content table {
    max-width: 100%;
}

.entry-content iframe,
.den-nha-tho iframe {
    max-width: 100%;
}

/* Thẻ bài viết (trang chủ "Tin tức dòng họ", trang chuyên mục): thẻ giấy kem viền nâu nhạt, ảnh bìa trên – chữ dưới.
   Thay kiểu cũ của v1 (ô chữ chồng lên ảnh, rê chuột tô xanh cả ô + link xanh dương); rê chuột chỉ đậm bóng, ảnh phóng nhẹ, tên bài đổi màu. */
.news-card {
    display: flex;
    flex-direction: column;
    height: calc(100% - 1.5rem);
    margin-bottom: 1.5rem;
    background: #fffdf7;
    border: 1px solid rgba(125, 68, 1, .22);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(60, 40, 10, .08);
    transition: box-shadow .3s, border-color .3s;
}

.news-card:hover {
    border-color: rgba(125, 68, 1, .45);
    box-shadow: 0 8px 22px rgba(60, 40, 10, .16);
}

/* CSS gốc đặt margin: 0 auto cho .box-image — trong thẻ dạng cột (flex) nó co về rộng 0, phải trả lại đủ chiều rộng */
.news-card .box-image {
    width: 100%;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

.news-card .image-zoom,
.news-card .image-zoom:hover {
    transform: none;
}

.news-card .image-view {
    padding: 0;
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
    border-radius: 0;
    transition: transform .5s ease;
}

.news-card:hover .image-view {
    transform: scale(1.04);
}

/* Bài chưa có ảnh bìa: nền giấy với biểu tượng cuộn thư mờ, không để trống trắng */
.news-card .image-view.image-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3e6c8, #e9d6ad);
    color: rgba(125, 68, 1, .35);
    font-size: 44px;
}

.news-card .box-text {
    flex: 1;
    margin: 0;
    max-width: 100%;
    padding: 14px 18px 16px;
    background: transparent;
    border-radius: 0;
}

.news-card .meta-data-blog {
    color: #7d4401;
    font-size: 13px;
}

.news-card .post-title {
    margin: 4px 0 0;
    font-size: 17px;
    line-height: 1.4;
}

.news-card .post-title a {
    color: #3b2a14;
    transition: color .3s;
}

.news-card:hover .post-title a {
    color: #7d4401;
}

.news-card .read-more {
    display: inline-block;
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: #7d4401;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.news-card .read-more:hover {
    color: #5c3200;
    text-decoration: underline;
}

/* Nhãn quan hệ với cha mẹ: con nuôi (nâu vàng) / con ngoài giá thú (xám). Con ruột không có nhãn. */
.child-tag {
    display: inline-block;
    padding: 0 6px;
    border: 1px solid #b9a27a;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    vertical-align: middle;
    font-style: normal;
}

.child-tag-2 {
    color: #7a4b0a;
    background: #fff6dc;
    border-color: #b7791f;
}

.child-tag-3 {
    color: #374151;
    background: #f3f4f6;
    border-color: #6b7280;
}

/* Trên thẻ phả đồ (thẻ rộng 70px): chữ nhỏ, đặt ở mép trên thẻ, ngay chỗ đường nối đứt/chấm chạm vào */
.child-tag-box {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
    pointer-events: none;
}

.child-tag-box .child-tag {
    padding: 0 3px;
    font-size: 7px;
    line-height: 1.4;
}

.concai .child-tag,
.huynhde .child-tag {
    margin-left: 8px;
}
