/* Tổng quan */
    .gp-popup-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-height: 80vh; /* Giới hạn chiều cao popup */
    }
    .gp-popup-main-content {
        flex-grow: 1;
        overflow-y: auto; /* Thêm thanh cuộn nếu nội dung dài */
        padding: 15px;
    }
    .section-title {
        margin-top: 0;
        margin-bottom: 10px;
        font-size: 16px;
        color: #333;
        border-bottom: 1px solid #eee;
        padding-bottom: 5px;
    }

    /* Layout hàng và cột */
    .gp-popup-row-top {
        display: flex;
        flex-wrap: wrap; /* Cho phép xuống dòng trên mobile */
        gap: 20px;
        margin-bottom: 15px;
    }
    .gp-popup-col {
        flex: 1;
        min-width: 250px; /* Chiều rộng tối thiểu cho mỗi cột */
    }
    .gp-popup-col-avatar {
        flex-basis: 200px; /* Chiều rộng cố định cho cột avatar */
        flex-grow: 0;
        text-align: center;
    }
    .profile-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
    .profile-avatar-placeholder { width: 120px; height: 120px; background-color: #e0e0e0; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin: 0 auto; }
    .profile-avatar-placeholder .dashicons { font-size: 60px; color: #888; }
    .profile-name { font-size: 20px; margin-top: 10px; margin-bottom: 5px; }
    
    .profile-basic-mobile { display: none; } /* Ẩn trên desktop */

    /* Chân popup (Footer) */
    .gp-popup-footer {
        flex-shrink: 0;
        display: flex;
        justify-content: center;
        gap: 10px;
        padding: 5px 20px;
    }
    .gp-popup-button {
        display: inline-block;
        padding: 8px 16px;
        font-size: 14px;
        line-height: 1.2;
        text-align: center;
        text-decoration: none; /* xóa gạch chân của <a> */
        color: #fff;
        display: flex;
        align-items: center;
        font-weight: bold;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        transition: background-color 0.3s;
        text-transform: none !important;
    }

    /* Nếu là button, cần đảm bảo hiển thị giống <a> */
    .gp-popup-button:focus {
        outline: none;
    }

    /* Hover effect */
    .gp-popup-button:hover {
        background-color:rgb(235, 56, 11);
        color:#fff;
    }


    .gp-popup-close-btn { background-color:rgb(172, 215, 243); color:red;margin: 0;}
    .gp-popup-details-btn { background-color: #2271b1; color: white; border-color: #2271b1; }
    /* Style cho tuổi thọ */
    .lifespan-value {
        color: #d63600;
        font-weight: bold;
        background-color: #fff5f5;
        padding: 2px 6px;
        border-radius: 3px;
        border-left: 3px solid #d63600;
    }

    /* Responsive cho mobile */
    @media (max-width: 768px) {
        .lifespan-value {
            font-size: 14px;
            padding: 1px 4px;
        }
    }
    /* CSS cho Responsive (Điện thoại) */
    @media (max-width: 768px) {
        .gp-desktop-only {
            display: none; /* Ẩn các phần tử chỉ dành cho desktop */
        }
        .profile-basic-mobile {
            display: block; /* Hiện các thông tin cơ bản cho mobile */
            text-align: center;
            font-size: 14px;
        }
        .profile-basic-mobile p {
            margin: 5px 0;
        }
        .gp-popup-row-top {
            flex-direction: column; /* Xếp các cột theo chiều dọc */
            align-items: center; /* Căn giữa */
        }
        .gp-popup-col-family {
            width: 100%;
            text-align: left;
            margin-top: 15px;
        }
        .section-title {
            text-align: left;
        }
    }
    .family-grid {
    display: flex;
    gap: 20px;
    }
    .family-subcol {
        flex: 1;
    }
    .family-item {
        margin-bottom: 15px;
    }
    /* Trên mobile, các cột sẽ tự xếp chồng lên nhau */
    @media (max-width: 768px) {
        .family-grid {
            flex-direction: column;
            gap: 0;
        }
    }
    /* --- CẬP NHẬT ĐOẠN NÀY --- */
    .site-content {
        padding: 20px 0;
        display: block;
        height: auto !important;
    }
    
    .content-area, .site-main {
        width: 100%;
        margin: 0;
        padding: 0;
        /* Ép container giãn theo nội dung con */
        display: block; 
        height: auto !important;
        overflow: visible !important; 
        clear: both;
    }

    /* Tổng quan */
    .gp-single-member-container {
        /* Giữ nguyên các thuộc tính cũ của bạn */
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        line-height: 1.6;
        
        /* Thêm thuộc tính này để fix lỗi bên trong */
        display: flow-root;
    }

    /* Header */
    .gp-member-header {
        display: flex;
        flex-wrap: wrap;
        gap: 30px;
        margin-bottom: 30px;
        padding-bottom: 25px;
        border-bottom: 2px solid #f0f0f0;
    }

    .gp-avatar-section {
        flex: 0 0 200px;
        text-align: center;
    }

    .profile-avatar {
        width: 180px;
        height: 180px;
        border-radius: 50%;
        object-fit: cover;
        border: 5px solid #f8f9fa;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .profile-avatar-placeholder {
        width: 180px;
        height: 180px;
        background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 auto;
    }

    .profile-avatar-placeholder .dashicons {
        font-size: 70px;
        color: white;
    }

    .member-name {
        font-size: 28px;
        font-weight: 700;
        color: #2c3e50;
        margin: 15px 0 5px;
        text-align: center;
    }

    .member-status-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        margin-top: 10px;
    }

    .status-badge {
        display: inline-block;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
    }

    .badge-inactive {
        background: #f8d7da;
        color: #721c24;
    }

    .badge-xinvaoho {
        background: #d1ecf1;
        color: #0c5460;
    }

    .badge-adopted {
        background: #fff3cd;
        color: #856404;
    }

    .badge-dead {
        background: #e9ecef;
        color: #495057;
    }

    .badge-alive {
        background: #d4edda;
        color: #155724;
    }

    /* Thông tin cơ bản */
    .gp-basic-info {
        flex: 1;
        min-width: 300px;
    }

    .info-section-title {
        font-size: 20px;
        font-weight: 600;
        color: #2c3e50;
        margin: 0 0 20px 0;
        padding-bottom: 10px;
        border-bottom: 2px solid #3498db;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .info-section-title .dashicons {
        color: #3498db;
    }

    .info-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 15px;
    }

    .info-item {
        display: flex;
        padding: 12px 15px;
        background: #f8f9fa;
        border-radius: 8px;
        border-left: 4px solid #3498db;
    }

    .info-item strong {
        min-width: 120px;
        color: #495057;
        font-weight: 600;
    }

    .info-item span {
        color: #212529;
        flex: 1;
    }

    /* Phần gia đình */
    .gp-family-section {
        margin: 30px 0;
        padding: 25px;
        background: #f8f9fa;
        border-radius: 12px;
        border: 1px solid #e9ecef;
    }

    .family-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
        margin-top: 20px;
    }

    .family-group {
        background: white;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    }

    .family-group-title {
        font-size: 18px;
        font-weight: 600;
        color: #2c3e50;
        margin-bottom: 15px;
        padding-bottom: 8px;
        border-bottom: 1px solid #dee2e6;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .family-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .family-list li {
        padding: 8px 0;
        border-bottom: 1px dashed #e9ecef;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .family-list li:last-child {
        border-bottom: none;
    }

    .family-list .dashicons {
        color: #6c757d;
        font-size: 16px;
    }

    /* Tiểu sử */
    .gp-bio-section {
        margin: 30px 0;
        padding: 25px;
        background: white;
        border-radius: 12px;
        border: 1px solid #e9ecef;
    }

    .bio-content {
        font-size: 16px;
        line-height: 1.8;
        color: #444;
        padding: 20px;
        background: #fdfdfd;
        border-radius: 8px;
        border: 1px solid #eee;
    }

    .bio-content p {
        margin-bottom: 15px;
    }

    /* Responsive */
    @media (max-width: 768px) {
        .gp-single-member-container {
            margin: 0 10px;
            padding: 15px;
        }

        .gp-member-header {
            flex-direction: column;
            align-items: center;
            text-align: center;
            gap: 20px;
        }

        .gp-avatar-section {
            flex: 0 0 auto;
        }

        .profile-avatar,
        .profile-avatar-placeholder {
            width: 150px;
            height: 150px;
        }

        .member-name {
            font-size: 24px;
        }

        .info-grid {
            grid-template-columns: 1fr;
        }

        .info-item {
            flex-direction: column;
            gap: 5px;
            padding: 10px;
        }

        .info-item strong {
            min-width: auto;
            font-size: 14px;
        }

        .family-grid {
            grid-template-columns: 1fr;
            gap: 15px;
        }

        .gp-family-section,
        .gp-bio-section {
            padding: 20px 15px;
        }

        .family-group {
            padding: 15px;
        }
    }

    @media (max-width: 480px) {
        .member-name {
            font-size: 22px;
        }

        .info-section-title {
            font-size: 18px;
        }

        .family-group-title {
            font-size: 16px;
        }
    }

    /* Trạng thái không vào họ */
    .not-in-clan-message {
        text-align: center;
        padding: 60px 20px;
        color: #6c757d;
        font-style: italic;
        background: #f8f9fa;
        border-radius: 10px;
        margin: 20px 0;
    }

    .not-in-clan-message .dashicons {
        font-size: 50px;
        color: #adb5bd;
        margin-bottom: 15px;
    }

    /* Nơi an táng */
    .burial-place {
        margin-top: 5px;
        font-size: 14px;
        color: #666;
    }
    
    /* Fix layout issues */
    .clearfix::after {
        content: "";
        clear: both;
        display: table;
    }