<style>
    #j-services editorial-board-member,
    #j-services editorial-board-list advisor,
    #member-bio {
        grid-template-areas:
            'photo name name name name'
            'photo affiliation affiliation affiliation affiliation'
            'photo citations citations citations citations'
            'photo biography biography biography biography'
            'photo section-name section-name section-name section-name'
            'photo profile-urls profile-urls profile-urls profile-urls';
        grid-template-columns: 70px calc(33% - 35px) calc(33% - 35px) calc(33% - 40px);
        grid-auto-columns: 0fr;
    }

    #j-services editorial-board-member a[type="button"],
    #biography-name a[type="button"] {
        grid-area: biography;
        width: 150px;
    }

    #j-services editorial-board-member profile-urls,
    #biography-name profile-urls {
        grid-area: profile-urls;
        display: flex;
        background-color: #e5e5e5;
        padding: 0px;
        text-align: center;
        border-radius: 5px;
        box-shadow: 0 4px 6px #f3f3f3;
        height: min-content;
    }

    #j-services editorial-board-member profile-urls a:first-of-type {
        border-left: none !important;
    }

    #j-services editorial-board-member #orcid,
    #biography-name #orcid {
        grid-area: orcid;
        flex: 1;
        padding: 2px;
        border-left: 1px solid #dbdbdb;
    }

    #j-services editorial-board-member #scopus,
    #biography-name #scopus {
        grid-area: scopus;
        flex: 2;
        padding: 2px;
        border-left: 1px solid #dbdbdb;
    }

    #j-services editorial-board-member #rsearcherid,
    #biography-name #rsearcherid {
        grid-area: rsearcherid;
        flex: 1;
        padding: 2px;
        border-left: 1px solid #dbdbdb;
    }

    #j-services editorial-board-member #profile,
    #biography-name #profile {
        grid-area: profile;
        flex: 1;
        padding: 2px;
        border-left: 1px solid #dbdbdb;
    }

    /*    New EBM   */
    .an-ebm {
        padding: 1rem !important;
    }

    .an-ebm b,
    .an-ebm strong {
        display: block;
        margin-bottom: 5px;
    }


    .an-ebm .profile-urls,
    .an-ebm .profile-urls {
        background-color: #e5e5e5;
        margin-top: 10px;
        text-align: center;
        overflow: hidden;
        border-radius: 5px;
        box-shadow: 0 4px 6px #f3f3f3;
    }

    .an-ebm .profile-urls a {
        padding: 2px;
        border-left: 1px solid #dbdbdb;
    }

    .an-ebm .profile-urls a:hover {
        background-color: #d3d2d2;
    }

    .an-ebm .profile-urls a:first-of-type {
        border-left: none !important;
    }

    #j-services .reg-title {
        grid-area: auto / auto / auto / span 2;
    }

    #j-services .an-ebm .section-name {
        font-size: 12px;
        background: #dbdbdb;
        padding: 5px 10px;
        border-radius: 5px;
        position: relative;
        width: 100%;
        color: #333;
        margin-top: -15px;
        display: block;
        top: -15px;
    }

    /*.an-ebm #orcid, .an-ebm #orcid {
        grid-area: orcid;
        flex: 1;
        padding: 2px;
        border-left: 1px solid #dbdbdb;
    }

    .an-ebm #scopus, .an-ebm #scopus {
        grid-area: scopus;
        flex: 2;
        padding: 2px;
        border-left: 1px solid #dbdbdb;
    }

    .an-ebm #rsearcherid, .an-ebm #rsearcherid {
        grid-area: rsearcherid;
        flex: 1;
        padding: 2px;
        border-left: 1px solid #dbdbdb;
    }

    .an-ebm #profile, .an-ebm #profile {
        grid-area: profile;
        flex: 1;
        padding: 2px;
        border-left: 1px solid #dbdbdb;
    }*/
</style>
@php
$previousRegion = null;
@endphp
@foreach($ebm_listing as $role=>$data)
@php
$roleName = '';
foreach($ebm_roles as $ebm_role) {
    if ($ebm_role->role_id == $role) {
        $roleName = $ebm_role->nicename;
        if (count($data) < 2) { 
			$roleName=preg_replace('/\(s\)/', '', $roleName); 
        } 
    } 
} 
@endphp
<editorial-board>
    <editorial-board-body>
        <editorial-board-list editorial-board-list-type="{{$role}}">
            @if(!empty($data))
				<editorial-board-list-title>{{$roleName}}</editorial-board-list-title>
            @endif

            @foreach($data as $datas)

            @if($role == "4" && !empty($datas->region_name))
            @php
            $currentRegion = $datas->region_name;
            @endphp
            @if ($currentRegion != $previousRegion)
            <h6 class="reg-title"><b>{{$currentRegion}}</b></h6>
            @php
            $previousRegion = $datas->region_name;
            @endphp
            @endif
            @endif

            <div class="card an-ebm">
				<div class="card-body p-0">
                    @if(!empty($datas->section))
                    <span class="section-name">Section: {{$datas->section}}</span>
                    @endif
					<div class="row">
						<div class="col-3">
							@if(!empty($datas->profile_pic))
							<img src="{{DisplayImage(config('constants.admin.ebm_root_path').'ebm_pic/'.$datas->profile_pic)}}" class="img-fluid" />
							@endif
						</div>
						<div class="col-9 pl-0">
							@if(!empty($datas->web_format))
							<div class="py-1">{!! $datas->web_format !!}</div>
						</div>
					</div>
				</div>
					<div class="card-footer w-75 border-0 offset-md-3 bg-transparent">
                        <div class="d-flex w-100 profile-urls">
                            @if(!empty($datas->orcid_id))
                            <a href="https://orcid.org/{{$datas->orcid_id}}" class="col" id="orcid" target="_blank"><img src="/images/orcid.png" alt="Orcid" title="Orcid">
                            </a>
                            @endif
                            @if(!empty($datas->scopus_id))
                            <a href="https://www.scopus.com/authid/detail.uri?authorId={{$datas->scopus_id}}" class="col" id="scopus" target="_blank"><img src="/images/scopus.png" alt="Scopus" title="Scopus">
                            </a>
                            @endif
                            @if(!empty($datas->researcher_id))
                            <a href="https://publons.com/researcher/{{$datas->researcher_id}}" id="rsearcherid" class="col" target="_blank"><img src="/images/researcherid.png" alt="RsearcherId" title="RsearcherId"></a>
                            @endif
                        </div>
					</div>
                        @else
                        {{$datas->fname}} {{$datas->lname}}
                        @endif
            </div>
            @endforeach
        </editorial-board-list>
    </editorial-board-body>
</editorial-board>
@endforeach